Not content with ruining my life with Nagios, a while back I thought it would be wise to keep an eye on disk usage with Nagios.
Admittedly most of this is documented in the documentation at http://nagios.manubulon.com/snmp_storage.html but I thought one thing should be highlighted – the ability to exclude multiple mount points.
They key combination is -e and -m. -e for exclude, and -m accepts a regular expression style parameter afterwards. My issue came from the fact I wanted to exclude /mnt, /media and /srv from my regular checks. The combination is as below…
command_line $USER1$/check_snmp_storage -H $HOSTADDRESS$ -C public -2 -e -m /mnt\|/media\|/srv -q FixedDisk -S1 -w 90% -c 95%
There we go. Checking all devices SNMP considers a a fixed disk, whilst also excluding mount points and /srv (which contains loopback mounted ISOs).
Recent Comments