# zabbix monitoring for haproxy
# every userparameters here suppose that you have a stat file at "/run/haproxy/monitoring.sock"

# General info that don't need discovery, uses a cache file that is automatically refreshed if it is older than 1 minute
UserParameter=haproxy.info[*],/etc/zabbix/scripts/haproxy_info.sh $1

# discovery for FRONTEND, BACKEND and SERVERS, no cache
UserParameter=haproxy.discovery[*],/etc/zabbix/scripts/haproxy_discovery.sh $1

# return a specific stat for a specific pxname and svname, uses a cache file that is automatically refreshed if it is older than 1 minute
UserParameter=haproxy.stats[*],/etc/zabbix/scripts/haproxy_stat.py --pxname $1 --svname $2 --stat $3
