feat: add various infrastructure check and automation scripts
This commit is contained in:
16
scripts/summarize_panels.py
Normal file
16
scripts/summarize_panels.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import json
|
||||
|
||||
with open("homelab-gitops-repo/dashboards/grafana/systems-dashboard.json") as f:
|
||||
sys_dash = json.load(f)
|
||||
|
||||
with open("homelab-gitops-repo/dashboards/grafana/container-metrics-dashboard.json") as f:
|
||||
cnt_dash = json.load(f)
|
||||
|
||||
print("Systems panels summary:")
|
||||
for p in sys_dash.get("panels", []):
|
||||
print(f"ID {p.get('id')} | Type: {p.get('type')} | Title: {p.get('title')} | Grid: {p.get('gridPos')}")
|
||||
|
||||
print("\nContainers panels summary:")
|
||||
for p in cnt_dash.get("panels", []):
|
||||
print(f"ID {p.get('id')} | Type: {p.get('type')} | Title: {p.get('title')} | Grid: {p.get('gridPos')}")
|
||||
|
||||
Reference in New Issue
Block a user