diff --git a/dicos/70_prometheus.xml b/dicos/70_prometheus.xml
index 79352e6..ba4c1ad 100644
--- a/dicos/70_prometheus.xml
+++ b/dicos/70_prometheus.xml
@@ -9,9 +9,8 @@
alertmanager
grafana-server
- 80
- 443
9090
+ 9093
3000
@@ -90,6 +89,9 @@
+
+ non
+
non
@@ -191,6 +193,7 @@
non
alertes prometheus
alertmanager
+ alertmanager
diff --git a/tmpl/alertmanager.yml b/tmpl/alertmanager.yml
index ed36ed8..2565f45 100644
--- a/tmpl/alertmanager.yml
+++ b/tmpl/alertmanager.yml
@@ -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
diff --git a/tmpl/prometheus.yml b/tmpl/prometheus.yml
index 31de0c7..cea07be 100644
--- a/tmpl/prometheus.yml
+++ b/tmpl/prometheus.yml
@@ -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