summaryrefslogtreecommitdiff
path: root/roles/monitoring/alerta/templates/alertad.conf.j2.j2
blob: cf0b24266fac8d059dd9218ba2a6becc4765f962 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DEBUG = {{ '{{' }} 'True' if env.DEBUG else 'False' {{ '}}' }}
SECRET = "{{ '{{' }} env.SECRET_KEY {{ '}}' }}"
ALERT_TIMEOUT = {{ alerta_alert_timeout }}
HEARTBEAT_TIMEOUT = {{ alerta_heartbeat_timeout }}
DEFAULT_ENVIRONMENT = '{{ alerta_default_environment }}'
ALLOWED_ENVIRONMENTS = ['{{ alerta_environments | join("', '") }}']
PLUGINS = ['{{ alerta_plugins | join("', '") }}']
{% if 'blackout' in alerta_plugins %}
NOTIFICATION_BLACKOUT = {{ 'True' if alerta_plugin_blackout.set_status else 'False' }}
BLACKOUT_ACCEPT = ['{{ alerta_plugin_blackout.accept | join("', '") }}']
{% endif %}
{% if 'heartbeat' in alerta_plugins %}
HEARTBEAT_EVENTS = ['{{ alerta_plugin_heartbeat.events | join("', '") }}']
{% endif %}
{% if 'prometheus' in alerta_plugins %}
{%   for opt, value in alerta_plugin_prometheus.items() %}
ALERTMANAGER_{{ opt | upper }} = {{ value }}
{%   endfor %}
{% endif %}
{% if 'amqp' in alerta_plugins %}
AMQP_URL = 'redis://localhost:6379/'
{% endif %}