Skip to content

Instantly share code, notes, and snippets.

@tasdikrahman
Created April 22, 2020 14:38
Show Gist options
  • Save tasdikrahman/26ac5d37a86a9360d4c361226308017b to your computer and use it in GitHub Desktop.
Save tasdikrahman/26ac5d37a86a9360d4c361226308017b to your computer and use it in GitHub Desktop.
groups:
- name: etcd
rules:
- alert: EtcdLeader
expr: |
max(etcd_server_has_leader_gauge{environment="production"}) < 1
for: 3m
labels:
severity: critical
annotations:
summary: "etcd Leader Alert"
description: "Etcd in {{ $labels.environment }} doesnt have leader"
- alert: EtcdDB
expr: |
etcd_mvcc_db_total_size_in_bytes_gauge{environment="production"} >= 1999900000
for: 1m
labels:
severity: critical
annotations:
summary: "etcd db size"
description: "Etcd in {{ $labels.environment }} db has almost exceeded 2GB"
- alert: EtcdProcess
expr: |
procstat_lookup_running{exe="etcd",environment="production"} < 1
for: 1m
labels:
severity: critical
annotations:
summary: "etcd process is down"
description: "Etcd in {{ $labels.environment }} is down"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment