How to exclude path based on regex in check_disk?

11,039

If you read manpage carefully, you can use -A to check all path, then use -I to ignore path that match regex:

/usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -A -I '/drop-zone/*'

This will check all path exclude path that match '/drop-zone/*'.

Share:
11,039

Related videos on Youtube

Jasmine Lognnes
Author by

Jasmine Lognnes

Updated on September 18, 2022

Comments

  • Jasmine Lognnes
    Jasmine Lognnes almost 2 years

    If I do

    /usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -r '/drop-zone/*'
    

    when it only checks paths which matches the regex. I would like the opposite. The manpage seams to suggest -I, but I don't understand how to use it.

    Question

    How do I make check_disk check all paths except those that match a regex?

  • Sparhawk
    Sparhawk about 7 years
    /drop-zone/* is not a regex.