HAProxy ALOHA Load Balancer monitoring through SNMP

Synopsis

A load-balancer is one of the key point in an architecture. It can be used to gather information about health of the whole platform.

The ALOHA Load-Balancer can provide many information about server health, farm capacity, sessions and errors, etc…

Configuration

Enabling SNMPd in the ALOHA

During the wizard

When running the wizard, you configure the SNMP daemon at the step #7, also called Management.

aloha_load_balancer_appnotes_0056_aloha_monitoring_through_snmp_en_2

In order to enable the SNMP daemon, just:

  • Check the box Enable SNMP

  • Choose the Address and port to listen on for SNMP requests

  • Specify which network is allowed to request ALOHA’s SNMP daemon

  • Type a Community

On a running ALOHA

If your ALOHA Load-Balancer is already setup and running with production traffic, you don’t want to run the wizard again. To configure SNMP daemon in that case, follow the instruction below:

  • In the ALOHA GUI, go in the Services tab

  • Click on the Edit icon from the snmpd line

  • Comment the line no autostart to allow SNMPd to start with

  • Configure snmpd as described in the next chapter

Don’t forget to start SNMPd by clicking on the start icon

SNMPd configuration

You can configure the following parameters:

  • network <network> : authorized network ( default: 0.0.0.0/0 )

  • community <text> : used community ( default: public )

  • listen <ip address> : listening ip address ( default: 0.0.0.0 )

  • port <integer> : listening port ( default: 161 )

ALOHA MIB

Getting the MIBs

ALOHA’s MIB is available on HAProxy Tecnologies website here.

Required third party MIBs are a also available from this URL

MIB installation (Linux)

Download all the required MIBs, unzip them and copy them in a directory on your Linux server.

In this example, we use /usr/src/mibs.

Edit the file /etc/snmp/snmp.conf, and add the path to the mibdirs directive:

mibdirs /usr/src/mibs:/usr/src/mibs/STD-MIBs
printNumericOids no
mibs ALL

MIB browsing

OS information

To get information related to Load-Balancing in the ALOHA, just run snmpwalk with the community and the IP address of your ALOHA, and ask for Exceliance’s OID branch: .1.3.6.1.4.1.23263

$ snmpwalk -v2c -c public 192.168.10.3 .1.3.6.1.4.1.23263 | head
EXCELIANCE-MIB::alProductName = STRING: "aloha "
EXCELIANCE-MIB::alProductModel = STRING: "albva"
EXCELIANCE-MIB::alProductVersion = STRING: "5.0"
EXCELIANCE-MIB::alProductSubVersion = STRING: "5.0.3"
EXCELIANCE-MIB::alProductBuildVersion = STRING: "5007"
EXCELIANCE-MIB::alProductBuildDate = STRING: "2012-06-11 18:01:10"
EXCELIANCE-MIB::alProductURL = STRING: "http://www.exceliance.fr/download/aloha/5.0"
EXCELIANCE-MIB::alServiceID.1 = INTEGER: 1
EXCELIANCE-MIB::alServiceID.2 = INTEGER: 2
EXCELIANCE-MIB::alServiceID.3 = INTEGER: 3

HAProxy configuration update

In the ALOHA Load-Balancer, each HAProxy’s frontend, backend, listen or server is an object. It owns an ID in HAProxy which is use by SNMPd has the OID. By Default, HAProxy affects IDs in the order the each object is read in the configuration, which means the ID, hence the OID, could change at any moment.

Fortunately, the ALOHA allows you to fix the IDs in HAProxy, so the OID in SNMPd will never change, making third party monitoring tools job easier.

To fix an ID in HAProxy, just add the directive id to each server, frontend, backend and listen.

this ID must be unique for frontend, backend and listen Server IDs must be unique in a backend or in a listen

HAProxy Configuration example:

frontend ft_redis
	id 1
	bind 192.168.10.2:6379
	mode tcp
	default_backend bk_redis

backend bk_redis
	id 101
	mode tcp
	option tcplog
	server redis1 192.168.10.11:6379 id 1 check maxconn 125
	server redis2 192.168.10.12:6379 id 2 check maxconn 125 backup

frontend ft_web
	id 2
	bind 192.168.10.2:80
	mode http
	default_backend bk_web

backend bk_web
	id 102
	mode http
	server web1 192.168.10.11:80 id 1 check maxconn 125
	server web2 192.168.10.12:80 id 2 check maxconn 125

From the example above, the ALOHA will provide the following OIDs:

  • redis related OIDs

    • Frontend name: .1.3.6.1.4.1.23263.4.2.1.3.2.1.3.1.1

    • Frontend status: .1.3.6.1.4.1.23263.4.2.1.3.2.1.13.1.1

    • Backend name: .1.3.6.1.4.1.23263.4.2.1.3.3.1.3.1.101

    • Backend status: .1.3.6.1.4.1.23263.4.2.1.3.3.1.20.1.101

    • Server redis1 name: .1.3.6.1.4.1.23263.4.2.1.3.4.1.4.1.101.1

    • Server redis2 name: .1.3.6.1.4.1.23263.4.2.1.3.4.1.4.1.101.2

  • web related OIDs

    • Frontend name: .1.3.6.1.4.1.23263.4.2.1.3.2.1.3.1.2

    • Frontend status: .1.3.6.1.4.1.23263.4.2.1.3.2.1.13.1.2

    • Backend name: .1.3.6.1.4.1.23263.4.2.1.3.3.1.3.1.102

    • Backend status: .1.3.6.1.4.1.23263.4.2.1.3.3.1.20.1.102

    • Server web1 name: .1.3.6.1.4.1.23263.4.2.1.3.4.1.4.1.102.1

    • Server web2 name: .1.3.6.1.4.1.23263.4.2.1.3.4.1.4.1.102.2

Important OIDs to monitor

In the string and numeric OIDs below, replace:

  • F by the Frontend ID in HAProxy configuration

  • B by the Backend ID in HAProxy configuration

  • S by the server ID in HAProxy configuration

Statuses

Description

Type

String

Numeric

Frontend status

String

EXCELIANCE-MIB::alFrontendStatus.1.F

.1.3.6.1.4.1.23263.4.2.1.3.2.1.13.1.F

Backend status

String

EXCELIANCE-MIB::alBackendStatus.1.B

.1.3.6.1.4.1.23263.4.2.1.3.3.1.20.1.B

Server status

String

EXCELIANCE-MIB::alServerStatus.1.B.S

1.3.6.1.4.1.23263.4.2.1.3.4.1.19.1.B.S

Performance

Description

Type

String

Numeric

Frontend total sessions

Counter

EXCELIANCE-MIB::alFrontendSessionTotal.1.F

.1.3.6.1.4.1.23263.4.2.1.3.2.1.7.1.F

Backend total sessions

Counter

EXCELIANCE-MIB::alBackendSessionTotal.1.B

.1.3.6.1.4.1.23263.4.2.1.3.3.1.10.1.B

Backend current queued sessions

Gauge

EXCELIANCE-MIB::alBackendQueueCur.1.B

1.3.6.1.4.1.23263.4.2.1.3.3.1.4.1.B

Server total sessions

Counter

EXCELIANCE-MIB::alServerSessionTotal.1.B.S

.1.3.6.1.4.1.23263.4.2.1.3.4.1.11.1.B.S

Server current queued sessions

Gauge

EXCELIANCE-MIB::alServerQueueCur.1.B.S

.1.3.6.1.4.1.23263.4.2.1.3.4.1.5.1.B.S

Server response errors

Counter

EXCELIANCE-MIB::alServerErrorResponse.1.B.S

.1.3.6.1.4.1.23263.4.2.1.3.4.1.16.1.B.S

ALOHA monitoring through SNMP

This application note is intended to help you configure the Aloha load balancer for SNMP monitoring.


Objective

This application note is intended to help you configure the Aloha load balancer for SNMP monitoring.


Complexity

2


Versions

v4.2 and later