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
1 parent
68a393e
commit ac4951b
Showing
4 changed files
with
43 additions
and
3 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
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 |
---|---|---|
@@ -1,7 +1,39 @@ | ||
rule { | ||
# Disallow spaces in label/annotation keys, they're only allowed in values. | ||
reject ".* +.*" { | ||
label_keys = true | ||
annotation_keys = true | ||
} | ||
|
||
# Disallow URLs in labels, they should go to annotations. | ||
reject "https?://.+" { | ||
label_keys = true | ||
label_values = true | ||
} | ||
|
||
# Ensure that all aggregations are preserving mandatory labels. | ||
aggregate ".+" { | ||
severity = "bug" | ||
keep = ["cluster_id", "installation", "pipeline", "provider"] | ||
} | ||
} | ||
|
||
rule { | ||
# This block will apply to all alerting rules. | ||
match { | ||
kind = "alerting" | ||
} | ||
|
||
# Each alert must have a 'description' annotation. | ||
annotation "description" { | ||
severity = "bug" | ||
required = true | ||
} | ||
|
||
# Check how many times each alert would fire in the last 1d. | ||
alerts { | ||
range = "1d" | ||
step = "1m" | ||
resolve = "5m" | ||
} | ||
} |