Skip to main content

Haproxy SNMP


HAProxy is an open source software allowing high availability, load balancing and proxying solutions for TCP and HTTP-based applications.

The Centreon Plugin Pack Haproxy SNMP aims to collect backend/frontend status and sessions and traffic statistics using the SNMP protcol.

Pack assets​

Monitored objects​

  • Frontend usage

  • Backend usage

Collected metrics & status​

Metric nameDescriptionUnit
statusFrontend status
frontend.sessions.current.countNumber of current sessionscount of total sessionscount frontend trafficb/s
frontend.traffic.out.bitpersecondOutgoing frontend trafficb/s


To use this pack, the SNMP service must be properly configured on your HAProxy server. HAProxy provides an official documentation to achieve this:


  1. Install the Centreon Plugin package on every Centreon poller expected to monitor HAProxy ressources:
yum install centreon-plugin-Applications-Haproxy-Snmp
  1. On the Centreon Web interface, install the Haproxy SNMP Centreon Plugin Pack on the "Configuration > Plugin Packs" page



  • Log into Centreon and add a new Host through "Configuration > Hosts".
  • Fill the "Name", "Alias" & "IP Address / DNS" fields according to your HAProxy Server settings
  • Select the Applications-Haproxy-Snmp-custom template to apply to the Host

I> When using SNMP v3, use the SNMPEXTRAOPTIONS Macro to add specific authentication parameters

More information in the Troubleshooting SNMP section.

SNMPEXTRAOPTIONSConfigure your own SNMPv3 credentials combo

How to check in the CLI that the configuration is OK and what are the main options for ?​

Once the plugin installed, log into your Centreon Poller CLI using the centreon-engine user account and test the Plugin by running the following command:

/usr/lib/centreon/plugins//  \
--plugin=apps::haproxy::snmp::plugin \
--mode=frontend-usage \
--hostname='' \
--snmp-version='2c' \
--snmp-community='my-snmp-community' \
--filter-name='' \
--warning-status='' \
--critical-status='%{status} !~ /OPEN/i' \
--warning-total-sessions='' \
--critical-total-sessions='' \
--warning-current-sessions='' \
--critical-current-sessions='' \
--warning-traffic-in='' \
--critical-traffic-in='' \
--warning-traffic-out='' \
--critical-traffic-out='' \
--verbose \

Expected command output is shown below:

OK : All frontends are ok | 'frontend.sessions.current.count'=9000;;;; ''=9000;;;; ''=9000b/s;;;; 'frontend.traffic.out.bitpersecond'=9000b/s;;;;

This command would trigger a CRITICAL alarm if the status of the frontend is different than 'OPEN' (--critical-status='%{status} !~ /OPEN/i').

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins//  \
--plugin=apps::haproxy::snmp::plugin \
--mode=frontend-usage \

All available options for a given mode can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins//  \
--plugin=apps::haproxy::snmp::plugin \


UNKNOWN: SNMP GET Request : Timeout​

If you get this message, you're probably facing one of theses issues:

  • Your SNMP server isn't started or misconfigured

  • An external device is blocking your request (firewall, ...)

UNKNOWN: SNMP GET Request : Cant get a single value.​

This message generally means that SNMP privileges are not wide enough for the mode/plugin to work properly.