21 lines
941 B
Python
21 lines
941 B
Python
import urllib.request
|
|
import json
|
|
import ssl
|
|
|
|
ctx = ssl.create_default_context()
|
|
ctx.check_hostname = False
|
|
ctx.verify_mode = ssl.CERT_NONE
|
|
|
|
webhook_url = "https://discord.com/api/webhooks/1131789867286806629/2Yjm-RF-OVDYKOIacvdEcOC1iHtoDbFBdIZWO2F3DNEHHKGWOmVns9uMFh19UsV_4cg9"
|
|
payload = {
|
|
"content": "✅ **[SnarfNet Ops] Infrastructure Alerting Audit & Verification**\n- Spacedock HCI Cluster & Nodes registered in Zabbix & Uptime Kuma.\n- Active dual-channel notifications (Discord & Gotify) verified.\n- All 5 Longhorn volumes & AI stack pods healthy."
|
|
}
|
|
req = urllib.request.Request(webhook_url, data=json.dumps(payload).encode('utf-8'),
|
|
headers={"Content-Type": "application/json", "User-Agent": "SnarfNetOps/1.0"})
|
|
try:
|
|
resp = urllib.request.urlopen(req, context=ctx, timeout=10)
|
|
print("Discord Webhook Status:", resp.getcode())
|
|
except Exception as e:
|
|
print("Discord Webhook Error:", e)
|
|
|