Page 1 of 1
monitoring NAS devices
Posted: Wed Sep 25, 2013 9:38 am
by jeremy.garman
I'm attempting to monitor the storage utilization of a virtual server drive (eg. F:\) which is a drive mapping on the VM pointing at a NAS share. Its a standard Free Disk Space monitor, which works for any local drives, but for the F:\, it returns "Invalid Drive". What can I do to fix this? Is there a better way of monitoring NAS devices (in addition to a standard Host Alive ping test, which I have in place... eg. volume and/or share status, free disk space etc.)?
How about LUN and disk utilization status on a SAN device?
Thanks in advance!
Re: monitoring NAS devices
Posted: Wed Sep 25, 2013 4:00 pm
by abrist
You may want to monitor the share directly on the NAS. I would suggest starting with the exchange for potential plugins:
http://exchange.nagios.org/index.php?op ... chword=nas
For SANs:
http://exchange.nagios.org/index.php?op ... chword=san
http://exchange.nagios.org/index.php?op ... chword=lun
Many of these plugins are device specific, so you may have to do some searching.
Finally, if your devices support it, snmp is always an option as well.
Re: monitoring NAS devices
Posted: Wed Sep 25, 2013 4:54 pm
by jeremy.garman
OK thanks, I'll check out those plugins. But is that the only way to do it? You can't monitor a mapped drive via the server its mapped to (rather than the actual hosting device)? Would that work the same way for a *nix partition that's mounted from a share on another device?
Re: monitoring NAS devices
Posted: Thu Sep 26, 2013 9:39 am
by abrist
I would assume that if you cannot poll free space on the share (on the client), nagios agents/scripts will be unable to do so as well. If you can get the metrics of the share by referencing the mount point, then there may be a way.
Re: monitoring NAS devices
Posted: Mon Oct 21, 2013 11:00 am
by jeremy.garman
Sorry for the delay in responding to this...
Here's the service definition I have for the NAS share that doesn't work. So again, its a Windows 2008 server which has a NAS share mapped to a local drive letter.
I use windows.cfg for all my MS Windows server monitored servers and Linux.cfg for all my RHEL and Ubuntu Linux monitored servers.
So, in windows.cfg:
define service{
use generic-service
host_name server1.domain.com
service_description F:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l f -w 97 -c 99
}
In this instance, the F:\ is a local mapped drive pointing at a NAS share at \\nas.device\share1. The error I get in the Services tactical dashboard view on the Nagios server is included as an attachment.
Conversely, I have a Linux server with a similar situation that works fine.
I have another NAS share at \\nas.device\share2, which is mounted on the Linux server as /exports (so seamless to the end users) and NRPE monitors the drive utilization with no issues!
Here's the Linux.cfg services definition:
define service{
use generic-service
host_name server2.domain.com
service_description NAS Partition Free Space
check_command check_nrpe_args!check_disk!5% 2% /exports
}
Although I will look at the NAS plugins on the Nagios Exchange site, I was hoping to monitor the share directly from the monitored server, to retain context easily if staff get into a panic if something went down! : )
Re: monitoring NAS devices
Posted: Mon Oct 21, 2013 12:24 pm
by abrist
jeremy.garman wrote:
In this instance, the F:\ is a local mapped drive pointing at a NAS share at \\nas.device\share1. The error I get in the Services tactical dashboard view on the Nagios server is included as an attachment.
This is due to the plugin as it will only check actual drives by name: c:\, d:\, etc. Can you check the shares on the nas itself?
Re: monitoring NAS devices
Posted: Tue Oct 22, 2013 4:36 pm
by jeremy.garman
But that's what I mean...
The NAS share is mapped to the server (as an F:\ drive), so it ought to be no different to the OS than any other local drive (eg. C:\ or D:\ etc.), and yet, I get that Nagios error.
Conversely, when I try to check a different NAS share mounted as a volume on a different server, this one running Linux, it works just fine! Nagios can't tell the difference between a locally mounted partition and an NFS share mounted to a local mount point.
I can do some research and see about using SNMP to monitor the NAS shares/volumes directly, but again, I had wanted to maintain context for the oncall techs who will be reacting to any issues.
Re: monitoring NAS devices
Posted: Tue Oct 22, 2013 4:44 pm
by sreinhardt
Windows and linux handle smb\network shares completely different. Linux handles everything as a file and generally changes are system wide. Windows in the case of mapped drives however, are extremely user specific. The drive mapped from a share for your user at the location f:\, could be the t:\ drive for your neighbor, and in the case of nagios likely is not mapped at all. I highly doubt snmp will offer a way, when querying windows, for you to monitor it either. I hate to be the bearer of bad news in this case, but that unfortunately how we have found it works. The only way I could imagine this working, would be if you use nrpe and a script to mount the drive, check its size, then exit, and even this may not work due to how differently windows handles network drives.
What you could do instead, is to run the snmp checks against the device itself, but list the service under the windows machine your techs would be expecting it for. It would require some amount of trickery, but if you were just looking for when it is getting full or is unavailable I think this would work rather well.
Re: monitoring NAS devices
Posted: Wed Oct 23, 2013 11:52 am
by jeremy.garman
OK, thanks for the explanation Spenser. I'll see if I can MacGyver something along the lines that you describe!

Re: monitoring NAS devices
Posted: Wed Oct 23, 2013 11:56 am
by sreinhardt
You're welcome! If you have questions certainly ask away!