NAS without SNMP support

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Tony.DSTech
Posts: 12
Joined: Fri May 16, 2014 9:02 am
Location: Clute, Tx
Contact:

NAS without SNMP support

Post 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
Tony Howe
Technician
DSTechsolutions
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NAS without SNMP support

Post 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?
Tony.DSTech
Posts: 12
Joined: Fri May 16, 2014 9:02 am
Location: Clute, Tx
Contact:

Re: NAS without SNMP support

Post 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.
Tony Howe
Technician
DSTechsolutions
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NAS without SNMP support

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Tony.DSTech
Posts: 12
Joined: Fri May 16, 2014 9:02 am
Location: Clute, Tx
Contact:

Re: NAS without SNMP support

Post 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.
Tony Howe
Technician
DSTechsolutions
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NAS without SNMP support

Post by slansing »

Great! Let us know if you have any questions or need help with this.
Tony.DSTech
Posts: 12
Joined: Fri May 16, 2014 9:02 am
Location: Clute, Tx
Contact:

Re: NAS without SNMP support

Post 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.
Tony Howe
Technician
DSTechsolutions
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NAS without SNMP support

Post by tmcdonald »

We'll keep this thread open for you.
Former Nagios employee
Tony.DSTech
Posts: 12
Joined: Fri May 16, 2014 9:02 am
Location: Clute, Tx
Contact:

Re: NAS without SNMP support

Post 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
Tony Howe
Technician
DSTechsolutions
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NAS without SNMP support

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked