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

This commit is contained in:
Philippe Caseiro 2018-06-26 13:20:52 +02:00
commit 93666a8a3b
5 changed files with 34 additions and 21 deletions

View File

@ -5,6 +5,7 @@
<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>
@ -104,6 +105,7 @@
<variable name='grafana_auth_anonymous' type='string' description="Activer l'accès aux utilisateurs non enregistrés"> <variable name='grafana_auth_anonymous' type='string' description="Activer l'accès aux utilisateurs non enregistrés">
<value>false</value> <value>false</value>
</variable> </variable>
<variable name='grafanaRootURL' type='string' description='Url publique de grafana (avec http:// ou https://)' mode='expert'/>
</family> </family>
<family name="alertes prometheus"> <family name="alertes prometheus">

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'

View File

@ -40,11 +40,13 @@ domain = %%grafana_domain
# Redirect to correct domain if host header does not match domain # Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks # Prevents DNS rebinding attacks
;enforce_domain = false enforce_domain = true
# The full public facing url you use in browser, used for redirects and emails # The full public facing url you use in browser, used for redirects and emails
# If you use reverse proxy and sub path specify full url (with sub path) # If you use reverse proxy and sub path specify full url (with sub path)
;root_url = http://localhost:3000 %if %%is_empty('grafanaRootURL')
root_url = %%grafanaRootURL
%end if
# Log web requests # Log web requests
;router_logging = false ;router_logging = false
@ -299,18 +301,20 @@ enabled = %%grafana_auth_anonymous
#################################### SMTP / Emailing ########################## #################################### SMTP / Emailing ##########################
[smtp] [smtp]
;enabled = false %if %%getVar('activer_exim_relay_smtp','non') == 'oui'
;host = localhost:25 enabled = true
host = %%exim_relay_smtp:25
;user = ;user =
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;""" # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
;password = ;password =
;cert_file = ;cert_file =
;key_file = ;key_file =
;skip_verify = false skip_verify = true
;from_address = admin@grafana.localhost from_address = %%system_mail_from
;from_name = Grafana from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name) # EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com ;ehlo_identity = dashboard.example.com
%end if
[emails] [emails]
;welcome_email_on_sign_up = false ;welcome_email_on_sign_up = false

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

View File

@ -22,7 +22,7 @@ scrape_configs:
- job_name: '%%job_name_node' - job_name: '%%job_name_node'
file_sd_configs: file_sd_configs:
- files: [ "%%job_file_config/*.yml" ] # - files: [ "%%job_file_config/*.yml" ]
%if %%getVar('addTargetPrometheus','non') == 'oui' %if %%getVar('addTargetPrometheus','non') == 'oui'
static_configs: static_configs:
- targets: [ "%%adresse_ip_eth0:9100"%slurp - targets: [ "%%adresse_ip_eth0:9100"%slurp