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,15 @@
import requests
import json
import urllib3
urllib3.disable_warnings()
auth = ("admin", "Katzir476!!!")
url = "https://grafana.snarfnet.net/api/datasources/proxy/1/api/v1/targets"
resp = requests.get(url, auth=auth, verify=False, timeout=10)
targets = resp.json().get("data", {}).get("activeTargets", [])
print(f"Total Active Targets: {len(targets)}")
jobs = set(t.get("labels", {}).get("job") for t in targets)
print("Active Jobs:", jobs)
for t in targets:
if "node" in t.get("labels", {}).get("job", "") or "shipyard" in t.get("labels", {}).get("job", ""):
print(f" Job: {t.get('labels', {}).get('job')} | Labels: {t.get('labels')} | Health: {t.get('health')}")