Monitor NAS share availability
Posted: Mon Mar 27, 2017 6:55 am
We experienced an issue where one of our critical systems failed due to an issue caused by our NetApp NAS which was attached to this server being unavailable. I was trying to setup a monitoring task to check that this path is available but I am not having much luck. I placed a file in the directory on the NAS called nagios_check.txt and using this check to monitor this file
check_nrpe -H cinzl01d -t 15 -c check_files -a path='\\cinnas1t\zldev\bloomberg' pattern='nagios_check.txt' max-depth=1 'critical=count<1' 'empty-state=critical'
It works until I have our NAS admin disconnect the share and then the check for this client just says
UNKNOWN HARD 5 of 5 CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
As soon as the client connection is established again Nagios sends out the critical warning but shortly after sends the OK. I am running the NSClient on this server as a service account which has access to this NAS share. Is there another way I can check this so when the volume is gone Nagios can alert the Business Unit? I was thinking when the file was unavailable Nagios would send a critical notification but instead just shows unknown.
check_nrpe -H cinzl01d -t 15 -c check_files -a path='\\cinnas1t\zldev\bloomberg' pattern='nagios_check.txt' max-depth=1 'critical=count<1' 'empty-state=critical'
It works until I have our NAS admin disconnect the share and then the check for this client just says
UNKNOWN HARD 5 of 5 CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
As soon as the client connection is established again Nagios sends out the critical warning but shortly after sends the OK. I am running the NSClient on this server as a service account which has access to this NAS share. Is there another way I can check this so when the volume is gone Nagios can alert the Business Unit? I was thinking when the file was unavailable Nagios would send a critical notification but instead just shows unknown.