Skip to content

Commit

Permalink
feat: Add rules for Graph Node (#387)
Browse files Browse the repository at this point in the history
Co-authored-by: josedev-union <josedev-union@users.noreply.github.com>
  • Loading branch information
josedev-union and josedev-union authored Jan 20, 2024
1 parent 31a27fb commit c6ff5a5
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Collection available here: **[https://samber.github.io/awesome-prometheus-alerts
- [Promtail](https://samber.github.io/awesome-prometheus-alerts/rules#promtail)
- [Cortex](https://samber.github.io/awesome-prometheus-alerts/rules#cortex)
- [Jenkins](https://samber.github.io/awesome-prometheus-alerts/rules#jenkins)
- [Graph Node](https://samber.github.io/awesome-prometheus-alerts/rules#graph-node)

## 🤝 Contributing

Expand Down
30 changes: 30 additions & 0 deletions _data/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2819,3 +2819,33 @@ groups:
description: UPS load is > 80%
query: 'apcupsd_ups_load_percent > 80'
severity: warning

- name: Graph Node
exporters:
- name: Embedded exporter
slug: embedded-exporter
rules:
- name: Provider failed because net_version failed
description: "Failed net_version for Provider `{{$labels.provider}}` in Graph node `{{$labels.instance}}`"
query: 'eth_rpc_status == 1'
severity: critical
- name: Provider failed because get genesis failed
description: "Failed to get genesis for Provider `{{$labels.provider}}` in Graph node `{{$labels.instance}}`"
query: 'eth_rpc_status == 2'
severity: critical
- name: Provider failed because net_version timeout
description: "net_version timeout for Provider `{{$labels.provider}}` in Graph node `{{$labels.instance}}`"
query: 'eth_rpc_status == 3'
severity: critical
- name: Provider failed because get genesis timeout
description: "Timeout to get genesis for Provider `{{$labels.provider}}` in Graph node `{{$labels.instance}}`"
query: 'eth_rpc_status == 4'
severity: critical
- name: Store connection is too slow
description: "Store connection is too slow to `{{$labels.pool}}` pool, `{{$labels.shard}}` shard in Graph node `{{$labels.instance}}`"
query: 'store_connection_wait_time_ms > 10'
severity: warning
- name: Store connection is too slow
description: "Store connection is too slow to `{{$labels.pool}}` pool, `{{$labels.shard}}` shard in Graph node `{{$labels.instance}}`"
query: 'store_connection_wait_time_ms > 20'
severity: critical
59 changes: 59 additions & 0 deletions dist/rules/graph-node/embedded-exporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
groups:

- name: EmbeddedExporter

rules:

- alert: ProviderNetVersionFailed
expr: 'eth_rpc_status == 1'
for: 0m
labels:
severity: critical
annotations:
summary: Provider net_version failed (provider {{$labels.provider}}, node {{$labels.instance}})
description: "Failed net_version for Provider {{$labels.provider}} in Graph node {{$labels.instance}}"

- alert: ProviderGetGenesisFailed
expr: 'eth_rpc_status == 2'
for: 0m
labels:
severity: critical
annotations:
summary: Provider get genesis failed (provider {{$labels.provider}}, node {{$labels.instance}})
description: "Failed to get genesis for Provider {{$labels.provider}} in Graph node {{$labels.instance}}"

- alert: ProviderNetVersionTimeout
expr: 'eth_rpc_status == 3'
for: 0m
labels:
severity: critical
annotations:
summary: Provider net_version timeout (provider {{$labels.provider}}, node {{$labels.instance}})
description: "net_version timeout for Provider {{$labels.provider}} in Graph node {{$labels.instance}}"

- alert: ProviderGetGenesisTimeout
expr: 'eth_rpc_status == 4'
for: 0m
labels:
severity: critical
annotations:
summary: Provider get genesis timeout (provider {{$labels.provider}}, node {{$labels.instance}})
description: "Timeout to get genesis for Provider {{$labels.provider}} in Graph node {{$labels.instance}}"

- alert: StoreConnectionSlow
expr: 'store_connection_wait_time_ms > 10'
for: 1m
labels:
severity: warning
annotations:
summary: Store connection is slow (pool {{$labels.pool}}, shard {{$labels.shard}}, node {{$labels.instance}})
description: "Store connection is slow to {{$labels.pool}} pool, {{$labels.shard}} shard in Graph node {{$labels.instance}}"

- alert: StoreConnectionTooSlow
expr: 'store_connection_wait_time_ms > 20'
for: 1m
labels:
severity: critical
annotations:
summary: Store connection is too slow (pool {{$labels.pool}}, shard {{$labels.shard}}, node {{$labels.instance}})
description: "Store connection is too slow to {{$labels.pool}} pool, {{$labels.shard}} shard in Graph node {{$labels.instance}}"

0 comments on commit c6ff5a5

Please sign in to comment.