diff --git a/munin/etat_imprimante b/munin/etat_imprimante index f6e2bdee..77319376 100755 --- a/munin/etat_imprimante +++ b/munin/etat_imprimante @@ -23,6 +23,7 @@ dico = { "JAUNE": 0, "NOIR": 0, 'COMM TAMB. NOIR': 0, + 'PAGES REST.': 0, "": 0, } @@ -33,7 +34,15 @@ def etat(): try: comm = hptools.snmp(host="laserjet.adm.crans.org", version="1", community="public") for oid in liste_oid: - total += dico.get(comm.get_string(oid), 4) + msg = comm.get_string(oid) + diff = dico.get(msg, None) + if diff == None: + for k in dico.keys(): + if k in msg and k != "": diff = dico[k] + if diff == None: + diff = 4 + total += diff + except Exception, err: total += 24 return total