Monitor NAS share availability

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 748
Joined: Wed Oct 09, 2013 2:54 pm

Monitor NAS share availability

Post by jkinning »

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.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Monitor NAS share availability

Post by avandemore »

It sounds like the issue is with NSClient. Did you check the NSClient logs? What do they say?
Previous Nagios employee
jkinning
Posts: 748
Joined: Wed Oct 09, 2013 2:54 pm

Re: Monitor NAS share availability

Post by jkinning »

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.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor NAS share availability

Post by scottwilkerson »

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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Monitor NAS share availability

Post by WillemDH »

Are you sure the system nscp is running on has permissions on this share?
Nagios XI 5.8.1
https://outsideit.net
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor NAS share availability

Post by scottwilkerson »

WillemDH wrote:Are you sure the system nscp is running on has permissions on this share?
Willem,

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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
jkinning
Posts: 748
Joined: Wed Oct 09, 2013 2:54 pm

Re: Monitor NAS share availability

Post by jkinning »

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor NAS share availability

Post by scottwilkerson »

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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
jkinning
Posts: 748
Joined: Wed Oct 09, 2013 2:54 pm

Re: Monitor NAS share availability

Post by jkinning »

I'll give the negate plugin a go for this service check so when unknown comes up it will trigger a notification.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor NAS share availability

Post by scottwilkerson »

Sounds good, let us know if we can be of assistance
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked