Monitor NAS share availability
Monitor NAS share availability
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.
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Monitor NAS share availability
It sounds like the issue is with NSClient. Did you check the NSClient logs? What do they say?
Previous Nagios employee
Re: Monitor NAS share availability
Error says - 2017-03-24 15:19:04: error:D:\source\nscp\modules\CheckDisk\file_finder.cpp:95: Invalid file specified: \\cinnas1t\zldev\bloomberg
I have attached the nsclient.log file.
It works and is OK now that it can see the file in the \\cinnas1t\zldev\bloomberg directory but once we disconnect the NAS I am not getting any critical notifications.
I have attached the nsclient.log file.
It works and is OK now that it can see the file in the \\cinnas1t\zldev\bloomberg directory but once we disconnect the NAS I am not getting any critical notifications.
You do not have the required permissions to view the files attached to this post.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitor NAS share availability
This appears to be a known NSClient++ issue, although I can't confirm it is fixed in any current versions
https://github.com/mickem/nscp/issues/172
https://github.com/mickem/nscp/issues/172
Re: Monitor NAS share availability
Are you sure the system nscp is running on has permissions on this share?
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitor NAS share availability
Willem,WillemDH wrote:Are you sure the system nscp is running on has permissions on this share?
The OP's problem goes away when the client re-establishes connection.
The more I think about it, UNKNOWN may almost be the proper message. You are asking to count the files, if you can't even make the connection, you actually don't know if a critical state has been reached...
I would still look into an updated NSCP version that may have the fix.
Re: Monitor NAS share availability
I will try to update the NSClient++ and that is what I was thinking. It didn't know how to report back so it was just "unknown".
I am running the nsclient service as a user who has access to the share. It works as long as the share is available. Once the share goes away I would think a critical notification would be dispatched but it goes into an unknown state.
I am running the nsclient service as a user who has access to the share. It works as long as the share is available. Once the share goes away I would think a critical notification would be dispatched but it goes into an unknown state.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitor NAS share availability
Until you get the desired effect from NSClient++ you can create a custom check command using the negate plugin to change the UNKNOWN to CRITICAL for this check
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Monitor NAS share availability
I'll give the negate plugin a go for this service check so when unknown comes up it will trigger a notification.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitor NAS share availability
Sounds good, let us know if we can be of assistance