snmp disk percentages

Patrick Proy nagios-user at proy.org
Thu Apr 14 00:25:25 CEST 2005


Hi, 

It's a known "issue" that on disks : Used + Available < Total.
Standard Host ressource MIB doesn't provide the available space left, and
you can have the case of a full disk with 96% used....
What I do is lower the warning and critical levels for disks.

For the check_snmp_storage plugin I wrote, I don't wan't to use ucd mib as
it is not as standard as the host mib : it's not even by default on Linux.
If you really want accurate value, it's best to use nrpe, but I think it's
precise enough like this.

Patrick 
Nagios AT proy DOT org
http://sourceforge.net/projects/nagios-snmp/
http://www.manubulon.com/nagios/
 



> -----Message d'origine-----
> De : nagios-users-admin at lists.sourceforge.net 
> [mailto:nagios-users-admin at lists.sourceforge.net] De la part 
> de Alan Silver
> Envoyé : mercredi 13 avril 2005 16:26
> À : nagios-users at lists.sourceforge.net
> Objet : [Nagios-users] snmp disk percentages
> 
> Hi all:
> 
> I have been using nagios for a few years now and I was just going 
> through my configs and changing the way I do things.
> Suffice it to say, I have been trying to use some of the new plugins 
> that allow you to grab the disk percentage used for a filesystem via 
> snmp. And I have been coming up with percentages which are slightly 
> different than what df -k is saying (2-5%).  Here are a few 
> examples.......
> 
> BTW, I have tried these perl scripts on a solaris 8 box 
> running nagios 
> 1.2 and a redhat enterprise linux 4 box running 2.0b2. Both instances 
> gave me the same "inaccurate" answers.
> 
> So, here is some info for you to look at:
> Here is the df of the box I would like to monitor, call it gilead
> Filesystem            kbytes    used   avail capacity  Mounted on
> /dev/dsk/c0t0d0s0     962134  181392  723014    21%    /
> 
> I used
> [root at gandalf contrib]# ./check_snmp_disk_monitor.pl -H 
> gilead -C mejis 
> -s -m /
> Disk OK - 19% used on /|/,985225216,185745408
> 
> [root at gandalf contrib]# ./check_snmp_storage.pl -H gilead -C 
> mejis  -m 
> /  -r -w 80 -c 81
> / : 19 %used (177MB/940MB)  (<  80) : OK
> 
> [root at gandalf contrib]# ./disk_by_snmp  gilead  mejis 1  30 40
> Disk usage: 177 MB used, 762 MB (81%) free.
> 
> If I use straight snmp to walk gilead, I can see:
> .iso.org.dod.internet.private.enterprises.ucdavis.dskTable.dsk
> Entry.dskPercent.1 
> = INTEGER: 20
> (which is also slightly off when compared with df -k)
> 
> .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable
> .hrStorageEntry.hrStorageDescr.1 
> = STRING: /
> .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable
> .hrStorageEntry.hrStorageAllocationUnits.1 
> = INTEGER: 1024 Bytes
> .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable
> .hrStorageEntry.hrStorageSize.1 
> = INTEGER: 962134
> .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable
> .hrStorageEntry.hrStorageUsed.1 
> = INTEGER: 181392
> 
> So, I guess my issue with how these scripts are calculating disk 
> percentage based on the disk used / disk alloted. Which may not be 
> completely accurate with how much percentage is still usable for the 
> user. Does anyone know of a script which goes after the 
> .iso.org.dod.internet.private.enterprises.ucdavis.dskTable.dsk
> Entry.dskPercent 
> oid instead of trying to calculate from disk used/disk allocated?  I 
> have used check_snmp in the past. But since different partitaion are 
> indexed different on my hosts, I was hoping someone had a nice perl 
> program which took care of the index issue for me
> 
> Thanks
> 
> alan
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from 
> real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> 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
> 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
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