Skip to content

Commit

Permalink
rule_config.yml.j2: include the alert name and severity in the subject
Browse files Browse the repository at this point in the history
Aggregate by an alert name and the severity (before that was only by severity)
and then include both an alert name and its severity in the corresponding email
subject.

As a result for tooManyFiles alert with a 'warn' severity a subject is going to
look like this:

[PRODUCTION] tooManyFiles warn: URGENT Managed-Services - Cluster:cluster-name-goes-here

Signed-off-by: Vlad Zolotarov <[email protected]>
  • Loading branch information
vladzcloudius committed Dec 18, 2023
1 parent 17a136d commit f846330
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ansible-scylla-monitoring/templates/rule_config.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ receivers:
auth_password: {{ alerts_sender_password }}
send_resolved: false
headers:
Subject: '[PRODUCTION] NORMAL Managed-Services - Cluster:{{ scylla_cluster_name }}'
Subject: '[PRODUCTION] {{ '{{ .CommonLabels.alertname }}' }} {{ '{{ .CommonLabels.severity }}' }}: NORMAL Managed-Services - Cluster:{{ scylla_cluster_name }}'
- name: team-X-mails-urgent
email_configs:
- to: {{ alerts_receiver_email }}
Expand All @@ -61,9 +61,9 @@ receivers:
auth_password: {{ alerts_sender_password }}
send_resolved: false
headers:
Subject: '[PRODUCTION] URGENT Managed-Services - Cluster:{{ scylla_cluster_name }}'
Subject: '[PRODUCTION] {{ '{{ .CommonLabels.alertname }}' }} {{ '{{ .CommonLabels.severity }}' }}: URGENT Managed-Services - Cluster:{{ scylla_cluster_name }}'
route:
group_by: ['severity']
group_by: [alertname, 'severity']
group_interval: 5m
group_wait: 30s
repeat_interval: 6h
Expand Down

0 comments on commit f846330

Please sign in to comment.