Y en a marre des warnings qui correspondent rien.
darcs-hash:20071015085103-68412-3527f63fd8432678689d28034154cc060bcebc4e.gz
This commit is contained in:
parent
2ee59804ae
commit
03e0e1417f
1 changed files with 4 additions and 8 deletions
|
@ -55,14 +55,12 @@ dico_courbes_gen = {
|
||||||
'vlabel' : "nb de pages restantes",
|
'vlabel' : "nb de pages restantes",
|
||||||
'lower-limit' : 0,
|
'lower-limit' : 0,
|
||||||
'upper-limit' : 2000,
|
'upper-limit' : 2000,
|
||||||
'warning' : "500:",
|
|
||||||
'critical' : "100:",
|
|
||||||
'dico' : {
|
'dico' : {
|
||||||
'tray6' : ("1.3.6.1.2.1.43.8.2.1.10.1.6","Feuilles A4","3333ff"),
|
'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"),
|
'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' : ("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"),
|
'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"),
|
'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' : ("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"),
|
'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",
|
'vlabel' : "Pourcentage restant",
|
||||||
'lower-limit' : 0,
|
'lower-limit' : 0,
|
||||||
'upper-limit' : 100,
|
'upper-limit' : 100,
|
||||||
'warning' : "20:",
|
|
||||||
'critical' : "5:",
|
|
||||||
'dico' : {
|
'dico' : {
|
||||||
'tray6' : ("1.3.6.1.2.1.43.8.2.1.10.1.6","Feuilles A4","3333ff"),
|
'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"),
|
'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"),
|
'tray1' : ("1.3.6.1.2.1.43.8.2.1.10.1.1","Transparents","ffff33"),
|
||||||
},
|
},
|
||||||
'max' : {
|
'max' : {
|
||||||
|
@ -143,7 +139,7 @@ else:
|
||||||
comm = hptools.snmp(host="laserjet.adm.crans.org",version="1",community="public")
|
comm = hptools.snmp(host="laserjet.adm.crans.org",version="1",community="public")
|
||||||
except Exception,err:
|
except Exception,err:
|
||||||
exit
|
exit
|
||||||
|
|
||||||
for fieldname in dico_courbes.keys():
|
for fieldname in dico_courbes.keys():
|
||||||
try:
|
try:
|
||||||
if max_courbes :
|
if max_courbes :
|
||||||
|
@ -154,5 +150,5 @@ else:
|
||||||
except Exception,err:
|
except Exception,err:
|
||||||
value = 0
|
value = 0
|
||||||
if value < 0 : value = 0
|
if value < 0 : value = 0
|
||||||
|
|
||||||
print "%s.value %s" % (fieldname,value)
|
print "%s.value %s" % (fieldname,value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue