Development
This commit is contained in:
parent
c5d1c7890a
commit
e72676eac5
2 changed files with 21 additions and 1 deletions
|
|
@ -739,7 +739,19 @@ def print_table(status):
|
|||
if trigger:
|
||||
print(f"\n Next blocklist update: {trigger}")
|
||||
|
||||
problems = [
|
||||
svc_problems = []
|
||||
for svc in status.get("services", []):
|
||||
if svc.get("status") == "problem":
|
||||
parts = []
|
||||
if not svc.get("active_ok"):
|
||||
parts.append(f"active: {svc.get('active')} (expected {svc.get('expected_active')})")
|
||||
if not svc.get("enabled_ok"):
|
||||
parts.append(f"enabled: {svc.get('enabled')} (expected {svc.get('expected_enabled')})")
|
||||
svc_problems.append({
|
||||
"severity": "error",
|
||||
"detail": f"{svc['name']}: {', '.join(parts)}",
|
||||
})
|
||||
problems = svc_problems + [
|
||||
item
|
||||
for section in ("configurations", "logs")
|
||||
for item in status.get(section, [])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue