Обновить docs/services/lxc208-manage/alert/matrix-relay.py
This commit is contained in:
parent
3f77af6967
commit
38f55659ed
@ -9,6 +9,7 @@ from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
from typing import Dict
|
||||
|
||||
from alerts.matrix import send_matrix
|
||||
from alerts.crowdsec import process_crowdsec_alert
|
||||
from alerts.grafana import process_grafana
|
||||
from alerts.pbs import detect_backup_source, process_backup
|
||||
from alerts.config import PORT
|
||||
@ -53,6 +54,11 @@ class WebhookHandler(BaseHTTPRequestHandler):
|
||||
process_backup(obj, send_matrix, source)
|
||||
return
|
||||
|
||||
if "crowdsec_alerts" in obj:
|
||||
logger.info("Processing CrowdSec alert")
|
||||
process_crowdsec_alert(obj)
|
||||
return
|
||||
|
||||
if "alerts" in obj:
|
||||
alerts = obj["alerts"]
|
||||
logger.info("Processing Grafana alerts: %d items", len(alerts))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user