The template to monitor HAProxy by Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.

The template collects metrics by polling the HAProxy stats page with Zabbix agent.

Note, that this template doesn't support authentication and redirects (limitations of 'web.page.get').

Setup:

1. Set up the HAProxy stats page:
https://www.haproxy.com/blog/exploring-the-haproxy-stats-page/

The example configuration of HAProxy:

frontend stats
    bind *:8404
    stats enable
    stats uri /stats
    stats refresh 10s

2. Set the hostname or IP address of the HAProxy stats host or container in the '{$HAPROXY.STATS.HOST}' macro. You can also change the status page port in the '{$HAPROXY.STATS.PORT}' macro, the status page scheme in the '{$HAPROXY.STATS.SCHEME}' macro and the status page path in the '{$HAPROXY.STATS.PATH}' macro if necessary.

You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/393527-discussion-thread-for-official-zabbix-template-haproxy

Generated by official Zabbix template tool "Templator"