[Nagiosplug-devel] [check_snmp] multiple labels ?

Bru, Pierre Pierre.Bru at spotimage.fr
Wed Oct 5 13:35:18 CEST 2011


hello,

with the chek_snmp plugin, it is possible to give a "label" which is
used as a prefix in the answer and as a substitution string for the OID
name in the perfdata

     $ ./check_snmp -H somehost -n -o jvmThreadcount
     SNMP OK - 180 | JVM-MANAGEMENT-MIB::jvmThreadCount.0=180

     $ ./check_snmp -H somehost -n -o jvmThreadcount -l regular
     SNMP OK - regular 180 | regular=180



it is also possible to specify a list of up to 8 OIDs but still only 1
label. 

if I give a label and a list of OIDs, the label is used as a prefix in
the answer and as a substitution sting in the perfdata but only for the
1st OID name. 

     $ ./check_snmp -H somehost -n -o
jvmThreadcount,jvmThreadDaemonCount
     SNMP OK - 180 86 | JVM-MANAGEMENT-MIB::jvmThreadCount.0=180
JVM-MANAGEMENT-MIB::jvmThreadDaemonCount.0=86

     $ ./check_snmp -H somehost -n -o
jvmThreadcount,jvmThreadDaemonCount -l count
     SNMP OK - count 180 86 | count=180
JVM-MANAGEMENT-MIB::jvmThreadDaemonCount.0=86



if I give a list of label, instead of getting an error, the plugin use
the last item of the list.
 
     $ ./check_snmp -H somehost -n -o
jvmThreadcount,jvmThreadDaemonCount -l regular,daemon
     SNMP OK - daemon 180 86 | daemon=180
JVM-MANAGEMENT-MIB::jvmThreadDaemonCount.0=86



is there a way to specify an individual label/substitution string for
each OID ? 
here is an example of the expected behavior

     $ ./check_snmp -H somehost -n -o
jvmThreadcount,jvmThreadDaemonCount -l regular,daemon -D ,
     SNMP OK - regular 180,daemon 86 | regular=180 daemon=86



Please consider the environment before printing this email message.
--------------------------------------------------------------------------
Ce courriel (incluant ses éventuelles pièces jointes) peut contenir des informations confidentielles et/ou protégées ou dont la diffusion est restreinte. Si vous avez reçu ce courriel par erreur, vous ne devez ni le copier, ni l'utiliser, ni en divulguer le contenu à quiconque. Merci d'en avertir immédiatement l'expéditeur et d'effacer ce courriel de votre système. Spot Image décline toute responsabilité en cas de corruption par virus, d'altération ou de falsification de ce courriel lors de sa transmission par voie électronique.

This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Spot Image disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.
--------------------------------------------------------------------------
Spot Image SA (325 089 589 RCS Toulouse) - Siege social: 5, rue des Satellites, 31400 Toulouse, France.





More information about the Devel mailing list