Improving alerting configuration
This commit is contained in:
parent
5f263995d0
commit
4195adfa6e
|
@ -9,9 +9,8 @@
|
|||
<service>alertmanager</service>
|
||||
<service>grafana-server</service>
|
||||
<service_access service='prometheus'>
|
||||
<port service_accesslist="saLemon">80</port>
|
||||
<port service_accesslist="saLemon">443</port>
|
||||
<port service_accesslist="prometheus">9090</port>
|
||||
<port service_accesslist="alertmanager">9093</port>
|
||||
</service_access>
|
||||
<service_access service='grafana-server'>
|
||||
<port service_accesslist="grafana">3000</port>
|
||||
|
@ -90,6 +89,9 @@
|
|||
<variable name='alSMTPHost' type='string' description="Adresse du serveur SMTP pour l'envois des alertes"/>
|
||||
<variable name='alSMTPPort' type='string' description="Port d'écoute du serveur SMTP pour l'envois des alertes"/>
|
||||
<variable name='alFrom' type='string' description="Adresse d'origine des emails d'alerte"/>
|
||||
<variable name='alSMTPTLS' type='oui/non' description="Utiliser STARTTLS">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
<variable name='alSMTPAuth' type='oui/non' description="Authentification requise sur le serveur SMTP ?">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
|
@ -191,6 +193,7 @@
|
|||
<param>non</param>
|
||||
<target type='family'>alertes prometheus</target>
|
||||
<target type='filelist'>alertmanager</target>
|
||||
<target type='service_accesslist'>alertmanager</target>
|
||||
</condition>
|
||||
|
||||
<condition name='disabled_if_in' source='ajout_client_prometheus'>
|
||||
|
|
|
@ -5,6 +5,11 @@ global:
|
|||
%if %%getVar('alSMTPAuth','non') == 'oui'
|
||||
smtp_auth_username: '%%alSMTPUser'
|
||||
smtp_auth_password: 'alSMTPPass'
|
||||
%end if
|
||||
%ïf %%getVar('alSMTPTLS','non') == 'oui'
|
||||
smtp_require_tls: true
|
||||
%else
|
||||
smtp_require_tls: false
|
||||
%end if
|
||||
# The auth token for Hipchat.
|
||||
#hipchat_auth_token: '1234556789'
|
||||
|
@ -25,7 +30,7 @@ route:
|
|||
# When a new group of alerts is created by an incoming alert, wait at
|
||||
# least 'group_wait' to send the initial notification.
|
||||
# This way ensures that you get multiple alerts for the same group that start
|
||||
# firing shortly after another are batched together on the first
|
||||
# firing shortly after another are batched together on the first
|
||||
# notification.
|
||||
group_wait: 30s
|
||||
|
||||
|
|
|
@ -41,11 +41,11 @@ scrape_configs:
|
|||
]
|
||||
%end if
|
||||
|
||||
#alerting:
|
||||
# alertmanagers:
|
||||
# - scheme: https
|
||||
# static_configs:
|
||||
# - targets:
|
||||
# - "1.2.3.4:9093"
|
||||
# - "1.2.3.5:9093"
|
||||
# - "1.2.3.6:9093"
|
||||
%if %%getVar('activerAlertmanager','non') == 'oui'
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- "%%nom_domaine_machine:9093"
|
||||
%end if
|
||||
|
|
Loading…
Reference in New Issue