Use existing labels for max active session alert

This commit is contained in:
Sofrony Pavel 2021-06-28 20:50:40 +03:00
parent 88ec5820c9
commit fdeedfd557
No known key found for this signature in database
GPG key ID: 680D71F08DDA644F

View file

@ -1279,9 +1279,9 @@ groups:
description: Too many connection errors to {{ $labels.server }} server (> 100 req/s). Request throughput may be to high. description: Too many connection errors to {{ $labels.server }} server (> 100 req/s). Request throughput may be to high.
query: (sum by (proxy) (rate(haproxy_server_connection_errors_total[1m]))) > 100 query: (sum by (proxy) (rate(haproxy_server_connection_errors_total[1m]))) > 100
severity: critical severity: critical
- name: HAProxy backend max active session - name: HAProxy backend max active session > 80%
description: HAproxy backend {{ $labels.fqdn }}/{{ $labels.backend }} is reaching session limit (> 80%). description: Session limit from backend {{ $labels.proxy }} to server {{ $labels.server }} reached 80% of limit - {{ $value | printf "%.2f"}}%
query: avg_over_time(((sum by (proxy) (haproxy_server_max_sessions)) / (sum by (proxy) (haproxy_server_limit_sessions))) [2m:]) * 100 > 80 query: ((haproxy_server_max_sessions >0) * 100) / (haproxy_server_limit_sessions > 0) > 80
severity: warning severity: warning
for: 2m for: 2m
- name: HAProxy pending requests - name: HAProxy pending requests