[munin/{stats-batiments_,batiments}] corrections
darcs-hash:20100211145609-bd074-6930a2beb0ca02dfff92645e19e1b23377c4875c.gz
This commit is contained in:
parent
fce734a464
commit
6cb20cc1ba
2 changed files with 7 additions and 5 deletions
|
@ -31,6 +31,8 @@ if arg == "config" :
|
||||||
print 'batj.draw STACK'
|
print 'batj.draw STACK'
|
||||||
print 'batm.label Bâtiment M'
|
print 'batm.label Bâtiment M'
|
||||||
print 'batm.draw STACK'
|
print 'batm.draw STACK'
|
||||||
|
print 'bato.label Bâtiment O'
|
||||||
|
print 'batm.draw STACK'
|
||||||
print 'batp.label PdJ'
|
print 'batp.label PdJ'
|
||||||
print 'batp.draw STACK'
|
print 'batp.draw STACK'
|
||||||
print 'wifi.label Wifi'
|
print 'wifi.label Wifi'
|
||||||
|
@ -48,7 +50,7 @@ elif arg == "fichier" :
|
||||||
return len(data['adherent']) + len(data['club'])
|
return len(data['adherent']) + len(data['club'])
|
||||||
|
|
||||||
total = 0
|
total = 0
|
||||||
for bat in 'abcghijmp' :
|
for bat in 'abcghijmpo' :
|
||||||
nb = count('paiement=ok&chbre=%s*' % bat)
|
nb = count('paiement=ok&chbre=%s*' % bat)
|
||||||
total += nb
|
total += nb
|
||||||
file.write("bat%s.value %d\n" % (bat, nb))
|
file.write("bat%s.value %d\n" % (bat, nb))
|
||||||
|
|
|
@ -17,7 +17,7 @@ stats_batiments = "/var/lib/munin/tmp/batiments"
|
||||||
BAT = sys.argv[0].split('_')[1]
|
BAT = sys.argv[0].split('_')[1]
|
||||||
|
|
||||||
# Pour les batiments non manageables on indique le nb de prises
|
# Pour les batiments non manageables on indique le nb de prises
|
||||||
BAT_CHBRES = {'g' : 312}
|
BAT_CHBRES = {}
|
||||||
|
|
||||||
def switch_prise(bat, prise) :
|
def switch_prise(bat, prise) :
|
||||||
''' Renvoie le switch et la prise associé au numéro de la 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])
|
PRISES_ACTIVES += len(reverse(BAT)[prise])
|
||||||
print "activ.value %d" % PRISES_ACTIVES
|
print "activ.value %d" % PRISES_ACTIVES
|
||||||
|
|
||||||
|
|
||||||
PRISES_FIXES = 0
|
PRISES_FIXES = 0
|
||||||
if multiprise != [] :
|
if multiprise != [] :
|
||||||
PRISES_FIXES = - len(multiprise)
|
PRISES_FIXES = - len(multiprise)
|
||||||
|
@ -103,9 +103,9 @@ else :
|
||||||
print "fixes.value %d" % PRISES_FIXES
|
print "fixes.value %d" % PRISES_FIXES
|
||||||
|
|
||||||
PRISES_CRANS = len(uplink_prises[BAT].keys())
|
PRISES_CRANS = len(uplink_prises[BAT].keys())
|
||||||
|
|
||||||
print "crans.value %d" % PRISES_CRANS
|
print "crans.value %d" % PRISES_CRANS
|
||||||
|
|
||||||
NB_PRISES = 0
|
NB_PRISES = 0
|
||||||
for switch in all_switchs(BAT) :
|
for switch in all_switchs(BAT) :
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue