SNMP Printer monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
PepijnBosgoed
Posts: 3
Joined: Mon Feb 21, 2011 3:47 am

SNMP Printer monitoring

Post by PepijnBosgoed »

Hi guys,

I am using Nagios XI (2009R1.3G) to monitor some of our servers and now I want to monitor a printer as well. I have tried it with the printer wizard, but that didn't work for me. Now I am trying it through SNMP. With a SNMP walker I found the OID's I need.

The printer I want to monitor is an HP OfficeJet 8500. The required OID's for monitoring the status of the ink are:

black: .1.3.6.1.2.1.43.11.1.1.9.1.1
yellow: .1.3.6.1.2.1.43.11.1.1.9.1.2
magenta: .1.3.6.1.2.1.43.11.1.1.9.1.3
cyan: .1.3.6.1.2.1.43.11.1.1.9.1.4

So far, so good. I can monitor the ink levels and when I compare it with the web interface from the printer it seems to be right.

However, when I set the warning on 35% and the critical on 25% it begins to shout when the cartridge is for 38% full. When I set only a warning on 40% it says the cartridge is ok. Apparently it thinks that it has to deal with a value from 0 - 100 in stead of 100 - 0.

Do you guys have any idea how to convert this? The command which is used is as follow:

check_xi_service_snmp! -o .1.3.6.1.2.1.43.11.1.1.9.1.3 -C public -P 1 -w 35 -c 25

I hope you guys can help me out here :)

Thanks in advance!
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: SNMP Printer monitoring

Post by tonyyarusso »

From check_snmp -h:
-w, --warning=INTEGER_RANGE(s)
Range(s) which will not result in a WARNING status
-c, --critical=INTEGER_RANGE(s)
Range(s) which will not result in a CRITICAL status

- Ranges are inclusive and are indicated with colons. When specified as
'min:max' a STATE_OK will be returned if the result is within the indicated
range or is equal to the upper or lower bound. A non-OK state will be
returned if the result is outside the specified range.
- If specified in the order 'max:min' a non-OK state will be returned if the
result is within the (inclusive) range.
See also http://nagiosplug.sourceforge.net/devel ... HOLDFORMAT.

Short answer: If given just an integer, that is interpreted as alerting when greater than that integer or less than zero, which is not what you want. What you need is something like this:

Code: Select all

check_xi_service_snmp! -o .1.3.6.1.2.1.43.11.1.1.9.1.3 -C public -P 1 -w 35: -c 25:
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked