Add alerting prediction rules

This commit is contained in:
wpetit 2018-06-25 11:07:56 +02:00
parent a306f5ce19
commit dc43a0f26c
2 changed files with 10 additions and 3 deletions

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<creole> <creole>
<files> <files>
<file filelist='prometheus' name='/etc/default/prometheus' source='prometheus.defaults' mkdir='True' rm='True'/> <file filelist='prometheus' name='/etc/default/prometheus' source='prometheus.defaults' mkdir='True' rm='True'/>
<file filelist='prometheus' name='/etc/prometheus/prometheus.yml' mkdir='True' rm='True'/> <file filelist='prometheus' name='/etc/prometheus/prometheus.yml' mkdir='True' rm='True'/>
<file filelist='alertmanager' name='/etc/prometheus/alertmanager.yml' mkdir='True' rm='True'/> <file filelist='alertmanager' name='/etc/prometheus/alertmanager.yml' mkdir='True' rm='True'/>
<file filelist='alertmanager' name='/etc/prometheus/rules.d/alert-rules.yml' mkdir='True' rm='True'/> <file filelist='alertmanager' name='/etc/prometheus/rules.d/alert-rules.yml' mkdir='True' rm='True'/>
<file filelist='alertmanager' name='/etc/prometheus/rules.d/predict-rules.yml' mkdir='True' rm='True'/>
<file filelist='grafana' name='/etc/grafana/grafana.ini' mkdir='True' rm='True'/> <file filelist='grafana' name='/etc/grafana/grafana.ini' mkdir='True' rm='True'/>
<service>prometheus</service> <service>prometheus</service>
@ -147,7 +148,7 @@
<separators> <separators>
<separator name='activer_grafana'>Services complèmentairse</separator> <separator name='activer_grafana'>Services complèmentairse</separator>
<separator name='prometheusJobName'>Configuration du serveur Prometheus</separator> <separator name='prometheusJobName'>Configuration du serveur Prometheus</separator>
<separator name='job_name_node'>Configuration des jobs standards</separator> <separator name='job_name_node'>Configuration des jobs standards</separator>
<separator name='alSMTPHost'>Configuration SMTP pour l'envois des alertes</separator> <separator name='alSMTPHost'>Configuration SMTP pour l'envois des alertes</separator>
<separator name='alReceiver'>Destinatires</separator> <separator name='alReceiver'>Destinatires</separator>
<separator name='alRoute'>Rêgles de distribution simples</separator> <separator name='alRoute'>Rêgles de distribution simples</separator>

6
tmpl/predict-rules.yml Normal file
View File

@ -0,0 +1,6 @@
groups:
- name: PredictRules
rules:
- alert: disk_full_within_6_hours
expr: predict_linear(node_filesystem_free{job="%%{job_name_node}",mountpoint="/"}[1h], 6 * 3600) < 0
for: 5m