Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consul #160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions contents/Consul/Consul_Alertrules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
- alert: NoLeaderFound
expr: (COUNT by (consul_raft_state_leader == 1)) == 0
for: 1m
labels:
severity: critical
annotations:
summary: No Leader Found (instance {{ $labels.instance }})
description: "No Leader was found in the service"

- alert: ConsulUP
expr: (up{app="consul"}) == 0
for: 1m
labels:
severity: critical
annotations:
summary: Consul is down
description: "Consul service is not working"

- alert: HighCPUusage
expr: rate(process_cpu_seconds_total{instance="$consul"}[5m]) / 12 * 100 > 80
for: 5m
labels:
severity: warning
annotations:
summary: High CPU usage (instance {{ $labels.instance }})
description: "High CPU utilization > 80% for (instance {{ $labels.instance }})"

- alert: ServersUnhealthy
expr: consul_autopilot_healthy == 0
for: 1m
labels:
severity: warning
annotations:
summary: Consul Servers are Unhealthy (instance {{ $labels.instance }})
description: "AutoPilot is detecting unhealthy servers for (instance {{ $labels.instance }})"

consul_raft_leader_lastContact > 0


- alert: HighTimeCheckLease
expr: consul_raft_leader_lastContact > 200
for: 1m
labels:
severity: warning
annotations:
summary: Consul Servers are Unhealthy (instance {{ $labels.instance }})
description: "AutoPilot is detecting unhealthy servers for (instance {{ $labels.instance }})"


- alert: UnStableLeader
expr: rate(consul_raft_state_leader[5m]) > 5
for: 5m
labels:
severity: warning
annotations:
summary: Consul leader is not stable
description: "Leader is not stable different leaders are being elected"

- alert: ManyElections
expr: rate(consul_raft_state_candidate[5m]) > 5
for: 5m
labels:
severity: warning
annotations:
summary: Consul leader is not stable
description: "Leader is not stable elections are frequently happening"


- alert: HighCommitTime
expr: consul_raft_commitTime > 200
for: 1m
labels:
severity: warning
annotations:
summary: Taking too much time to commit
description: "Taking Too much time to commit updates"
Loading