feat: add various infrastructure check and automation scripts

This commit is contained in:
2026-11-15 17:17:41 -05:00
parent 336b7759d0
commit b301aa3ece
232 changed files with 8274 additions and 298 deletions

View File

@@ -0,0 +1,28 @@
import requests
import json
import urllib3
urllib3.disable_warnings()
auth = ("admin", "Katzir476!!!")
for uid in ["snarfnet-containers", "snarfnet-systems", "snarfnet-ai-stack"]:
url = f"https://grafana.snarfnet.net/api/dashboards/uid/{uid}"
resp = requests.get(url, auth=auth, verify=False, timeout=10)
data = resp.json()
dash = data.get("dashboard", {})
title = dash.get("title")
folder_id = data.get("meta", {}).get("folderId")
folder_title = data.get("meta", {}).get("folderTitle")
panels = dash.get("panels", [])
templating = [v.get("name") for v in dash.get("templating", {}).get("list", [])]
print(f"\n==========================================")
print(f"UID: {uid} | Title: {title} | Folder: {folder_title} (ID: {folder_id})")
print(f"Template variables: {templating}")
print(f"Panels ({len(panels)}):")
for p in panels:
p_type = p.get("type")
p_title = p.get("title")
if p_type == "row":
print(f" [ROW] {p_title}")
else:
print(f" - [{p_type}] {p_title}")