summaryrefslogtreecommitdiff
path: root/roles/monitoring/alerta/templates/alertad.conf.j2.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/monitoring/alerta/templates/alertad.conf.j2.j2')
-rw-r--r--roles/monitoring/alerta/templates/alertad.conf.j2.j217
1 files changed, 8 insertions, 9 deletions
diff --git a/roles/monitoring/alerta/templates/alertad.conf.j2.j2 b/roles/monitoring/alerta/templates/alertad.conf.j2.j2
index 54089a76..b013f480 100644
--- a/roles/monitoring/alerta/templates/alertad.conf.j2.j2
+++ b/roles/monitoring/alerta/templates/alertad.conf.j2.j2
@@ -1,18 +1,17 @@
DEBUG = {{ '{{' }} 'True' if env.DEBUG else 'False' {{ '}}' }}
SECRET = "{{ '{{' }} env.SECRET_KEY {{ '}}' }}"
-ALERT_TIMEOUT = 86400
-HEARTBEAT_TIMEOUT = 7200
+ALERT_TIMEOUT = {{ alerta_alert_timeout }}
+HEARTBEAT_TIMEOUT = {{ alerta_heartbeat_timeout }}
+DEFAULT_ENVIRONMENT = '{{ alerta_default_environment }}'
+ALLOWED_ENVIRONMENTS = ['{{ alerta_environments | join("', '") }}']
PLUGINS = ['{{ alerta_plugins | join("', '") }}']
-DEFAULT_ENVIRONMENT = 'unknown'
-ALLOWED_ENVIRONMENTS = ['unknown', 'chaos-at-.*']
{% if 'heartbeat' in alerta_plugins %}
-HEARTBEAT_EVENTS = ['PrometheusAlertmanagerE2eDeadManSwitch']
+HEARTBEAT_EVENTS = ['{{ alerta_plugin_heartbeat.events | join("', '") }}']
{% endif %}
{% if 'prometheus' in alerta_plugins %}
-ALERTMANAGER_USERNAME = 'alerta'
-ALERTMANAGER_PASSWORD = 'alerta'
-ALERTMANAGER_SILENCE_FROM_ACK = True
-ALERTMANAGER_USE_EXTERNALURL_FOR_SILENCES = True
+{% for opt, value in alerta_plugin_prometheus.items() %}
+ALERTMANAGER_{{ opt | upper }} = {{ value }}
+{% endfor %}
{% endif %}
{% if 'amqp' in alerta_plugins %}
AMQP_URL = 'redis://localhost:6379/'