Monitoring HAProxy

Configuration

Instana will automatically utilize the "stats socket" configured in HAProxy to read metrics from. Please enable it as described in the HAProxy documentation: https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#3.1-stats%20socket

Should you be running HAProxy in multi-process mode, you need to configure a "stats socket" for each process. If this is not done, the agent will log this message explaining how to do that:

Haproxy is detected to be in multi-process mode, but no process attribute is detected in the 'stats socket'
configuration.  To be able to properly monitor haproxy in multi-process mode, stats socket binding
should be defined per socket using the 'process' attribute.
E.g. 'stats socket /run/haproxy/admin1.sock mode 660 level admin process 1'

Note: The number of services (backends + frontends) being monitored is limited to 300.

Metrics collection

Configuration data

  • Version
  • Name
  • Start Time
  • Memory Limit
  • Ulimit (Max File Descriptors)
  • Sockets Limit
  • Connections Limit
  • Pipes Limit
  • Session Rate Limit
  • Frontends and Backends (up to 300)

Performance metrics

Frontends

Metric Description Granularity
Requests HTTP requests per second 1 second
Request Errors Number of request errors 1 second
Denied Requests Requests denied due to security concerns (ACL-restricted) 1 second
Sessions Number of sessions 1 second
Session Usage Current sessions / sessions limit 1 second
Client Errors Number of HTTP client errors 1 second
Server Errors Number of HTTP server errors 1 second
Traffic (Sent/Received) Number of bytes sent/received by the frontend 1 second

Backends

Metric Description Granularity
Average Response Time The average response time in ms over the 1024 last requests 1 second
Average Queue Time The average queue time in ms over the 1024 last requests 1 second
Queue Size Current queued requests 1 second
Connection Errors Number of requests that encountered an error trying to connect to a backend server 1 second
Connection Retries Number of times a connection was retried 1 second
Response Errors Responses denied because of security concerns 1 second
Denied Responses Responses denied due to security concerns (ACL-restricted) 1 second
Re-Dispatched Requests Number of times a request was redispatched to another server 1 second

Health Signatures

For each sensor, there is a curated knowledge base of health signatures that are evaluated continuously against the incoming metrics and are used to raise issues or incidents depending on user impact.

Built-in events trigger issues or incidents based on failing health signatures on entities, and custom events trigger issues or incidents based on the thresholds of an individual metric of any given entity.

For information about built-events for the HAProxy sensor, see the Built-in events reference.