[wiki/autostatus] compat nouveau monit
Ignore-this: 1c2a7f315c3150bd715c6a90c580010 Les nouvelles versions de monit (sur thot, sur wheezy par ex) mettent des majuscules aux statuts des services monitorés. darcs-hash:20121213130732-28565-61289f1c0988709e05ab779e3441cfa8e205ed3d.gz
This commit is contained in:
parent
dfcda07054
commit
874f61d9cc
1 changed files with 3 additions and 3 deletions
|
@ -93,7 +93,7 @@ def AllStatusOff () :
|
||||||
for s in status[h][t].keys() :
|
for s in status[h][t].keys() :
|
||||||
|
|
||||||
# on supprime un status s'il est Up
|
# on supprime un status s'il est Up
|
||||||
if status[h][t][s]['status'] in ['running','accessible'] :
|
if status[h][t][s]['status'].lower() in ['running','accessible'] :
|
||||||
status[h][t].pop(s)
|
status[h][t].pop(s)
|
||||||
|
|
||||||
# reste-t-il des services dans le groupe
|
# reste-t-il des services dans le groupe
|
||||||
|
@ -126,7 +126,7 @@ def FormatService(Type, Service, Data, f) :
|
||||||
result += f.text(Service)
|
result += f.text(Service)
|
||||||
result += f.strong(0)
|
result += f.strong(0)
|
||||||
result += f.table_cell(0)
|
result += f.table_cell(0)
|
||||||
if Data['status'] in ['running','accessible'] :
|
if Data['status'].lower() in ['running','accessible'] :
|
||||||
result += f.table_cell(1,{'style':'background-color:lime'})
|
result += f.table_cell(1,{'style':'background-color:lime'})
|
||||||
else :
|
else :
|
||||||
result += f.table_cell(1,{'style':'background-color:red'})
|
result += f.table_cell(1,{'style':'background-color:red'})
|
||||||
|
@ -264,7 +264,7 @@ def execute(macro, filtre) :
|
||||||
|
|
||||||
# création de la chaine de retour
|
# création de la chaine de retour
|
||||||
code = f.table_cell(0)
|
code = f.table_cell(0)
|
||||||
if s['status'] in ['running','accessible'] :
|
if s['status'].lower() in ['running','accessible'] :
|
||||||
code += f.table_cell(1,{'style':'background-color:lime'})
|
code += f.table_cell(1,{'style':'background-color:lime'})
|
||||||
else :
|
else :
|
||||||
code += f.table_cell(1,{'style':'background-color:red'})
|
code += f.table_cell(1,{'style':'background-color:red'})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue