check_disk 'clear thresholds' option

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
FujitsuPK
Posts: 2
Joined: Thu Nov 14, 2013 6:01 am

check_disk 'clear thresholds' option

Post by FujitsuPK »

check_disk has an option to 'clear thresholds' (-C), what does this do? What thresholds is it clearing, and why would you want to clear them?

Thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_disk 'clear thresholds' option

Post by slansing »

That is so that you can check multiple shares/partitions/drives with different warning and critical thresholds:
Examples:
check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /
Checks /tmp and /var at 10% and 5%, and / at 100MB and 50MB

check_disk -w 100 -c 50 -C -w 1000 -c 500 -g sidDATA -r '^/oracle/SID/data.*$'
Checks all filesystems not matching -r at 100M and 50M. The fs matching the -r regex
are grouped which means the freespace thresholds are applied to all disks together

check_disk -w 100 -c 50 -C -w 1000 -c 500 -p /foo -C -w 5% -c 3% -p /bar
Checks /foo for 1000M/500M and /bar for 5/3%. All remaining volumes use 100M/50M
FujitsuPK
Posts: 2
Joined: Thu Nov 14, 2013 6:01 am

Re: check_disk 'clear thresholds' option

Post by FujitsuPK »

Great answer. That makes sense.

Thanks!
Locked