From 03e0e1417ff6149ab6e20d498df4ffff63fc5ba9 Mon Sep 17 00:00:00 2001 From: glondu Date: Mon, 15 Oct 2007 10:51:03 +0200 Subject: [PATCH] Y en a marre des warnings qui correspondent rien. darcs-hash:20071015085103-68412-3527f63fd8432678689d28034154cc060bcebc4e.gz --- munin/laserjet_ | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/munin/laserjet_ b/munin/laserjet_ index 3c0e7d2c..0f03cb92 100755 --- a/munin/laserjet_ +++ b/munin/laserjet_ @@ -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)