This commit is contained in:
parent
40fa56e9a0
commit
45acb9f5c7
@ -52,6 +52,8 @@
|
||||
with_items:
|
||||
- src: config.json
|
||||
dest: /var/lib/alerta/config.json
|
||||
- src: email.tmpl
|
||||
dest: /var/lib/alerta/email.tmpl
|
||||
|
||||
- name: Copy over the /app/ configurations
|
||||
become: true
|
||||
@ -71,6 +73,7 @@
|
||||
dokku_storage:
|
||||
app: alerta
|
||||
mounts:
|
||||
- /var/lib/alerta/email.tmpl:/app/email.tmpl
|
||||
- /var/lib/alerta/alerta.conf:/app/alerta.conf
|
||||
- /var/lib/alerta/alertad.conf:/app/alertad.conf
|
||||
- /var/lib/alerta/config.json:/web/config.json
|
||||
|
@ -16,6 +16,7 @@ email_type = text
|
||||
endpoint = http://localhost:8080/api
|
||||
key = {{ alerta_mailer_api_key }}
|
||||
mail_from = {{ mail_from }}
|
||||
mail_template = /app/email.tmpl
|
||||
mail_to = {{ mail_to }}
|
||||
skip_mta = False
|
||||
smtp_host = {{ smtp_host }}
|
||||
|
34
ansible/templates/email.tmpl
Normal file
34
ansible/templates/email.tmpl
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
------------------------------------------------------------
|
||||
[{{ alert.status|title }}] {{ alert.environment }}: {{ alert.severity|title }} {{ alert.event }} on {{ alert.service|join(', ') }} {{ alert.resource }}
|
||||
------------------------------------------------------------
|
||||
|
||||
Alert ID: {{ alert.id }}
|
||||
Create Time: {{ alert.create_time }}
|
||||
Environment: {{ alert.environment }}
|
||||
Services: {{ alert.service|join(', ') }}
|
||||
Resource: {{ alert.resource }}
|
||||
Event: {{ alert.event }}
|
||||
Group: {{ alert.group }}
|
||||
Value: {{ alert.value }}
|
||||
Severity: {{ alert.previous_severity|title}} -> {{ alert.severity|title }}
|
||||
Status: {{ alert.status|title }}
|
||||
Text: {{ alert.text }}
|
||||
Duplicate Count: {{ alert.duplicate_count }}
|
||||
Origin: {{ alert.origin }}
|
||||
Tags: {{ alert.tags|join(', ') }}
|
||||
{% for key,value in alert.attributes.items() -%}
|
||||
{{ key|title }}: {{ value }}
|
||||
{% endfor -%}
|
||||
|
||||
{% if alert.raw_data %}
|
||||
Raw Data
|
||||
{{ alert.raw_data }}
|
||||
{% endif %}
|
||||
|
||||
Comrades! To Arms!
|
||||
|
||||
To acknowledge this alert visit this URL:
|
||||
{{ dashboard_url }}/#/alert/{{ alert.id }}
|
||||
|
||||
Generated by {{ program }} on {{ hostname }} at {{ now }}
|
Reference in New Issue
Block a user