Check Disk for all mounted UNIX filesystems
Posted: Fri May 18, 2018 11:35 am
Hello. We have a requirement to monitor disk space use on every mounted filesystem on Linux and AIX systems. To date, we've been configuring individual checks for each filesystem that is of interest. The case we need to catch is if a filesystem is added or removed, the UNIX team wants us to automatically catch the altered configuration.
There is a script in the Nagios plugins set that does this for WIndows, but I haven't found anything on the net for UNIX.
We are using nrpe with a check_disk shell script so we can use the same one for Linux and AIX. Will it work to use a wrapper script to loop through a set of mounted filesystems substituting the check_disk filesystem parameter on each iteration to launch /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -t 30 -c check_disk -a '-w 80 -c 90 -p $filesystem'?
I ask because I recall an earlier posting where we were told that there were limitations on executing nrpe from within another nrpe script. What are the constraints and considerations that we should cover?
If for example Nagios XI initiates an ../check_nrpe -H remotehost -t 30 -c check_multiple_filesystems -a '-w 85 -c 95 -p all' and the remotehost's check_multiple_filesystems scripts iterates through launching nrpe -c check_disk -a '-w $warnarg -c $critarg -p $currentfs' will Nagios XI know what to do with the results from the remotely launched checks, when it didn't initiate them?
Thanks! Alan
There is a script in the Nagios plugins set that does this for WIndows, but I haven't found anything on the net for UNIX.
We are using nrpe with a check_disk shell script so we can use the same one for Linux and AIX. Will it work to use a wrapper script to loop through a set of mounted filesystems substituting the check_disk filesystem parameter on each iteration to launch /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -t 30 -c check_disk -a '-w 80 -c 90 -p $filesystem'?
I ask because I recall an earlier posting where we were told that there were limitations on executing nrpe from within another nrpe script. What are the constraints and considerations that we should cover?
If for example Nagios XI initiates an ../check_nrpe -H remotehost -t 30 -c check_multiple_filesystems -a '-w 85 -c 95 -p all' and the remotehost's check_multiple_filesystems scripts iterates through launching nrpe -c check_disk -a '-w $warnarg -c $critarg -p $currentfs' will Nagios XI know what to do with the results from the remotely launched checks, when it didn't initiate them?
Thanks! Alan