Y en a marre des warnings qui correspondent rien.

darcs-hash:20071015085103-68412-3527f63fd8432678689d28034154cc060bcebc4e.gz
This commit is contained in:
glondu 2007-10-15 10:51:03 +02:00
parent 2ee59804ae
commit 03e0e1417f

View file

@ -55,14 +55,12 @@ dico_courbes_gen = {
'vlabel' : "nb de pages restantes",
'lower-limit' : 0,
'upper-limit' : 2000,
'warning' : "500:",
'critical' : "100:",
'dico' : {
'tray6' : ("1.3.6.1.2.1.43.8.2.1.10.1.6","Feuilles A4","3333ff"),
'tray6_max' : ("1.3.6.1.2.1.43.8.2.1.9.1.6","Feuilles A4 (max)","0000cc"),
'tray3' : ("1.3.6.1.2.1.43.8.2.1.10.1.3","Feuilles A3","33ff33"),
'tray3_max' : ("1.3.6.1.2.1.43.8.2.1.9.1.3","Feuilles A3 (max)","00cc00"),
'tray2' : ("1.3.6.1.2.1.43.8.2.1.10.1.2","Cartons","ff3333"),
'tray2' : ("1.3.6.1.2.1.43.8.2.1.10.1.2","Cartons","ff3333"),
'tray2_max' : ("1.3.6.1.2.1.43.8.2.1.9.1.2","Cartons (max)","cc0000"),
'tray1' : ("1.3.6.1.2.1.43.8.2.1.10.1.1","Transparents","ffff33"),
'tray1_max' : ("1.3.6.1.2.1.43.8.2.1.9.1.1","Transparents (max)","cccc00"),
@ -71,12 +69,10 @@ dico_courbes_gen = {
'vlabel' : "Pourcentage restant",
'lower-limit' : 0,
'upper-limit' : 100,
'warning' : "20:",
'critical' : "5:",
'dico' : {
'tray6' : ("1.3.6.1.2.1.43.8.2.1.10.1.6","Feuilles A4","3333ff"),
'tray3' : ("1.3.6.1.2.1.43.8.2.1.10.1.3","Feuilles A3","33ff33"),
'tray2' : ("1.3.6.1.2.1.43.8.2.1.10.1.2","Cartons","ff3333"),
'tray2' : ("1.3.6.1.2.1.43.8.2.1.10.1.2","Cartons","ff3333"),
'tray1' : ("1.3.6.1.2.1.43.8.2.1.10.1.1","Transparents","ffff33"),
},
'max' : {
@ -143,7 +139,7 @@ else:
comm = hptools.snmp(host="laserjet.adm.crans.org",version="1",community="public")
except Exception,err:
exit
for fieldname in dico_courbes.keys():
try:
if max_courbes :
@ -154,5 +150,5 @@ else:
except Exception,err:
value = 0
if value < 0 : value = 0
print "%s.value %s" % (fieldname,value)