Skip to content

Instantly share code, notes, and snippets.

@O1ahmad
Last active February 18, 2021 00:52
Show Gist options
  • Save O1ahmad/0794540fc3fa530236113dd585c91d67 to your computer and use it in GitHub Desktop.
Save O1ahmad/0794540fc3fa530236113dd585c91d67 to your computer and use it in GitHub Desktop.
Mina example rendered alert configs
rendered_alerts_config =
# $: rule_filter - filter for subset of testnets to include in rule alert search space
# $: alerting_timeframe - range of time to inspect for alert rule violations
namespace: testnet-alerts
groups:
- name: Critical Alerts
rules:
- alert: BlockProductionStopped
expr: avg by (testnet) (increase(Coda_Transition_frontier_max_blocklength_observed {testnet=~"testworld|.+"} [1h])) < 1
labels:
testnet: "{{ $labels.testnet }}"
severity: critical
annotations:
summary: "{{ $labels.testnet }} block production is critically low"
description: "Zero blocks have been produced on testnet {{ $labels.testnet }}."
- alert: LowPeerCount
expr: avg by (testnet) (max_over_time(Coda_Network_peers {testnet=~"testworld|.+"} [1h])) < 1
labels:
testnet: "{{ $labels.testnet }}"
severity: critical
annotations:
summary: "{{ $labels.testnet }} avg. peer count is critically low"
description: "Critically low peer count on testnet {{ $labels.testnet }}."
- name: Warnings
rules:
- alert: HighBlockGossipLatency
expr: avg by (testnet) (max_over_time(Coda_Block_latency_gossip_time {testnet=~"testworld|.+"} [1h])) > 200
labels:
testnet: "{{ $labels.testnet }}"
severity: warning
annotations:
summary: "{{ $labels.testnet }} block gossip latency is high"
description: "High block gossip latency (ms) within {{ $labels.testnet }} testnet."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment