From 61001e09f52ba9bd34e094ff26981464a129d1b5 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Wed, 17 Feb 2021 18:08:39 +0100 Subject: [PATCH] Add alert for load usage --- roles/prometheus/templates/prometheus/alert.rules.yml.j2 | 9 +++++++++ .../templates/prometheus/alert.rules.yml.j2 | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 index e2cb42c..d4eec79 100644 --- a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 +++ b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 @@ -59,6 +59,15 @@ groups: severity: warning annotations: summary: "{{ $labels.name }} a échoué sur {{ $labels.instance }}" + + # Check load of instance + - alert: LoadUsage + expr: node_load1 > 5 + for: 2m + labels: + severity: warning + annotations: + summary: "La charge de {{ $labels.instance }} est à {{ $value }} % !" # Check UPS - alert: UpsOutputSourceChanged diff --git a/roles/prometheus_federate/templates/prometheus/alert.rules.yml.j2 b/roles/prometheus_federate/templates/prometheus/alert.rules.yml.j2 index 0fd14f5..d05b451 100644 --- a/roles/prometheus_federate/templates/prometheus/alert.rules.yml.j2 +++ b/roles/prometheus_federate/templates/prometheus/alert.rules.yml.j2 @@ -60,6 +60,15 @@ groups: annotations: summary: "Federate : {{ $labels.name }} a échoué sur {{ $labels.exported_instance }}" + # Check load of instance + - alert: LoadUsage + expr: node_load1 > 5 + for: 2m + labels: + severity: warning + annotations: + summary: "Federate : la charge de {{ $labels.exported_instance }} est à {{ $value }} % !" + # Check UPS - alert: UpsOutputSourceChanged expr: upsOutputSource != 3