Monitor NAS partition which is mounted under Linux

Anthony Mendoza anthony at onetruemedia.com
Thu May 3 17:41:03 CEST 2007


You will need to get the MIBs for your NAS solution and check to make
sure your NAS product offers SNMP support.  The important thing the MIB
will tell you for your NAS product is what OIDs are important.  Here's
an example that I use:

define command {
    command_name    check-snmp-swap
    command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -w $ARG1$ -c
$ARG2$ -C '$ARG3$' -o .1.3.6.1.4.1.2021.4.4.0 -P 1 -l "Free Swap"
}

Here I use SNMP to check the free swap space on my servers.  The OID is
the value given to check_snmp with the -o argument.  This is dependant
on your configuration.  All other parameters are standard with the
exception of -C which is the community name (think of it like a
password) that you setup on your SNMP enabled device.  The particular
example above I use against Linux servers, but with the format of the
command would be exactly the same as your NAS device. 

I just saw this on NagiosExchange that may help you as well:
http://www.nagiosexchange.org/SNMP.51.0.html?&tx_netnagext_pi1%5Bp_view%5D=733

If you want to learn more about SNMP in general, I learned about it with
this book:
http://www.oreilly.com/catalog/esnmp/

HTH,

On 5/1/2007 2:26 PM, vadi had said:
>
> Dear all, thank you very much for your suggestion.
>
> Anthony Mendoza: Sir I am totally new to SNMP. I request you to tell
> more clues related monitoring NAS partition through SNMP.
>
> Hugo van der Kooij: Hi...I don't have that much control on storage box
> OR consulting vendor.
>
> Jim Avery: Sir your right but my question is
> Let's take an example:
>
>  
>
> Filesystem
>
> 	
>
> Size
>
> 	
>
> Used
>
> 	
>
> Avail
>
> 	
>
> Use%
>
> 	
>
> Mounted on
>
> 1.1.1.1:/a_doc/u1/home/ftproot/
>
> 	
>
> 473G
>
> 	
>
> 246G
>
> 	
>
> 227G
>
> 	
>
> 52%
>
> 	
>
> /u1/home/ftproot
>
> 1.1.1.1:/a_doc/u2/home/ftproot/
>
> 	
>
> 473G
>
> 	
>
> 246G
>
> 	
>
> 227G
>
> 	
>
> 52%
>
> 	
>
> /u2/home/ftproot
>
> 1.1.1.1:/db/u1/home/ftproot/center/
>
> 	
>
> 527G
>
> 	
>
> 377G
>
> 	
>
> 151G
>
> 	
>
> 72%
>
> 	
>
> /u1/home/ftproot/center
>
> 1.1.1.1:/db/u2/home/ftproot/center/
>
> 	
>
> 527G
>
> 	
>
> 377G
>
> 	
>
> 151G
>
> 	
>
> 72%
>
> 	
>
> /u2/home/ftproot/center
>
> 1.1.1.1:/doc/u2/home/ftproot/files/
>
> 	
>
> 527G
>
> 	
>
> 362G
>
> 	
>
> 165G
>
> 	
>
> 69%
>
> 	
>
> /u2/home/ftproot/file
>
> 1.1.1.1:/doc/u1/home/ftproot/doc/
>
> 	
>
> 527G
>
> 	
>
> 362G
>
> 	
>
> 165G
>
> 	
>
> 69%
>
> 	
>
> /u1/home/ftproot/doc
>
> 1.1.1.1:/a_doc/u1/home/abc/
>
> 	
>
> 473G
>
> 	
>
> 246G
>
> 	
>
> 227G
>
> 	
>
> 52%
>
> 	
>
> /u1/home/abc
>
> 1.1.1.1:/a_doc/u1/home/xyz/
>
> 	
>
> 473G
>
> 	
>
> 246G
>
> 	
>
> 227G
>
> 	
>
> 52%
>
> 	
>
> /u1/home/xyz
>
> 1.1.1.1:/a_doc/u1/home/pqr/
>
> 	
>
> 473G
>
> 	
>
> 246G
>
> 	
>
> 227G
>
> 	
>
> 52%
>
> 	
>
> /u1/home/pqr
>
> 1.1.1.1:/storage/
>
> 	
>
> 2.7T
>
> 	
>
> 1.9T
>
> 	
>
> 862G
>
> 	
>
> 69%
>
> 	
>
> /DC_Backup
>
>  
> Only NAS partition here is  a_doc , db, doc, a_doc, in storage which I
> required to monitor.
>
> I thing there is no use in monitoring all the partition here as per
> the above snapshot.
>
> Please correct me if I am wrong.
>
> Best Regards,
>
> Vadiraj
>
>  
>
>
>
> On 5/1/07, *Jim Avery* <jim at jimavery.me.uk
> <mailto:jim at jimavery.me.uk>> wrote:
>
>     On 01/05/07, vadi <vadi.ksdba at gmail.com
>     <mailto:vadi.ksdba at gmail.com>> wrote:
>     > Hi Friends,
>     >
>     > I want to monitor NAS partition which is mounted under Linux(.
>     >
>     > I don't think we can use check_disk or check_disk_smb [I have
>     tried all the
>     > possibility]
>     >
>     > I kindly request you people to help me finding solution for this
>     task.
>     >
>     > Thanks,
>     > Vadiraj
>
>     If all you want to do is monitor disk space, it should be easy enough
>     to write your own plugin.  I have a script (not quite a plugin as it
>     uses send_nsca directly) to do something similar on HP/UX.  Your
>     script will be a bit different, as linux has "df" rather than "bdf"
>     and you might prefer to write it as a proper plugin rather than doing
>     what I've done here.
>
>     -----------
>
>     #!/usr/bin/sh
>
>     # check_disk-user1
>
>     # This script checks the /user1 filesystem space
>
>     myhostname=`hostname`
>
>     warn=2150400
>     crit=2457600
>
>
>     # How big is it?
>
>     bdf=`bdf /user1 | tail -n 1`
>     size=`echo $bdf | awk '{print $2}'`
>     used=`echo $bdf | awk '{print $3}'`
>     perc=`echo $bdf | awk '{print $5}'`
>
>     if [ $used -gt $crit ]
>     then
>       code=2
>     elif [ $used -gt $warn ]
>     then
>       code=1
>     else
>       code=0
>     fi
>
>     /usr/local/nagios/bin/send_nsca -H 10.110.51.90
>     <http://10.110.51.90> -p 5667 -c
>     /usr/local/nagios/etc/send_nsca.cfg << !END!
>     $myhostname     DISK-user1      $code   Disk used $used kbytes $perc
>     percent. | Used=${used}K;$warn;$crit;0;$size
>     !END!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070503/b63fb7c2/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list