How to exclude path based on regex in check_disk? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.
But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, ubuntu, centos, nagios, .
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.
How do I make
check_disk check all paths except those that match a regex?
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/*’.