[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-users
Subject:    snmpvar.monitor to monitor disk percentages
From:       Hugh Caley <hcaley () neomorphic ! com>
Date:       2000-11-29 21:07:11
[Download RAW message or body]

Attached is an email I received from Peter Holzleitner regarding how to 
set up snmpvar.monitor to monitor disk percentages using ucd-snmp on the 
client and mon.  With his input it now works fine for me, and I would 
like to post it to the archives for future reference.

Hugh

-- 
Hugh Caley
Software Engineer II
Neomorphic Inc. 510-981-8537
hcaley@neomorphic.com

["RE: snmpvar.monitor config problem" (message/rfc822)]

Received: from hermes.unido.org (fw.unido.org [193.81.242.1])
	by roma.neomorphic.com (8.9.0/8.9.0) with ESMTP id CAA25489
	for <hcaley@neomorphic.com>; Wed, 29 Nov 2000 02:23:33 -0800 (PST)
Received: from localhost (root@localhost)
	by hermes.unido.org (8.9.3/8.9.3) with ESMTP id LAA18056
	for <hcaley@neomorphic.com>; Wed, 29 Nov 2000 11:23:28 +0100
X-OpenMail-Hops: 1
Date: Wed, 29 Nov 2000 11:23:27 +0100
Message-Id: <H0000066000d52ca.0975493406.hermes.unido.org@MHS>
Subject: RE: snmpvar.monitor config problem
MIME-Version: 1.0
From: P.Holzleitner@unido.org (Peter HOLZLEITNER)
TO: hcaley@neomorphic.com
Content-Disposition: inline
	;Creation-Date="Wed, 29 Nov 2000 11:23:27 +0100"
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
	;Creation-Date="Wed, 29 Nov 2000 11:23:27 +0100"

OK Hugh, here's the long and hard version if you must have that ;-)


What you have is essentially a definition that says 

  enterprises.ucdavis.dskTable.dskEntry.dskPercent = 
.1.3.6.1.4.1.2021.9.1.9

and that's fine.

However, this is the OID of the ARRAY, and what you miss is the index 
into the array - compare your output below 

	enterprises.ucdavis.dskTable.dskEntry.dskPercent.5 = 79

i.e. you want to query OID .1.3.6.1.4.1.2021.9.1.9.5!

(Incidentally, this is why OIDs of scalars that are not elements of an 
array end in .0!)


In SNMPVAR.MONITOR, write it as 

Definition:

	Variable DISK_PERCENTAGE
	  OID            .1.3.6.1.4.1.2021.9.1.9.
	  Description    Available Disk Space
	  Unit           %

(The trailing dot on the OID is now optional, but I keep it there to 
remind me I'm dealing with an array.

Configuration:

	Host asolo
	   DISK_PERCENTAGE  Max 95  Index 1 2 3 4 5 6 7 8 9 10 11

Since this will tell you only that e.g. "asolo:Avilable Disk Space[5] < 
95%", I still maintain my recommendation to use STORAGE.MONITOR, where 
you can configure things by file system name (inside, it is a lot like 
SNMPVAR.MONITOR but it knows the connections).  Be careful what you 
measure - I can't test this for dskTable now, but the equivalent table 
in Host MIB includes entries for memory, swap space and buffers.

Moreover, in current versions of the UCD SNMP daemon, the standard Host 
MIB implementation is preferred over dskTable.
STORAGE.MONITOR uses Host MIB variables. 

--Peter


-----Original Message-----
From: hcaley@neomorphic.com [mailto:hcaley@neomorphic.com]
Sent: Wednesday, November 29, 2000 02:03
To: P.Holzleitner@computer.org
Subject: snmpvar.monitor config problem


I'm still trying to get snmpvar.monitor to work to check disk space
percentages; my queries to the snmp list have not had any replies, other
than yours that basically told me to use something else ; )

But I really want to get this to work, as I can use it to check other
things as well.

Here is my mon.cf entry for using snmpvar.monitor:

watch checkdisk
    service snmpvars.monitor
        description check freespace on attached disks
        interval 5m
        monitor snmpvars.monitor --config=/usr/lib/mon/mon.d/snmpvar.cf
--varconfig=/usr/lib/mon/mon.d/snmpvar.def
        period wd {Mon-Fri} hr {7am-10pm}

snmpvar.cf:

Host asolo
   DISK_PERCENTAGE  Max 95
Host vinci
   DISK_PERCENTAGE Max 2

snmpvar.def:

Variable DISK_PERCENTAGE
  OID            .1.3.6.1.4.1.2021.9.1.9
  Description    Percentage Available
  Unit           %

And here is the output when run from the command line: ./snmpvar.monitor
--varconf=/usr/lib/mon/mon.d/snmpvar.def
--config=/usr/lib/mon/mon.d/snmpvar.cf asolo

asolo

asolo:
error retrieving asolo:DISK_PERCENTAGE: (noSuchName) There is no such
variable name in this MIB.

I just don't understand what I'm doing wrong here.  When using snmpwalk,
I get this:

snmpwalk -v 1 asolo public .1.3.6.1.4.1.2021.9.1.9

enterprises.ucdavis.dskTable.dskEntry.dskPercent.1 = 96
enterprises.ucdavis.dskTable.dskEntry.dskPercent.2 = 96
enterprises.ucdavis.dskTable.dskEntry.dskPercent.3 = 92
enterprises.ucdavis.dskTable.dskEntry.dskPercent.4 = 94
enterprises.ucdavis.dskTable.dskEntry.dskPercent.5 = 79
enterprises.ucdavis.dskTable.dskEntry.dskPercent.6 = 95
enterprises.ucdavis.dskTable.dskEntry.dskPercent.7 = 95
enterprises.ucdavis.dskTable.dskEntry.dskPercent.8 = 95
enterprises.ucdavis.dskTable.dskEntry.dskPercent.9 = 98
enterprises.ucdavis.dskTable.dskEntry.dskPercent.10 = 86
enterprises.ucdavis.dskTable.dskEntry.dskPercent.11 = 77

which is what I would expect.

Thank you for any help you can give me.

Hugh


--
Hugh Caley
Software Engineer II
Neomorphic Inc. 510-981-8537
hcaley@neomorphic.com






[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic