> -----Original Message-----
> From: [email protected] [mailto:opsview-users-
> [email protected]] On Behalf Of Ryan Nelson
> Sent: Friday, April 16, 2010 4:57 PM
> To: [email protected]
> Subject: [opsview-users] custom snmp checks
> 
> I'm trying to set up some custom SNMP checks for some wireless gear we
> have.  Oids which return finite stats like signal level create graphs
> just the way I would expect.  Oids which return counters, such as

So, it does the right thing, but this brings up an different problem, which 
I'll get to.

As far as the doing the right thing with counters:

Nagios docs for performance data state:

[ http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201 ]

"UOM (unit of measurement) is one of:
...
B - bytes (also KB, MB, TB)
c - a continous counter (such as bytes transmitted on an interface)"

And that this character is to be appended to the value.

The check_snmp plugin appears to respect this, deriving the UOM from the OID's 
OBJECT-TYPE.

Further, the Opsview rrdgraph setup supports this, per 
http://www.opsview.org/opsview3.0.4

An example of a counter: 

[ bare snmpget command ] 
opsview:~# snmpget -v2c -cxxxxxxxx clink-duluth-p  
.1.3.6.1.4.1.9.9.166.1.15.1.1.13.178.544977 
SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.13.178.544977 = Counter32: 51 [ 
<------ note Counter32 - this is a Cisco CBQoS oid for drops ] 

[ check_snmp plugin ] 
opsview:~# /usr/local/nagios/libexec/check_snmp -o 
.1.3.6.1.4.1.9.9.166.1.15.1.1.13.178.544977 -H clink-duluth-p -C xxxxxx 
SNMP OK - 51 | iso.3.6.1.4.1.9.9.166.1.15.1.1.13.178.544977=51c [ <------- note 
the "c" ] 

and if we look at the rrd: 
opsview:/usr/local/nagios/var/rrd/clink%2Dduluth/Customer%20Link%20Duluth%20to%20Superior%20Telescript%20Drops/iso_3_6_1_4_1_9_9_166_1_15_1_1_13_178_544977#
 rrdtool info value.rrd | grep type 
ds[value].type = "COUNTER" [ <----- ds type is COUNTER ] 

and the graph indeed reflects this: http://bit.ly/aqW7uN [ the counter is not 
increasing, and the graph shows "0" ] 

GAUGE object types appear to work just fine too, I'll spare all the details.

As for the problem this brings up: In the example above, I want to define 
warnings, criticals, for the Counter32 OID.  The only way to do this, it would 
seem, would be to define a second service check that checks, or write a wrapper 
that does the whole thing.

And this leads to a last comment/feature request.  If check_snmp_linkstatus 
could grab packets and err/discards, I'd be a happy happy guy.  Similarly, if 
there was something like a "check_snmp_cisco_ip_sla" and a "check_cisco"cbqos" 
script, and they were all integrated into the UI, oh lordy, I'd leave early and 
go get drunk.  If I find the time, I'll do it, but, uh, time...

Anyhow, thanks for the work on Opsview, it's greatly appreciated.


Ryan Goldberg  |  Senior Network Engineer
Compudyne | 306 W Superior St - Ste 10  |  Duluth, MN 55802 
[email protected] | 218-729-0929 Ext. 7  |  compudyne.net 
Hibbing 218.263.3624  |  Virginia 218.749.5806  |  Marquette 906.360.9081




_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to