Nagios disk usage check and reserved root space
Posted: Wed Mar 22, 2017 3:17 pm
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?
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?