Skip to content

Commit

Permalink
Fix HaproxyBackendMaxActiveSession: look at current / limit (#413)
Browse files Browse the repository at this point in the history
haproxy_backend_max_sessions is the maximum number of sessions ever encountered during the lifetime of the HAProxy process. That is, it will never go down until HAProxy is restarted, so the alert continues to fire even though the situation has cleared!

This doesn't make sense. Look at the currently active sessions instead.
  • Loading branch information
fschlich authored May 13, 2024
1 parent 613401a commit 396083a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _data/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ groups:
severity: critical
- name: HAProxy backend max active session
description: HAproxy backend {{ $labels.fqdn }}/{{ $labels.backend }} is reaching session limit (> 80%).
query: "((sum by (backend) (avg_over_time(haproxy_backend_max_sessions[2m]) * 100) / sum by (backend) (avg_over_time(haproxy_backend_limit_sessions[2m])))) > 80"
query: "((sum by (backend) (avg_over_time(haproxy_backend_current_sessions[2m]) * 100) / sum by (backend) (avg_over_time(haproxy_backend_limit_sessions[2m])))) > 80"
severity: warning
for: 2m
- name: HAProxy pending requests
Expand Down

0 comments on commit 396083a

Please sign in to comment.