HAProxy
HAProxy is an opensource load balancer used in High Availability (HA) and Geographic Redundancy (GR) CPS deployments. It is used by the CPS Policy Directors (lbs) to forward IP traffic from lb01/lb02 to other CPS nodes. HAProxy runs on the active Policy Director VM.
Documentation for HAProxy is available at http://www.haproxy.org/#docs.
HAProxy Service Operations
Diagnostics
For a general diagnostics check of the HAProxy service, run the following command from any VM in the cluster (except sessionmgr):
diagnostics.sh --ha_proxy
QPS Diagnostics Multi-Node Environment
---------------------------
Ping Check for qns01...[PASS]
Ping Check for qns02...[PASS]
Ping Check for qns03...[PASS]
Ping Check for qns04...[PASS]
Ping Check for lb01...[PASS]
Ping Check for lb02...[PASS]
Ping Check for sessionmgr01...[PASS]
Ping Check for sessionmgr02...[PASS]
Ping Check for sessionmgr03...[PASS]
Ping Check for sessionmgr04...[PASS]
Ping Check for pcrfclient01...[PASS]
Ping Check for pcrfclient02...[PASS]
HA Multi-Node Environment
---------------------------
Checking HAProxy status...[PASS]
Service Commands
The following commands must be issued from the lb01 or lb02 VM.
To check the status of the HAProxy services, run the following command:
monit status haproxy
[root@host-lb01 ~]# service haproxy status
haproxy (pid 10005) is running...
To stop the HAProxy service, run the following command:
monit stop haproxy
To restart the HAProxy service, run the following command:
monit restart
haproxy
HAProxy Statistics
To view statistics, open a browser and navigate to the following URL:
-
For HAProxy Statistics: http://<diameterconfig>:5540/haproxy?stats
-
For HAProxy Diameter Statistics: http://<diameterconfig>:5540/haproxy-diam?stats
Changing HAProxy Log Level
To change HAProxy log level in your CPS deployment, you must make changes to the HAProxy configuration files on the Cluster Manager and then push the changes out to the Policy Director (lb) VMs.
Once deployed, the HAProxy configuration files are stored locally on the Policy Director VMs at /etc/haproxy/haproxy.cfg.erb and /etc/haproxy/haproxy-diameter.erb.
Note |
Whenever you upgrade with latest ISO, the log level will be set to default level (err). |
Procedure
Step 1 |
Log in to the Cluster Manager. |
Step 2 |
Create a backup of the HAProxy configuration file before continuing:
|
Step 3 |
Edit the HAProxy files as needed. By default, the logging level is set as error (err) in /var/qps/install/current/puppet/modules/qps/templates/etc/haproxy/haproxy-diameter.erb:
By default, the logging level in /var/qps/install/current/puppet/modules/qps/templates/etc/haproxy/haproxy.cfg.erb:
The log level can be adjusted to any of the following log levels as needed: emerg alert crit err warning notice info debug |
Step 4 |
Run
|
Step 5 |
Run
|