use std::collections::HashMap;

use crate::modules::monitoring::alert_rule::prometheus_alert_rule::PrometheusAlertRule;

pub fn alert_service_down() -> PrometheusAlertRule {
    PrometheusAlertRule {
        alert: "ServiceDown".into(),
        expr: "up == 0".into(),
        r#for: Some("1m".into()),
        labels: HashMap::from([("severity".into(), "critical".into())]),
        annotations: HashMap::from([
            ("summary".into(), "Service is down".into()),
            (
                "description".into(),
                "A target service in the namespace is not responding to Prometheus scrapes.".into(),
            ),
        ]),
    }
}
