WIP: added implementation to deploy crd-alertmanagerconfigs Co-authored-by: Ian Letourneau <letourneau.ian@gmail.com> Reviewed-on: #86 Co-authored-by: Willem <wrolleman@nationtech.io> Co-committed-by: Willem <wrolleman@nationtech.io>
20 lines
659 B
Rust
20 lines
659 B
Rust
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(),
|
|
),
|
|
]),
|
|
}
|
|
}
|