-
Notifications
You must be signed in to change notification settings - Fork 15
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
Showing
12 changed files
with
135 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
groups: | ||
- name: Keys API. Initial keys update check | ||
rules: | ||
- alert: KeysApiOutdatedKeysEmptyDB | ||
expr: | | ||
(time() - process_start_time_seconds{}) >= 15 * 60 and (lido_keys_api_last_update_timestamp{} == 0) | ||
labels: | ||
severity: critical | ||
service: keys_api | ||
app_team: tooling | ||
annotations: | ||
summary: Keys are outdated | ||
description: 'Initial update took more than {{ $value | humanizeDuration }}' |
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,36 @@ | ||
rule_files: | ||
- 'keys-api-outdated-keys.empty-db.rule.yml' | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
# Test Case 1: Keys API not updated since process start | ||
- interval: 1m | ||
input_series: | ||
- series: 'process_start_time_seconds{}' | ||
values: '0x15' | ||
- series: 'lido_keys_api_last_update_timestamp{}' | ||
values: '0x15' | ||
alert_rule_test: | ||
- eval_time: 15m | ||
alertname: KeysApiOutdatedKeysEmptyDB | ||
exp_alerts: | ||
- exp_labels: | ||
severity: 'critical' | ||
service: 'keys_api' | ||
app_team: 'tooling' | ||
exp_annotations: | ||
summary: 'Keys are outdated' | ||
description: 'Initial update took more than 15m 0s' | ||
|
||
#Test Case 2: Keys API updated after process start | ||
- interval: 1m | ||
input_series: | ||
- series: 'process_start_time_seconds{}' | ||
values: '0x15' | ||
- series: 'lido_keys_api_last_update_timestamp{}' | ||
values: '0x12 0 0 1' | ||
alert_rule_test: | ||
- eval_time: 15m | ||
alertname: KeysApiOutdatedKeysEmptyDB | ||
exp_alerts: [] |
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,13 @@ | ||
groups: | ||
- name: Keys API. Update on non empty db | ||
rules: | ||
- alert: KeysApiOutdatedKeysNonEmptyDB | ||
expr: | | ||
(time() - lido_keys_api_last_update_timestamp{}) >= 10*60 and lido_keys_api_last_update_timestamp{} > 0 | ||
labels: | ||
severity: critical | ||
service: keys_api | ||
app_team: tooling | ||
annotations: | ||
summary: Keys are outdated | ||
description: 'Keys were not updated for more than {{ $value | humanizeDuration }}' |
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,32 @@ | ||
rule_files: | ||
- 'keys-api-outdated-keys.non-empty-db.rule.yml' | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
# Test Case 1: Keys API not updated for more than 10 minutes | ||
- interval: 1m | ||
input_series: | ||
- series: 'lido_keys_api_last_update_timestamp{}' | ||
values: '0x10 60' | ||
alert_rule_test: | ||
- eval_time: 11m | ||
alertname: KeysApiOutdatedKeysNonEmptyDB | ||
exp_alerts: | ||
- exp_labels: | ||
severity: 'critical' | ||
service: 'keys_api' | ||
app_team: 'tooling' | ||
exp_annotations: | ||
summary: 'Keys are outdated' | ||
description: 'Keys were not updated for more than 10m 0s' | ||
|
||
# Test Case 2: Keys API updated during 10 minutes | ||
- interval: 1m | ||
input_series: | ||
- series: 'lido_keys_api_last_update_timestamp{}' | ||
values: '60x10 61' | ||
alert_rule_test: | ||
- eval_time: 11m | ||
alertname: KeysApiOutdatedKeysNonEmptyDB | ||
exp_alerts: [] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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