10 lines
506 B
Python
10 lines
506 B
Python
import json
|
|
d = json.load(open('/home/hmo/web-dashboard/static/mofin_health.json'))
|
|
sc = d.get('self_check', {})
|
|
print('functional:', bool(sc.get('functional')), '| meta:', bool(sc.get('meta_watchdog')),
|
|
'| hygiene:', bool(sc.get('hygiene')), '| repairs:', len(sc.get('recent_repairs', [])))
|
|
if sc.get('functional'):
|
|
fh = sc['functional']
|
|
print('functional status:', fh.get('status'), fh.get('summary'))
|
|
if sc.get('meta_watchdog'):
|
|
print('meta status:', sc['meta_watchdog'].get('status')) |