From 11db8a461a61c0aba4259c9a3564d0e72bacc412 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 6 Apr 2023 20:45:27 +0100 Subject: [PATCH 1/1] Add alerts for site power usage in Amsterdam and Dublin --- .../templates/default/alert_rules.yml.erb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index c34647330..8f2986e6a 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -17,6 +17,13 @@ groups: alertgroup: "amsterdam" annotations: current: "{{ $value | humanize }}A" + - alert: site power + expr: sum(rPDU2PhaseStatusApparentPower{site="amsterdam",rPDU2PhaseStatusIndex="1"} / 100) > 3 + for: 0m + labels: + alertgroup: "amsterdam" + annotations: + current: "{{ $value | humanize }}kVA" - alert: site temperature expr: min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 > 26 for: 6m @@ -130,6 +137,13 @@ groups: alertgroup: "dublin" annotations: current: "{{ $value | humanize }}A" + - alert: site power + expr: sum(rPDU2PhaseStatusApparentPower{site="dublin",rPDU2PhaseStatusIndex="1"} / 100) > 4 + for: 0m + labels: + alertgroup: "dublin" + annotations: + current: "{{ $value | humanize }}kVA" - alert: site temperature expr: min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 > 26 for: 6m -- 2.39.5