[munin/canon_] ajout des valeurs warning et critical
darcs-hash:20090526141849-bd074-d870bd76560d9ceeb6da7e9be6701bde03d89fce.gz
This commit is contained in:
parent
7da73d50e6
commit
11a4da6a24
1 changed files with 12 additions and 7 deletions
19
munin/canon_
19
munin/canon_
|
@ -33,6 +33,8 @@ dico_courbes_gen = {
|
|||
'vlabel': u"Pourcentage restant",
|
||||
'lower-limit' : 0,
|
||||
'upper-limit' : 6000,
|
||||
'warning' : '5:',
|
||||
'critical' : '1:',
|
||||
'dico' : { 'ton_b' : (SNMP_TON_B, "Toner noir", "000000"),
|
||||
'ton_c' : (SNMP_TON_C, "Toner cyan", "00ffff"),
|
||||
'ton_m' : (SNMP_TON_M, "Toner magenta", "ff00ff"),
|
||||
|
@ -46,11 +48,13 @@ dico_courbes_gen = {
|
|||
'papier' : { 'titre' : 'Stock papier',
|
||||
'vlabel' : 'Feuilles restantes',
|
||||
'lower-limit' : 0,
|
||||
'warning' : '100:',
|
||||
'critical' : '1:',
|
||||
'upper-limit' : 550,
|
||||
'dico' : { 'Bac1' : (SNMP_BAC1, "Feuilles A4 (Bac 1)", '3333ff'),
|
||||
'Bac2' : (SNMP_BAC2, "Feuilles A4 (Bac 2)", '4444cc'),
|
||||
'Bac3' : (SNMP_BAC3, "Feuilles A4R (Bac 3)", "33ff33"),
|
||||
'Bac4' : (SNMP_BAC4, "Feuilles A4R (Bac 4)", "ff3333") }
|
||||
'Bac4' : (SNMP_BAC4, "Feuilles A3 (Bac 4)", "ff3333") }
|
||||
},
|
||||
'compteur' : { 'titre' : 'Pages imprimées',
|
||||
'vlabel' : 'Pages',
|
||||
|
@ -70,7 +74,8 @@ vlabel = dico_courbes_gen[arg]['vlabel']
|
|||
lower_limit = dico_courbes_gen[arg].get('lower-limit', None)
|
||||
upper_limit = dico_courbes_gen[arg].get('upper-limit', None)
|
||||
max_courbes = dico_courbes_gen[arg].get('max', [])
|
||||
|
||||
warning = dico_courbes_gen[arg].get("warning")
|
||||
critical = dico_courbes_gen[arg].get("critical")
|
||||
|
||||
try :
|
||||
arg = sys.argv[1]
|
||||
|
@ -80,7 +85,7 @@ except :
|
|||
if arg == "config" :
|
||||
print 'host_name canon'
|
||||
print 'graph_category consommables'
|
||||
if lower_limit and upper_limit:
|
||||
if upper_limit:
|
||||
print "graph_args --lower-limit %i --upper-limit %i --rigid" % (lower_limit,upper_limit)
|
||||
else:
|
||||
print "graph_args --lower-limit 0"
|
||||
|
@ -90,10 +95,10 @@ if arg == "config" :
|
|||
keys.sort()
|
||||
for fieldname in keys:
|
||||
print "%s.label %s" % (fieldname,dico_courbes[fieldname][1])
|
||||
# if warning:
|
||||
# print "%s.warning %s" % (fieldname, warning)
|
||||
# if critical:
|
||||
# print "%s.critical %s" % (fieldname, critical)
|
||||
if warning:
|
||||
print "%s.warning %s" % (fieldname, warning)
|
||||
if critical:
|
||||
print "%s.critical %s" % (fieldname, critical)
|
||||
if len(dico_courbes[fieldname]) == 3 :
|
||||
print "%s.colour %s" % (fieldname,dico_courbes[fieldname][2])
|
||||
if len(dico_courbes[fieldname]) == 4 :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue