-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #286 from kakkoyun/add_example_recording_rules
Add first Telemeter recording rules
- Loading branch information
Showing
4 changed files
with
37 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
prometheus+:: { | ||
recordingrules+: { | ||
groups+: [ | ||
{ | ||
name: 'telemeter.rules', | ||
rules: [ | ||
{ | ||
record: 'name_reason:cluster_operator_degraded:count', | ||
expr: ||| | ||
count by (name,reason) (cluster_operator_conditions{condition="Degraded"} == 1) | ||
|||, | ||
}, | ||
{ | ||
record: 'name_reason:cluster_operator_unavailable:count', | ||
expr: ||| | ||
count by (name,reason) (cluster_operator_conditions{condition="Available"} == 0) | ||
|||, | ||
}, | ||
{ | ||
record: 'id_code:apiserver_request_error_rate_sum:max', | ||
expr: ||| | ||
sort_desc(max by (_id,code) (code:apiserver_request_count:rate:sum{code=~"(4|5)\\d\\d"}) > 0.5) | ||
|||, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
} |