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/*'.
Related videos on Youtube
Author by
Jasmine Lognnes
Updated on September 18, 2022Comments
-
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 about 7 years
/drop-zone/*
is not a regex.