From 8bfe83f73c9bbb22027c6d6cb2d0d352fc0a2122 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Mon, 8 Feb 2021 13:52:17 +0100 Subject: [PATCH 1/4] Adaptation of UPS alerts --- .../templates/prometheus/alert.rules.yml.j2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 index 5c8cf56..1dffe4b 100644 --- a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 +++ b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 @@ -63,7 +63,7 @@ groups: # Check UPS - alert: UpsOutputSourceChanged expr: upsOutputSource != 3 - for: 5m + for: 1m labels: severity: warning annotations: @@ -71,7 +71,7 @@ groups: - alert: UpsBatteryStatusWarning expr: upsBatteryStatus == 3 - for: 5m + for: 2m labels: severity: warning annotations: @@ -79,7 +79,7 @@ groups: - alert: UpsBatteryStatusCritical expr: upsBatteryStatus == 4 - for: 5m + for: 10m labels: severity: warning annotations: @@ -95,7 +95,7 @@ groups: - alert: UpsWrongInputVoltage expr: (upsInputVoltage < 210) or (upsInputVoltage > 250) - for: 5m + for: 10m labels: severity: warning annotations: @@ -103,7 +103,7 @@ groups: - alert: UpsWrongOutputVoltage expr: (upsOutputVoltage < 220) or (upsOutputVoltage > 240) - for: 5m + for: 10m labels: severity: warning annotations: @@ -111,7 +111,7 @@ groups: - alert: UpsTimeRemainingWarning expr: upsEstimatedMinutesRemaining < 15 - for: 5m + for: 1m labels: severity: warning annotations: @@ -119,7 +119,7 @@ groups: - alert: UpsTimeRemainingCritical expr: upsEstimatedMinutesRemaining < 5 - for: 5m + for: 1m labels: severity: critical annotations: -- 2.45.2 From 428b6f57336334d717a892accb1db330dd92e314 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Mon, 8 Feb 2021 13:57:32 +0100 Subject: [PATCH 2/4] Correcting grafana stats for wireless --- .../templates/prometheus/snmp.yml.j2 | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/roles/prometheus/templates/prometheus/snmp.yml.j2 b/roles/prometheus/templates/prometheus/snmp.yml.j2 index 5968095..d4dc51c 100644 --- a/roles/prometheus/templates/prometheus/snmp.yml.j2 +++ b/roles/prometheus/templates/prometheus/snmp.yml.j2 @@ -162,13 +162,31 @@ ubiquiti_unifi: indexes: - labelname: unifiVapIndex type: gauge - - name: unifiVapNumStations + - name: unifi_vap_num_stations oid: 1.3.6.1.4.1.41112.1.6.1.2.1.8 type: gauge help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.8' indexes: - - labelname: unifiVapIndex + - labelname: unifi_vap_index type: gauge + lookups: + - labels: [unifi_vap_index] + labelname: unifi_vap_essid + oid: 1.3.6.1.4.1.41112.1.6.1.2.1.6 + type: DisplayString + - labels: [unifi_vap_index] + labelname: unifi_vap_radio + oid: 1.3.6.1.4.1.41112.1.6.1.2.1.9 + type: DisplayString + - labels: [] + labelname: unifi_vap_index +# - name: unifiVapNumStations +# oid: 1.3.6.1.4.1.41112.1.6.1.2.1.8 +# type: gauge +# help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.8' +# indexes: +# - labelname: unifiVapIndex +# type: gauge - name: unifiVapRadio oid: 1.3.6.1.4.1.41112.1.6.1.2.1.9 type: DisplayString -- 2.45.2 From d7cf61dd943af3a6e2a99e974ca165ab935a886e Mon Sep 17 00:00:00 2001 From: pz2891 Date: Mon, 8 Feb 2021 13:58:28 +0100 Subject: [PATCH 3/4] Add new EDC Borne --- hosts | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts b/hosts index 04893ce..3578d95 100644 --- a/hosts +++ b/hosts @@ -267,6 +267,7 @@ ep-1-3.borne.auro.re ep-1-2.borne.auro.re ep-0-1.borne.auro.re eo-2-1.borne.auro.re +ee-2-1.borne.auro.re ############################################################################### # George Sand -- 2.45.2 From bd5b88c4fc01d886b46d48d0190e3219fad216e4 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Mon, 8 Feb 2021 18:22:08 +0100 Subject: [PATCH 4/4] Correcting format of percentage --- roles/prometheus/templates/prometheus/alert.rules.yml.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 index 1dffe4b..e2cb42c 100644 --- a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 +++ b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 @@ -22,7 +22,7 @@ groups: labels: severity: warning annotations: - summary: "Mémoire libre de {{ $labels.instance }} à {{ $value | printf "%.2f" }}%." + summary: "Mémoire libre de {{ $labels.instance }} à {{ humanize $value }}%." # Alert for out of disk space - alert: OutOfDiskSpace @@ -31,7 +31,7 @@ groups: labels: severity: warning annotations: - summary: "Espace libre de {{ $labels.mountpoint }} sur {{ $labels.instance }} à {{ $value | printf "%.2f" }}%." + summary: "Espace libre de {{ $labels.mountpoint }} sur {{ $labels.instance }} à {{ humanize $value }}%." # Alert for out of inode space on disk - alert: OutOfInodes @@ -49,7 +49,7 @@ groups: labels: severity: warning annotations: - summary: "CPU sur {{ $labels.instance }} à {{ $value | printf "%.2f" }}%." + summary: "CPU sur {{ $labels.instance }} à {{ humanize $value }}%." # Check systemd unit (> buster) - alert: SystemdServiceFailed -- 2.45.2