From d81543436035ac3306fe0d8633952eb708a18248 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Wed, 10 Mar 2021 12:53:28 +0100 Subject: [PATCH 1/5] Add new ups monitored --- monitoring.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitoring.yml b/monitoring.yml index 76282b9..852f30e 100755 --- a/monitoring.yml +++ b/monitoring.yml @@ -27,6 +27,7 @@ - targets: "{{ groups['pacaterie_unifi'] | list | sort }}" prometheus_ups_snmp_targets: - ups-pn-1.ups.auro.re + - ups-ps-1.ups.auro.re roles: - prometheus @@ -38,6 +39,7 @@ # Prometheus targets.json prometheus_ups_snmp_targets: - ups-ec-1.ups.auro.re + - ups-ec-2.ups.auro.re prometheus_targets: - targets: | From bbf4ac323c7476c5353d6835142cb71eb67005c7 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Wed, 10 Mar 2021 12:55:11 +0100 Subject: [PATCH 2/5] Moniroting of ups environmental temperature --- roles/prometheus/templates/prometheus/snmp.yml.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/prometheus/templates/prometheus/snmp.yml.j2 b/roles/prometheus/templates/prometheus/snmp.yml.j2 index 8757d79..e8849d8 100644 --- a/roles/prometheus/templates/prometheus/snmp.yml.j2 +++ b/roles/prometheus/templates/prometheus/snmp.yml.j2 @@ -68,9 +68,10 @@ eatonups: - labelname: upsOutputLineIndex type: gauge - name: xupsEnvRemoteTemp - oid: 1.3.6.1.4.1.534.1.6.5 +# oid: 1.3.6.1.4.1.534.1.6.5 + oid: 1.3.6.1.4.1.318.1.1.10.2.3.2.1.4 type: gauge - help: The reading of an EMP's temperature sensor. - 1.3.6.1.4.1.534.1.6.5 + help: The reading of an EMP's temperature sensor. - 1.3.6.1.4.1.318.1.1.10.2.3.2.1.4 - name: xupsEnvRemoteHumidity oid: 1.3.6.1.4.1.534.1.6.6 type: gauge From ba4db4a835872c1c5352f014601650ab89f1b928 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Wed, 10 Mar 2021 12:58:51 +0100 Subject: [PATCH 3/5] Fix undefined variable --- monitoring.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monitoring.yml b/monitoring.yml index 852f30e..76ef704 100755 --- a/monitoring.yml +++ b/monitoring.yml @@ -4,6 +4,7 @@ vars: prometheus_alertmanager: docker-ovh.adm.auro.re:9093 snmp_unifi_password: "{{ vault_snmp_unifi_password }}" + snmp_switch_community: "{{ vault_snmp_switch_community }}" # Prometheus targets.json prometheus_targets: @@ -18,6 +19,7 @@ vars: prometheus_alertmanager: docker-ovh.adm.auro.re:9093 snmp_unifi_password: "{{ vault_snmp_unifi_password }}" + snmp_switch_community: "{{ vault_snmp_switch_community }}" # Prometheus targets.json prometheus_targets: @@ -35,6 +37,7 @@ vars: prometheus_alertmanager: docker-ovh.adm.auro.re:9093 snmp_unifi_password: "{{ vault_snmp_unifi_password }}" + snmp_switch_community: "{{ vault_snmp_switch_community }}" # Prometheus targets.json prometheus_ups_snmp_targets: @@ -53,6 +56,7 @@ vars: prometheus_alertmanager: docker-ovh.adm.auro.re:9093 snmp_unifi_password: "{{ vault_snmp_unifi_password }}" + snmp_switch_community: "{{ vault_snmp_switch_community }}" # Prometheus targets.json prometheus_targets: @@ -69,6 +73,7 @@ vars: prometheus_alertmanager: docker-ovh.adm.auro.re:9093 snmp_unifi_password: "{{ vault_snmp_unifi_password }}" + snmp_switch_community: "{{ vault_snmp_switch_community }}" # Prometheus targets.json prometheus_ups_snmp_targets: From d233fc2759559c3245cad2e7b10f75b232181426 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Thu, 11 Mar 2021 13:23:15 +0100 Subject: [PATCH 4/5] Update of threesold for warning battery --- monitoring.yml | 1 + roles/prometheus/templates/prometheus/alert.rules.yml.j2 | 2 +- roles/prometheus/templates/prometheus/snmp.yml.j2 | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/monitoring.yml b/monitoring.yml index 76ef704..8d25fbf 100755 --- a/monitoring.yml +++ b/monitoring.yml @@ -107,6 +107,7 @@ vars: prometheus_alertmanager: docker-ovh.adm.auro.re:9093 snmp_unifi_password: "{{ vault_snmp_unifi_password }}" + snmp_switch_community: "{{ vault_snmp_switch_community }}" # Prometheus targets.json prometheus_targets: diff --git a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 index 028d5d0..bf4127b 100644 --- a/roles/prometheus/templates/prometheus/alert.rules.yml.j2 +++ b/roles/prometheus/templates/prometheus/alert.rules.yml.j2 @@ -119,7 +119,7 @@ groups: summary: "La tension de sortie de {{ $labels.instance }} est de {{ $value }}V." - alert: UpsTimeRemainingWarning - expr: upsEstimatedMinutesRemaining < 15 + expr: upsEstimatedMinutesRemaining < 8 for: 1m labels: severity: warning diff --git a/roles/prometheus/templates/prometheus/snmp.yml.j2 b/roles/prometheus/templates/prometheus/snmp.yml.j2 index e8849d8..7f543db 100644 --- a/roles/prometheus/templates/prometheus/snmp.yml.j2 +++ b/roles/prometheus/templates/prometheus/snmp.yml.j2 @@ -14,6 +14,7 @@ eatonups: - 1.3.6.1.2.1.33.1.3 - 1.3.6.1.2.1.33.1.4 - 1.3.6.1.4.1.534.1.6 + - 1.3.6.1.4.1.318.1.1.10.2.3.2.1.4 get: - 1.3.6.1.2.1.1.3.0 metrics: From a64864150fb7a06d5c4dafa29d6c5f2b09ec7781 Mon Sep 17 00:00:00 2001 From: pz2891 Date: Thu, 11 Mar 2021 13:33:03 +0100 Subject: [PATCH 5/5] Remove services-web from hosts --- hosts | 1 - 1 file changed, 1 deletion(-) diff --git a/hosts b/hosts index 7cf9128..ba53414 100644 --- a/hosts +++ b/hosts @@ -31,7 +31,6 @@ re2o-ldap.adm.auro.re re2o-db.adm.auro.re services-bdd-local.adm.auro.re backup.adm.auro.re -services-web.adm.auro.re mail.adm.auro.re wikijs.adm.auro.re prometheus-aurore.adm.auro.re