summaryrefslogtreecommitdiff
path: root/roles/monitoring/alerta/templates/alerta.conf.j2.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-03-11 20:58:38 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-03-11 20:58:38 +0100
commit4930ff68c7d699611511aaabd2c2ebe585207051 (patch)
tree8f4ec6f7d588a9938138a65a470ad8c2d044e8ae /roles/monitoring/alerta/templates/alerta.conf.j2.j2
parentimprovements and fixes for alerta role (diff)
alerta: improve support for mailer
Diffstat (limited to 'roles/monitoring/alerta/templates/alerta.conf.j2.j2')
-rw-r--r--roles/monitoring/alerta/templates/alerta.conf.j2.j224
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/monitoring/alerta/templates/alerta.conf.j2.j2 b/roles/monitoring/alerta/templates/alerta.conf.j2.j2
new file mode 100644
index 00000000..66f5f14c
--- /dev/null
+++ b/roles/monitoring/alerta/templates/alerta.conf.j2.j2
@@ -0,0 +1,24 @@
+[DEFAULT]
+sslverify = no
+output = presto
+endpoint = http://localhost:8080/api
+timezone = Europe/London
+{{ '{%-' }} if env.API_KEY {{ '%}' }}
+key = {{ '{{' }} env.API_KEY {{ '}}' }}
+{{ '{%-' }} endif {{ '%}' }}
+debug = {{ '{{' }} 'yes' if env.DEBUG else 'no' {{ '}}' }}
+{% if alerta_mailer is defined %}
+
+[alerta-mailer]
+debug = {{ '{{' }} 'yes' if env.DEBUG else 'no' {{ '}}' }}
+{{ '{%-' }} if env.API_KEY {{ '%}' }}
+key = {{ '{{' }} env.API_KEY {{ '}}' }}
+{{ '{%-' }} endif {{ '%}' }}
+endpoint = http://localhost:8080/api
+amqp_url = redis://localhost:6379
+email_type: text
+mail_template: /app/email.tmpl
+{% for option, value in alerta_mailer.items() %}
+{{ option }} = {{ value }}
+{% endfor %}
+{% endif %}