Page 1 of 2

NAS without SNMP support

Posted: Fri May 16, 2014 9:24 am
by Tony.DSTech
I'm trying to get Nagios to scan a Black Armor NAS that doesn't have SNMP support. I've looked in the forums and checked the exchange for a plugin, but there isn't one. I've tried mapping a drive to my windows box in order to scan, but apparently that isn't going to work because of how windows deals with mapped drives. I just need to check if the drive is available or nearing capacity, any help would be greatly appreciated.

Edit: mistype

Re: NAS without SNMP support

Posted: Fri May 16, 2014 10:35 am
by slansing
I'm not quite sure what you mean by "scan" but do you have a script or something you normally use to query the NAS?

Re: NAS without SNMP support

Posted: Fri May 16, 2014 10:55 am
by Tony.DSTech
I haven't gotten it to check the free space on the NAS yet, I've tried what I could find to try with check_nt and check_nrpe, but I haven't gotten anything to work yet. By scan I mean run any checks against it. The only check I can get to work reliably at all is Nagios will recognize that it is there on the network. Kind of a "Hey that thing exists, can't do anything with it, but it's there!" The problem I seem to be running into is that everyone is saying that the best way to check a NAS is with SNMP, but this particular NAS doesn't have that option. This can become a big problem because most of our clients are using this NAS for their back-up system now.

Re: NAS without SNMP support

Posted: Fri May 16, 2014 12:34 pm
by sreinhardt
I can only see, with the points listed, two ways of checking this.

Either passively from a windows machine, using scheduled tasks to run as script that will map the network drive then check the size and report back to nagios. Others have done this, and it should work, although maybe not as cleanly as would be preferred.

Secondly, mount the drive on a linux system or even the nagios system and do disk checks from there. Provided the user attempting to do the checks has access, mounting drives like this in linux do not have the same user specific issues that windows does, so it would work with most of the default plugins, and provide standard details like free\used\total size, etc.

Re: NAS without SNMP support

Posted: Fri May 16, 2014 12:41 pm
by Tony.DSTech
I appreciate the response. I'll try the task scheduler first, as Nagios will already be running from a VM on most of our client's sites and mounting it in the virtal box could cause extra difficulty that really isn't needed. Thanks again and I'll report back once I either have it working or have thrown my hands up in exasperation.

Re: NAS without SNMP support

Posted: Fri May 16, 2014 12:43 pm
by slansing
Great! Let us know if you have any questions or need help with this.

Re: NAS without SNMP support

Posted: Fri May 16, 2014 3:11 pm
by Tony.DSTech
Soooo, I did a little more snooping and I think I can actually use a WMI check to get what I want. It will return with the actual info from the mapped drive, I'm working on it now, going to see what I can do and report back.

Re: NAS without SNMP support

Posted: Mon May 19, 2014 9:24 am
by tmcdonald
We'll keep this thread open for you.

Re: NAS without SNMP support

Posted: Tue May 20, 2014 1:34 pm
by Tony.DSTech
I'm still working on it. It's strange WMI will allow me to scan the NAS from the computer, but it will not allow Nagios to scan it with basically the same commands. I'm actually in the middle of writing a python script to read the info being passed from a batch file. The problem I'm running into now is that windows decides it needs a space between every single digit in the output.

To clarify, I'm running a batch file that outputs the free space and total size of the NAS to a text file. I then pass that file to my script, which doesn't like it at the moment because when it pulls the data it looks like this:
"ÿþF r e e S p a c e
4 2 2 3 6 7 5 4 7 3 9 2
S i z e
9 8 1 6 8 0 5 1 3 0 2 4 "
Garbage at the beginning and all.

Edit:Clarification

Re: NAS without SNMP support

Posted: Tue May 20, 2014 3:43 pm
by abrist
Just a curiosity as I have a completely different idea/approach - can you find out the usage information from a web ui? If so, we may be able to check it with a wrapper script, curl, and some logic.