$def with (output, now) $def row_error(check): $check $def row_ok(check): $check $def table_contents(color, text, services): $text $for check in services.keys(): $ isError = services.get(check) $if isError != 0: $:row_error(check) $else: $:row_ok(check) $ errors = 0 $ color = "green"
$for server in range(len(output)): $code: errors = 0 color = "green" $for _,v in output[server]['result'].items(): $for check in v.keys(): $ isError = v.get(check) $if isError != 0: $code: errors=errors+1 $if errors > 0: $code: color = "red"

$for env, services in output[server]['result'].items(): $ errors = 0 $for check in services.keys(): $ isError = services.get(check) $if isError != 0: $ errors=errors+1 $if errors > 0: $code: color = "red" txt = "{}: {} error(s)".format(env, errors) $:table_contents(color, txt, services) $else: $code: color = "green" $:table_contents(color, env, services)
$output[server]['name']
$else: $code: color = "green"

$for env, services in output[server]['result'].items(): $ errors = 0 $for check in services.keys(): $ isError = services.get(check) $if isError != 0: $ errors=errors+1 $if errors > 0: $code: color = "red" txt = "{}: {} error(s)".format(env, errors) $:table_contents(color, txt, services) $else: $ color = "green" $:table_contents(color, env, services)
$output[server]['name']

Hosts status




Latest update: $now.day/$now.month/$now.year, $now.hour:$now.minute:$now.second

Home | Help