[munin/{stats-batiments_,batiments}] corrections

darcs-hash:20100211145609-bd074-6930a2beb0ca02dfff92645e19e1b23377c4875c.gz
This commit is contained in:
Antoine Durand-Gasselin 2010-02-11 15:56:09 +01:00
parent fce734a464
commit 6cb20cc1ba
2 changed files with 7 additions and 5 deletions

View file

@ -31,6 +31,8 @@ if arg == "config" :
print 'batj.draw STACK'
print 'batm.label Bâtiment M'
print 'batm.draw STACK'
print 'bato.label Bâtiment O'
print 'batm.draw STACK'
print 'batp.label PdJ'
print 'batp.draw STACK'
print 'wifi.label Wifi'
@ -48,7 +50,7 @@ elif arg == "fichier" :
return len(data['adherent']) + len(data['club'])
total = 0
for bat in 'abcghijmp' :
for bat in 'abcghijmpo' :
nb = count('paiement=ok&chbre=%s*' % bat)
total += nb
file.write("bat%s.value %d\n" % (bat, nb))

View file

@ -17,7 +17,7 @@ stats_batiments = "/var/lib/munin/tmp/batiments"
BAT = sys.argv[0].split('_')[1]
# Pour les batiments non manageables on indique le nb de prises
BAT_CHBRES = {'g' : 312}
BAT_CHBRES = {}
def switch_prise(bat, prise) :
''' Renvoie le switch et la prise associé au numéro de la prise '''
@ -94,7 +94,7 @@ else :
PRISES_ACTIVES += len(reverse(BAT)[prise])
print "activ.value %d" % PRISES_ACTIVES
PRISES_FIXES = 0
if multiprise != [] :
PRISES_FIXES = - len(multiprise)
@ -103,9 +103,9 @@ else :
print "fixes.value %d" % PRISES_FIXES
PRISES_CRANS = len(uplink_prises[BAT].keys())
print "crans.value %d" % PRISES_CRANS
NB_PRISES = 0
for switch in all_switchs(BAT) :
try: