From bdb9e16f0f50676291620051e203b2d770e06647 Mon Sep 17 00:00:00 2001 From: Robert Gildein Date: Tue, 20 Aug 2024 15:26:30 +0200 Subject: [PATCH] Add alert rules to argo-controller based on the KF093 spec (#195) * Add alert rules to argo-controller based on the KF093 spec * Delete charms/argo-controller/src/prometheus_alert_rules/unit_unavailable.rule --- .../KubeflowArgoControllerServices.rules | 24 +++++++++++++++++++ .../unit_unavailable.rule | 11 --------- 2 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 charms/argo-controller/src/prometheus_alert_rules/KubeflowArgoControllerServices.rules delete mode 100644 charms/argo-controller/src/prometheus_alert_rules/unit_unavailable.rule diff --git a/charms/argo-controller/src/prometheus_alert_rules/KubeflowArgoControllerServices.rules b/charms/argo-controller/src/prometheus_alert_rules/KubeflowArgoControllerServices.rules new file mode 100644 index 0000000..ec7f8c4 --- /dev/null +++ b/charms/argo-controller/src/prometheus_alert_rules/KubeflowArgoControllerServices.rules @@ -0,0 +1,24 @@ +groups: +- name: KubeflowArgoControllerServices + rules: + - alert: KubeflowServiceDown + expr: up{} < 1 + for: 5m + labels: + severity: critical + annotations: + summary: "{{ $labels.juju_charm }} service is Down ({{ $labels.juju_model }}/{{ $labels.juju_unit }})" + description: | + One or more targets of {{ $labels.juju_charm }} charm are down on unit {{ $labels.juju_model }}/{{ $labels.juju_unit }}. + LABELS = {{ $labels }} + + - alert: KubeflowServiceIsNotStable + expr: avg_over_time(up{}[10m]) < 0.5 + for: 0m + labels: + severity: warning + annotations: + summary: "{{ $labels.juju_charm }} service is not stable ({{ $labels.juju_model }}/{{ $labels.juju_unit }})" + description: | + {{ $labels.juju_charm }} unit {{ $labels.juju_model }}/{{ $labels.juju_unit }} has been unreachable at least 50% of the time over the last 10 minutes. + LABELS = {{ $labels }} diff --git a/charms/argo-controller/src/prometheus_alert_rules/unit_unavailable.rule b/charms/argo-controller/src/prometheus_alert_rules/unit_unavailable.rule deleted file mode 100644 index c4b672a..0000000 --- a/charms/argo-controller/src/prometheus_alert_rules/unit_unavailable.rule +++ /dev/null @@ -1,11 +0,0 @@ -alert: ArgoUnitIsUnavailable -expr: up < 1 -for: 5m -labels: - severity: critical -annotations: - summary: > - Argo unit {{ $labels.juju_model }}/{{ $labels.juju_unit }} unavailable - description: > - The argo unit {{ $labels.juju_model }} {{ $labels.juju_unit }} is unavailable - LABELS = {{ $labels }}