Commit 7ef80e39 authored by S M Y's avatar S M Y Committed by rjshrjndrn
Browse files

Give custom Alertrules Subject and meaningful message

Showing with 5 additions and 5 deletions
+5 -5
......@@ -35,15 +35,15 @@ receivers:
api_url: "{{ monitor_alerts_slack_url }}"
username: 'Monitor - Alerter'
channel: "{{ monitor_alerts_slack_channel }}"
text: "Instances: {% raw %}{{range .Alerts}}\n{{.Labels.nodename}} : {{.Annotations.description}}{{end}}{% endraw %}"
text: "[{{ env }}-{{cluster_name}}]: {% raw %}{{range .Alerts}} {{.Annotations.description}}{{end}}{% endraw %}"
icon_emoji: ':dart:'
{% for item in service_teams %}
# Dummy comment line to ensure yaml generated from ansible template has proper indentation
# comment line to ensure yaml generated from ansible template has proper indentation
- name: "{{ item.team }}"
email_configs:
- send_resolved: true
to: '{{ item.alerts_mailing_list }}'
html: '{% raw %}{{ template "email.default.html" . }}{% endraw %}'
headers:
subject: '[{{ env }}] {% raw %}{{ template "email.default.subject" . }}{% endraw %}'
subject: '[{{ env }}-{{cluster_name}}] {{ .GroupLabels.alertname }}'
{% endfor %}
......@@ -36,7 +36,7 @@ receivers:
api_url: "{{ monitor_alerts_slack_url }}"
username: 'Monitor - Alerter'
channel: "{{ monitor_alerts_slack_channel }}"
text: "[{{ env }}-{{cluster_name}}]: {% raw %}{{range .Alerts}} : {{.Annotations.description}}{{end}}{% endraw %}"
text: "[{{ env }}-{{cluster_name}}]: {% raw %}{{range .Alerts}} {{.Annotations.description}}{{end}}{% endraw %}"
icon_emoji: ':dart:'
{% for item in service_teams %}
# comment line to ensure yaml generated from ansible template has proper indentation
......@@ -46,5 +46,5 @@ receivers:
to: '{{ item.alerts_mailing_list }}'
html: '{% raw %}{{ template "email.default.html" . }}{% endraw %}'
headers:
subject: '[{{ env }}-{{cluster_name}}] {{range .Alerts}} : {{.Annotations.summary}}{{end}}'
subject: '[{{ env }}-{{cluster_name}}] {{ .GroupLabels.alertname }}'
{% endfor %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment