Page 1 of 1

Nagios disk usage check and reserved root space

Posted: Wed Mar 22, 2017 3:17 pm
by dtidwell1224
The "check_snmp_storage_wizard.pl, and check_snmp_storage.pl" checks do not appear to be monitoring disk usage correctly.

When running the following command, I get 75%:

[root@nagioshost libexec]# /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H anon01 -C redacted --v2c -m "^/mariadb/data$" -w 80 -c 95 -f
/mariadb/data: 75%used(75565MB/100665MB) (<80%) : OK | '/mariadb/data'=75565MB;80532;95632;0;100665

[root@nagioshost libexec]# /usr/local/nagios/libexec/check_snmp_storage.pl -H anon01 -C redacted --v2c -m "^/mariadb/data$" -w 80 -c 95 -f
/mariadb/data: 75%used(75565MB/100665MB) (<80%) : OK | '/mariadb/data'=75565MB;80532;95632;0;100665

However when I run df on the actual box, It appears off by 5%:

[user@anon01 ~]$ df -h | grep data
/dev/mapper/volumegroup-lv_mariadb_data 99G 74G 20G 80% /mariadb/data

It appears that this Nagios check does not take into account the reserved root space.
While I understand that I could lower the reserved space, I would prefer not to do so on this system, as it is essential for root to be able to login and access system services, etc... in the event of a problem
Is it possible with any flag or modification to the script(s) to account for the reserved space?

Re: Nagios disk usage check and reserved root space

Posted: Wed Mar 22, 2017 4:28 pm
by avandemore
I think you're missing the snmp part, the plugin is going to return what snmp sends. You'll need to customize your snmp daemon if you want that check to reflect differently:
https://thwack.solarwinds.com/thread/50578

You may have an easier time of it if you install an active agent and have it report the results. Then reservations can be taken into account by the plugin.