-
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.
Merge pull request #57 from lidofinance/develop
Develop
- Loading branch information
Showing
49 changed files
with
2,799 additions
and
875 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
groups: | ||
- name: Keys API. Keys | ||
rules: | ||
- alert: KeysApiOutdatedKeys | ||
expr: time() - lido_keys_api_last_update_timestamp{} >= 5 * 60 | ||
labels: | ||
severity: warning | ||
app_team: tooling | ||
annotations: | ||
summary: Keys are outdated | ||
description: Keys were not updated for {{ $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,59 @@ | ||
rule_files: | ||
- keys-api-outdated-keys.rule.yml | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
# Outdated keys list. Outdated | ||
- interval: 5m | ||
input_series: | ||
- series: lido_keys_api_last_update_timestamp{} | ||
values: 0 0 0 400 | ||
alert_rule_test: | ||
- eval_time: 10m | ||
alertname: KeysApiOutdatedKeys | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Keys are outdated | ||
description: Keys were not updated for 10m 0s | ||
- eval_time: 15m | ||
alertname: KeysApiOutdatedKeys | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Keys are outdated | ||
description: Keys were not updated for 8m 20s | ||
|
||
#Outdated keys list. Up to date | ||
- interval: 5m | ||
input_series: | ||
- series: lido_keys_api_last_update_timestamp{} | ||
values: 0 300 600 601 | ||
alert_rule_test: | ||
- eval_time: 10m | ||
alertname: KeysApiOutdatedKeys | ||
exp_alerts: [] | ||
- eval_time: 15m | ||
alertname: KeysApiOutdatedKeys | ||
exp_alerts: [] | ||
|
||
# Outdated keys list. Initial start | ||
- interval: 10m | ||
input_series: | ||
- series: lido_keys_api_last_update_timestamp{} | ||
values: _ _ _ 1501 | ||
alert_rule_test: | ||
- eval_time: 10m | ||
alertname: KeysApiOutdatedKeys | ||
exp_alerts: [] | ||
- eval_time: 20m | ||
alertname: KeysApiOutdatedKeys | ||
exp_alerts: [] | ||
- eval_time: 30m | ||
alertname: KeysApiOutdatedKeys | ||
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,11 @@ | ||
groups: | ||
- name: Keys API. Validators | ||
rules: | ||
- alert: KeysApiOutdatedValidators | ||
expr: time() - lido_keys_api_validators_registry_last_update_block_timestamp{} >= 60 * 30 | ||
labels: | ||
severity: warning | ||
app_team: tooling | ||
annotations: | ||
summary: Validators are outdated | ||
description: Validators were not updated for {{ $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,56 @@ | ||
rule_files: | ||
- keys-api-outdated-validators.rule.yml | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
# Outdated validators list. Outdated | ||
- interval: 15m | ||
input_series: | ||
- series: lido_keys_api_validators_registry_last_update_block_timestamp{} | ||
values: 0 0 0 900 | ||
alert_rule_test: | ||
- eval_time: 30m | ||
alertname: KeysApiOutdatedValidators | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Validators are outdated | ||
description: Validators were not updated for 30m 0s | ||
- eval_time: 45m | ||
alertname: KeysApiOutdatedValidators | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Validators are outdated | ||
description: Validators were not updated for 30m 0s | ||
|
||
# Outdated validators list. Up to date | ||
- interval: 15m | ||
input_series: | ||
- series: lido_keys_api_validators_registry_last_update_block_timestamp{} | ||
values: 0 0 1 901 | ||
alert_rule_test: | ||
- eval_time: 30m | ||
alertname: KeysApiOutdatedValidators | ||
exp_alerts: [] | ||
- eval_time: 45m | ||
alertname: KeysApiOutdatedValidators | ||
exp_alerts: [] | ||
|
||
# Outdated validators list. Initial start | ||
- interval: 15m | ||
input_series: | ||
- series: lido_keys_api_validators_registry_last_update_block_timestamp{} | ||
values: _ _ _ 901 | ||
alert_rule_test: | ||
- eval_time: 30m | ||
alertname: KeysApiOutdatedValidators | ||
exp_alerts: [] | ||
- eval_time: 45m | ||
alertname: KeysApiOutdatedValidators | ||
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,20 @@ | ||
groups: | ||
- name: Keys API | ||
rules: | ||
- alert: KeysApiExecutionLayerRPCErrors | ||
expr: sum by (instance, project) (increase(el_rpc_requests_duration_seconds_count{result="error", service="lido-keys-api"}[5m])) > 40 | ||
labels: | ||
severity: warning | ||
app_team: tooling | ||
annotations: | ||
summary: Execution Layer RPC errors | ||
description: '{{ $value }} errors in the last 5 minutes appeared in EL RPC queries' | ||
|
||
- alert: KeysApiConsensusLayerAPIErrors | ||
expr: sum by (instance, project) (increase(cl_api_requests_duration_seconds_count{result="error", service="lido-keys-api"}[5m])) > 60 | ||
labels: | ||
severity: warning | ||
app_team: tooling | ||
annotations: | ||
summary: Consensus Layer API errors | ||
description: '{{ $value }} errors in the last 5 minutes appeared in CL API queries' |
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,61 @@ | ||
rule_files: | ||
- keys-api.rule.yml | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
# Execution Layer RPC errors | ||
- interval: 5m | ||
input_series: | ||
- series: el_rpc_requests_duration_seconds_count{result="error", service="lido-keys-api"} | ||
values: 10 70 111 151 | ||
alert_rule_test: | ||
- eval_time: 5m | ||
alertname: KeysApiExecutionLayerRPCErrors | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Execution Layer RPC errors | ||
description: 60 errors in the last 5 minutes appeared in EL RPC queries | ||
- eval_time: 10m | ||
alertname: KeysApiExecutionLayerRPCErrors | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Execution Layer RPC errors | ||
description: 41 errors in the last 5 minutes appeared in EL RPC queries | ||
- eval_time: 15m | ||
alertname: KeysApiExecutionLayerRPCErrors | ||
exp_alerts: [] | ||
|
||
# Consensus Layer API errors | ||
- interval: 5m | ||
input_series: | ||
- series: cl_api_requests_duration_seconds_count{result="error", service="lido-keys-api"} | ||
values: 0 61 152 212 | ||
alert_rule_test: | ||
- eval_time: 5m | ||
alertname: KeysApiConsensusLayerAPIErrors | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Consensus Layer API errors | ||
description: 61 errors in the last 5 minutes appeared in CL API queries | ||
- eval_time: 10m | ||
alertname: KeysApiConsensusLayerAPIErrors | ||
exp_alerts: | ||
- exp_labels: | ||
severity: warning | ||
app_team: tooling | ||
exp_annotations: | ||
summary: Consensus Layer API errors | ||
description: 91 errors in the last 5 minutes appeared in CL API queries | ||
- eval_time: 15m | ||
alertname: KeysApiConsensusLayerAPIErrors | ||
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,23 @@ | ||
version: '3.7' | ||
|
||
services: | ||
keys_api_prometheus: | ||
image: prom/prometheus:v2.17.2 | ||
container_name: keys_api_prometheus | ||
ports: | ||
- 9090:9090 | ||
volumes: | ||
- ./prometheus/:/etc/prometheus/ | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
|
||
keys_api_grafana: | ||
image: grafana/grafana-oss:9.1.5 | ||
container_name: keys_api_grafana | ||
restart: unless-stopped | ||
ports: | ||
- 8000:3000 | ||
volumes: | ||
- ./grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml | ||
depends_on: | ||
- keys_api_prometheus |
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,8 @@ | ||
# Ignore everything | ||
* | ||
|
||
# But not these files... | ||
!.gitignore | ||
!keys_api.json | ||
!datasources.yml | ||
!nodejs.json |
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,15 @@ | ||
apiVersion: 1 | ||
|
||
datasources: | ||
- name: Prometheus | ||
type: prometheus | ||
access: proxy | ||
orgId: 1 | ||
url: http://docker.for.mac.host.internal:9090 | ||
basicAuth: false | ||
isDefault: true | ||
editable: true | ||
jsonData: | ||
graphiteVersion: '1.1' | ||
tlsAuth: false | ||
tlsAuthWithCACert: false |
Oops, something went wrong.