From 9863780c62758c48414327b91046e1f9c5bdff66 Mon Sep 17 00:00:00 2001 From: glondu Date: Fri, 2 Feb 2007 10:57:26 +0100 Subject: [PATCH] Ajout de limites warning et critical pour les consommables de l'imprimante. darcs-hash:20070202095726-68412-12b9beb0717ab1dfd87c2c1f066bd798d5e6ccc7.gz --- munin/laserjet_ | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/munin/laserjet_ b/munin/laserjet_ index 4af85277..22788272 100755 --- a/munin/laserjet_ +++ b/munin/laserjet_ @@ -21,6 +21,8 @@ dico_courbes_gen = { 'vlabel' : "pourcentage restant", 'lower-limit' : 0, 'upper-limit' : 100, + 'warning' : 15, + 'critical' : 2, 'dico' : { 'car_p_bla' : ("enterprises.11.2.3.9.4.2.1.4.1.10.1.1.18.1.0","Cartouche noir","000000"), 'car_p_cya' : ("enterprises.11.2.3.9.4.2.1.4.1.10.1.1.18.2.0","Cartouche cyan","00ffff"), @@ -41,6 +43,8 @@ dico_courbes_gen = { 'vlabel' : "Pourcentage restant", 'lower-limit' : 0, 'upper-limit' : 100, + 'warning' : 15, + 'critical' : 2, 'dico' : { 'tam_p_bla' : ("enterprises.11.2.3.9.4.2.1.4.1.10.1.1.37.5.0","Tambour d'imagerie noir","000000"), 'tam_p_cya' : ("enterprises.11.2.3.9.4.2.1.4.1.10.1.1.37.6.0","Tambour d'imagerie cyan","00ffff"), @@ -51,6 +55,8 @@ dico_courbes_gen = { 'vlabel' : "nb de pages restantes", 'lower-limit' : 0, 'upper-limit' : 150000, + 'warning' : 5000, + 'critical' : 500, 'dico' : { 'kit_tra' : ("enterprises.11.2.3.9.4.2.1.4.1.10.5.1.1.9.0","Kit de transfert image"), 'kit_net' : ("enterprises.11.2.3.9.4.2.1.4.1.10.5.1.1.10.0","Kit de nettoyage image"), @@ -65,6 +71,8 @@ titre = dico_courbes_gen[arg]['titre'] vlabel = dico_courbes_gen[arg]['vlabel'] lower_limit = dico_courbes_gen[arg]['lower-limit'] upper_limit = dico_courbes_gen[arg]['upper-limit'] +warning = dico_courbes_gen[arg].get("warning") +critical = dico_courbes_gen[arg].get("critical") ######### try : @@ -81,6 +89,10 @@ if arg == "config" : for fieldname in dico_courbes.keys(): #print "%s.draw LINE2" % fieldname print "%s.label %s" % (fieldname,dico_courbes[fieldname][1]) + if warning: + print "%s.warning %d" % (fieldname, warning) + if critical: + print "%s.critical %d" % (fieldname, critical) # En attendant que l'option arrive... if False and len(dico_courbes[fieldname])>2: print "%s.colour %s" % (fieldname,dico_courbes[fieldname][2])