generated from giantswarm/template-app
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marie Roque
committed
Dec 19, 2023
1 parent
ab8c1e0
commit d78618d
Showing
3 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
rule_files: | ||
- alertmanager.rules.yml | ||
|
||
tests: | ||
- interval: 1m | ||
input_series: | ||
# after 1h, slack notification fails during 2h then works again (15m group_interval) => alert fires after 3 successive failures | ||
- series: 'alertmanager_notifications_failed_total{integration="slack"}' | ||
values: "0x60 1+0x15 2+0x15 3+0x15 4+0x15 5+0x15 6+0x15 7+0x15 8+0x15 8+0x120" | ||
# after 1h, slack notification fails 2 times during 30mn than works again => alert must not fires | ||
- series: 'alertmanager_notifications_failed_total{integration="webhook"}' | ||
values: "0x60 1+0x15 2+0x15 2+0x15 2+0x15 2+0x15 2+0x15 2+0x15 2+0x15 2+0x120" | ||
alert_rule_test: | ||
- alertname: AlertmanagerPageNotificationsFailing | ||
eval_time: 10m | ||
- alertname: AlertmanagerPageNotificationsFailing | ||
eval_time: 90m | ||
- alertname: AlertmanagerPageNotificationsFailing | ||
eval_time: 95m | ||
- alertname: AlertmanagerPageNotificationsFailing | ||
eval_time: 106m | ||
exp_alerts: | ||
- exp_labels: | ||
area: empowerment | ||
severity: page | ||
team: atlas | ||
topic: monitoring | ||
integration: slack | ||
cancel_if_outside_working_hours: "true" | ||
exp_annotations: | ||
description: "AlertManager slack notifications are failing." | ||
opsrecipe: alert-manager-notifications-failing/ | ||
- alertname: AlertmanagerPageNotificationsFailing | ||
eval_time: 240m | ||
- interval: 1m | ||
input_series: | ||
# after 1h, opsgenie notification fails during 45m then works again for 1h, finally fails 1 time (group_interval=15m) | ||
# => alert fires after 2 successive failures only | ||
- series: 'alertmanager_notifications_failed_total{integration="opsgenie"}' | ||
values: "0x60 1+0x15 2+0x15 2+0x15 2+0x60 3+0x15 3+0x60" | ||
alert_rule_test: | ||
- alertname: AlertmanagerNotifyNotificationsFailing | ||
eval_time: 10m | ||
- alertname: AlertmanagerNotifyNotificationsFailing | ||
eval_time: 75m | ||
- alertname: AlertmanagerNotifyNotificationsFailing | ||
eval_time: 91m | ||
exp_alerts: | ||
- exp_labels: | ||
area: empowerment | ||
severity: notify | ||
team: atlas | ||
topic: monitoring | ||
integration: opsgenie | ||
exp_annotations: | ||
description: "AlertManager opsgenie notifications are failing." | ||
opsrecipe: alert-manager-notifications-failing/ | ||
- alertname: AlertmanagerNotifyNotificationsFailing | ||
eval_time: 180m | ||
- alertname: AlertmanagerNotifyNotificationsFailing | ||
eval_time: 210m |