Improving alerting configuration
This commit is contained in:
parent
5f263995d0
commit
4195adfa6e
|
@ -9,9 +9,8 @@
|
||||||
<service>alertmanager</service>
|
<service>alertmanager</service>
|
||||||
<service>grafana-server</service>
|
<service>grafana-server</service>
|
||||||
<service_access service='prometheus'>
|
<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="prometheus">9090</port>
|
||||||
|
<port service_accesslist="alertmanager">9093</port>
|
||||||
</service_access>
|
</service_access>
|
||||||
<service_access service='grafana-server'>
|
<service_access service='grafana-server'>
|
||||||
<port service_accesslist="grafana">3000</port>
|
<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='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='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='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 ?">
|
<variable name='alSMTPAuth' type='oui/non' description="Authentification requise sur le serveur SMTP ?">
|
||||||
<value>non</value>
|
<value>non</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
@ -191,6 +193,7 @@
|
||||||
<param>non</param>
|
<param>non</param>
|
||||||
<target type='family'>alertes prometheus</target>
|
<target type='family'>alertes prometheus</target>
|
||||||
<target type='filelist'>alertmanager</target>
|
<target type='filelist'>alertmanager</target>
|
||||||
|
<target type='service_accesslist'>alertmanager</target>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition name='disabled_if_in' source='ajout_client_prometheus'>
|
<condition name='disabled_if_in' source='ajout_client_prometheus'>
|
||||||
|
|
|
@ -5,6 +5,11 @@ global:
|
||||||
%if %%getVar('alSMTPAuth','non') == 'oui'
|
%if %%getVar('alSMTPAuth','non') == 'oui'
|
||||||
smtp_auth_username: '%%alSMTPUser'
|
smtp_auth_username: '%%alSMTPUser'
|
||||||
smtp_auth_password: 'alSMTPPass'
|
smtp_auth_password: 'alSMTPPass'
|
||||||
|
%end if
|
||||||
|
%ïf %%getVar('alSMTPTLS','non') == 'oui'
|
||||||
|
smtp_require_tls: true
|
||||||
|
%else
|
||||||
|
smtp_require_tls: false
|
||||||
%end if
|
%end if
|
||||||
# The auth token for Hipchat.
|
# The auth token for Hipchat.
|
||||||
#hipchat_auth_token: '1234556789'
|
#hipchat_auth_token: '1234556789'
|
||||||
|
|
|
@ -41,11 +41,11 @@ scrape_configs:
|
||||||
]
|
]
|
||||||
%end if
|
%end if
|
||||||
|
|
||||||
#alerting:
|
%if %%getVar('activerAlertmanager','non') == 'oui'
|
||||||
# alertmanagers:
|
alerting:
|
||||||
# - scheme: https
|
alertmanagers:
|
||||||
# static_configs:
|
- scheme: http
|
||||||
# - targets:
|
static_configs:
|
||||||
# - "1.2.3.4:9093"
|
- targets:
|
||||||
# - "1.2.3.5:9093"
|
- "%%nom_domaine_machine:9093"
|
||||||
# - "1.2.3.6:9093"
|
%end if
|
||||||
|
|
Loading…
Reference in New Issue