This Sensu plugin will perform on-demand monitoring of HAProxy instances. It will collect metrics in Prometheus format, emitting them on STDOUT. Additionally, it may perform analysis to determine the health of those instances, the results of which will be presented as one or more exit status levels.
The provided URL must be validated. If supplied, the TLS options must be validated.
Metrics
All metrics should be output in Prometheus format.
MVP to light up the Sumo Logic Dashboards:
Metrics:
haproxy_active_servers
haproxy_backup_servers
haproxy_bin
haproxy_bout
haproxy_chkfail
haproxy_ctime
haproxy_dreq
haproxy_dresp
haproxy_econ
haproxy_ereq
haproxy_eresp
haproxy_http_response_1xx
haproxy_http_response_2xx
haproxy_http_response_3xx
haproxy_http_response_4xx
haproxy_http_response_5xx
haproxy_http_response_other
haproxy_qcur
haproxy_qmax
haproxy_qtime
haproxy_rate
haproxy_rtime
haproxy_scur
haproxy_slim
haproxy_smax
haproxy_ttime
haproxy_weight
haproxy_wredis
haproxy_wretr
Tags:
proxy_cluster
host
type: proxy session type. one of frontend, backend, or server
proxy_system
component
proxy
sv: service name
NOTE: These are the tags/metrics that are seen within the Sumo Logic dashboards, which seem to be based on the Telegraf output. Probably the best place to start looking for details.
Overview
This Sensu plugin will perform on-demand monitoring of HAProxy instances. It will collect metrics in Prometheus format, emitting them on STDOUT. Additionally, it may perform analysis to determine the health of those instances, the results of which will be presented as one or more exit status levels.
References
Prior Art:
haproxy
plugin (Go, MIT License)haproxy
module (Python, Datadog License)Misc Docs:
Configuration
Required
--url
the url to the status endpoint, eg.http://<hostname>:<port>/<status_path>
(default: "unix:///run/haproxy/admin.sock")Optional Backends
--backends
comma-separated list of backends to fetch stats from. If not specified, all HAProxy backends will be included.Optional Basic Auth Credentials (will be used if specified)
--admin-user
admin username for basic auth--admin-pass
admin password for basic authOptional TLS Config (will be used if
tls=custom
parameter specified in server uri)--tls-ca
: Path the theca.pem
file.--tls-cert
: Path to thecert.pem
file.--tls-key
: Path to thekey.pem
file.--insecure-skip-verify
: Iftrue
, use TLS but skip chain & host verification (default:false
)NOTE: Datadog has an extensive range of options, which we might want to analyze for beyond-MVP support.
Configuration Logic & Validation
The provided URL must be validated. If supplied, the TLS options must be validated.
Metrics
All metrics should be output in Prometheus format.
MVP to light up the Sumo Logic Dashboards:
Metrics:
haproxy_active_servers
haproxy_backup_servers
haproxy_bin
haproxy_bout
haproxy_chkfail
haproxy_ctime
haproxy_dreq
haproxy_dresp
haproxy_econ
haproxy_ereq
haproxy_eresp
haproxy_http_response_1xx
haproxy_http_response_2xx
haproxy_http_response_3xx
haproxy_http_response_4xx
haproxy_http_response_5xx
haproxy_http_response_other
haproxy_qcur
haproxy_qmax
haproxy_qtime
haproxy_rate
haproxy_rtime
haproxy_scur
haproxy_slim
haproxy_smax
haproxy_ttime
haproxy_weight
haproxy_wredis
haproxy_wretr
Tags:
proxy_cluster
host
type
: proxy session type. one offrontend
,backend
, orserver
proxy_system
component
proxy
sv
: service nameNOTE: These are the tags/metrics that are seen within the Sumo Logic dashboards, which seem to be based on the Telegraf output. Probably the best place to start looking for details.
For parity w/ Datadog, here's the list of metrics they produce (also available in CSV format).
This metric name map might be useful: https://github.com/DataDog/integrations-core/blob/master/haproxy/datadog_checks/haproxy/metrics.py
Out of scope (for MVP):