Merge branch 'master' into dist/eole/2.6.2/master

This commit is contained in:
wpetit 2018-06-25 11:08:09 +02:00
commit eb7b7e48df
3 changed files with 16 additions and 8 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>

View File

@ -10,6 +10,7 @@ global:
smtp_smarthost: '%%exim_relay_smtp:465' smtp_smarthost: '%%exim_relay_smtp:465'
smtp_require_tls: true smtp_require_tls: true
%end if %end if
smtp_from: '%%system_mail_from'
%else %else
smtp_smarthost: '%%alSMTPHost:%%alSMTPPort' smtp_smarthost: '%%alSMTPHost:%%alSMTPPort'
smtp_from: '%%alFrom' smtp_from: '%%alFrom'
@ -31,8 +32,8 @@ global:
#hipchat_api_url: 'https://hipchat.foobar.org/' #hipchat_api_url: 'https://hipchat.foobar.org/'
# The directory from which notification templates are read. # The directory from which notification templates are read.
templates: templates:
- '/etc/alertmanager/template/*.tmpl' - '/etc/alertmanager/template/*.tmpl'
# The root route on which each incoming alert enters. # The root route on which each incoming alert enters.
route: route:
@ -54,12 +55,12 @@ route:
# If an alert has successfully been sent, wait 'repeat_interval' to # If an alert has successfully been sent, wait 'repeat_interval' to
# resend them. # resend them.
repeat_interval: 3h repeat_interval: 3h
# A default receiver # A default receiver
receiver: %%alDefaultReceiver receiver: %%alDefaultReceiver
# All the above attributes are inherited by all child routes and can # All the above attributes are inherited by all child routes and can
# overwritten on each. # overwritten on each.
# The child route trees. # The child route trees.
@ -119,7 +120,7 @@ route:
# Inhibition rules allow to mute a set of alerts given that another alert is # Inhibition rules allow to mute a set of alerts given that another alert is
# firing. # firing.
# We use this to mute any warning-level notifications if the same alert is # We use this to mute any warning-level notifications if the same alert is
# already critical. # already critical.
inhibit_rules: inhibit_rules:
- source_match: - source_match:

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