Need pointer

Sumit Malhotra smalhotra at dataarmor.net
Wed Feb 8 10:36:56 CET 2006


 

 

  _____  

From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Toto
Capuccino
Sent: Wednesday, February 08, 2006 2:52 PM
To: Nagios
Subject: [Nagios-users] Need pointer

 

Hi,

I need a pointer to  do the following :
i am checking the staus of printers with check_snmp -H x.x.x.x -o OID
the snmp check returns a value between 0 and 14 that corresponds to a state
     Condition         Bit # 
     lowPaper              0
     noPaper               1
     lowToner              2
     noToner               3
     doorOpen              4
     jammed                5
     offline               6 
     serviceRequested      7
     inputTrayMissing      8
     outputTrayMissing     9
     markerSupplyMissing  10
     outputNearFull       11
     outputFull           12
     inputTrayEmpty       13 
     overduePreventMaint  14

What i want to do is to make appear the value in the output of the check.
How can i do that ?

Write a wrapper script which instead of returning OID in output returns the
State instead of NUMBERIC value.

 

The script could be like

 

#!/bin/sh

output= `/usr/bin/local/Nagios/check_snmp -H $1 -o $2`

 

if [ $output = 0 ]

echo "lowpaper"

exit ($value)


More information about the Users mailing list