HAProxy Enterprise Documentation 1.6r2
Command Line Interface
A HAProxy Enterprise Command Line Interface is available from the package hapee-1.6r2-cli
and allows you to:
Report information about the current HAProxy Enterprise deployment
Manage HAProxy Enterprise processes
Interact with hapee-1.6-lb
stats socket to report statistics, current sessions, errors
Open a shell on running hapee-1.6-lb
Print help
Note
CLI requires a bash shell which you can change to by using chsh
.
Install HAProxy Enterprise CLI
To install the HAProxy Enterprise CLI package run:
$ # On Debian/Ubuntu
$ sudo apt-get install hapee-1.6r2-cli
$ # On CentOS/RedHat/Oracle
$ sudo yum install hapee-1.6r2-cli
The package adds a bash completion script in /etc/bash_completion.d/hapee-1.6-completion.sh
This script executes when you log into the server and enables a new command called hapee
. To use it, type hapee
and press the [TAB] key twice:
$ hapee
condrestart force-reload help lb reload
restart start status stop try-restart version
Note
The hapee
command becomes available at the next login. To use it right after installation, run source /etc/bash_completion.d/hapee-1.6-completion.sh
in your current shell.
Note
For CentOS and RedHat, you also need to install the bash-completion-extras
package.
Manage HAProxy Enterprise processes
You can manage HAProxy Enterprise processes with the command: hapee <action> [<service name>]
.
CLI can execute the following actions on any daemon installed by HAProxy Enterprise:
Action | Description |
condrestart
| restart a service only if it was already running |
force-reload
| reload a service configuration |
reload
| reload service configuration |
restart
| restart a service |
start
| start a service |
stop
| stop a service |
try-restart
| like condrestart |
If you do not specify a service name, the command executes the action on all HAProxy Enterprise services. It is the shortened version of the service name, such lb
, log
, rhi
, route
, vrrp
, etc.
Reload hapee-1.6-lb
configuration:
Check HAProxy Enterprise status
The HAProxy Enterprise CLI can report on the status of each daemon with the command hapee status [<service name>]
If you do not specify the service name, the command reports on all statuses of all daemons.
Display the status of HAProxy:
$ hapee status lb
hapee-1.6r2-lb (pid 1136) is running...
Display the status of all HAProxy Enterprise services:
$ hapee status
hapee-1.6r2-vrrp (pid 1120) is running...
hapee-1.6r2-lb (pid 1136) is running...
rsyslogd (pid 1145) is running...
hapee-1.6r2-rhi is not installed
hapee-1.6r2-route is not installed
hapee-1.6r2-route6 is not installed
hapee-1.6r2-snmp is not installed
Get Help
You can also use the HAProxy Enterprise CLI to get help about installed components, such as:
Daemon options
Configuration
Use cases
To use this command: enter hapee help <service name>
, then press [TAB] key to get the list of available help.
Read HAProxy Enterprise documentation:
Next up
Data Plane API