fix: add webhook delivery for monitoring alerts

DiskUsage and ContainerCrash alerts now fire webhooks via
send_webhook() after pushing WebSocket notifications. Added
data_dir parameter to spawn_metrics_collector for webhook config
access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-12 22:32:19 +00:00
parent a227ca8c32
commit 701b202b41
3 changed files with 29 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ impl Server {
// Create metrics store and spawn background collector
let metrics_store = Arc::new(MetricsStore::with_data_dir(config.data_dir.clone()));
crate::monitoring::spawn_metrics_collector(metrics_store.clone(), Some(state_manager.clone()));
crate::monitoring::spawn_metrics_collector(metrics_store.clone(), Some(state_manager.clone()), Some(config.data_dir.clone()));
let api_handler = Arc::new(
ApiHandler::new(config.clone(), state_manager.clone(), metrics_store).await?,