Kepp federated datas 4 months (120 days)
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

pull/62/head
pz2891 3 years ago
parent f17e7f7524
commit cc3b4294ae

@ -41,6 +41,7 @@
- django.rules.yml
- ups.rules.yml
- postgres.rules.yml
- environmental.rules.yml
notify: Restart Prometheus
- name: Make Prometheus snmp-exporter listen on localhost only

@ -0,0 +1,52 @@
---
{{ ansible_managed | comment }}
{% macro raw(string) -%}
{{ "{{" }} {{ string }} {{ "}}" }}
{%- endmacro %}
groups:
- name: environmental.rules
rules:
- alert: EnvironmentalTemperature
expr: rPDU2SensorTempHumidityStatusTempC / 10 > 30
for: 10m
labels:
severity: warning
annotations:
summary: >-
Température environnementale à {{ raw('$value') }}°
- alert: EnvironmentalTemperature
expr: rPDU2SensorTempHumidityStatusTempC / 10 > 40
for: 10m
labels:
severity: critical
annotations:
summary: >-
Température environnementale à {{ raw('$value') }}°
- alert: EnvironmentalTemperature
expr: xupsEnvRemoteTemp > 30
for: 10m
labels:
severity: warning
annotations:
summary: >-
Température environnementale à {{ raw('$value') }}°
- alert: EnvironmentalTemperature
expr: xupsEnvRemoteTemp > 40
for: 10m
labels:
severity: critical
annotations:
summary: >-
Température environnementale à {{ raw('$value') }}°
...

@ -20,6 +20,13 @@
- alert.rules.yml
notify: Restart Prometheus
- name: Define Prometheus retention time
lineinfile:
path: /etc/default/prometheus
regexp: '^ARGS=\"--log.level=debug\"'
line: "ARGS=\"--log.level=debug --storage.tsdb.retention.time=120d\""
notify: Restart Prometheus
# We don't need to restart Prometheus when updating nodes
- name: Configure Prometheus Federate devices
copy:

Loading…
Cancel
Save