deploy: Dockerfile, Compose pro Rolle, LiteLLM, Prometheus/Alertmanager, Canary-Prober, n8n-Workflows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,12 +91,14 @@ class ProxmoxDriver:
|
||||
|
||||
|
||||
class WebhookNotifier:
|
||||
def __init__(self, url: str, client: httpx.Client | None = None):
|
||||
def __init__(self, url: str, auth: str = "", client: httpx.Client | None = None):
|
||||
self.url = url
|
||||
self.headers = {"Authorization": auth} if auth else {}
|
||||
self.client = client or httpx.Client(timeout=15.0)
|
||||
|
||||
def notify(self, text: str, severity: str = "info", data: dict[str, Any] | None = None) -> str:
|
||||
resp = self.client.post(self.url, json={"text": text, "severity": severity, "data": data or {}})
|
||||
resp = self.client.post(self.url, json={"text": text, "severity": severity, "data": data or {}},
|
||||
headers=self.headers)
|
||||
resp.raise_for_status()
|
||||
return "benachrichtigt"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user