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

HAproxy: add instance label to sums #406

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matejzero
Copy link

At the moment summaries do not report instance for which the alert is triggered, because we sum only by proxy label and all the rest are stripped.

Example:

      - alert: HaproxyFrontendSecurityBlockedRequests
        expr: sum by (proxy) (rate(haproxy_frontend_denied_connections_total[2m])) > 10
        for: 2m
        labels:
          severity: warning
        annotations:
          summary: HAProxy frontend security blocked requests (instance {{ $labels.instance }})
          description: "HAProxy is blocking requests for security reason\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"

This PR adds instance label to all sums, so we get the instance label too.

@samber
Copy link
Owner

samber commented May 14, 2024

IMO, some queries should be aggregated over your haproxy instances.

For example, if I have a setup of 2 LB, proxying request to an API, I would track the rate of 4xx errors globally. Not at the instance level.

Can you explain this contrib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants