logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hapc - administrative commands for your haproxy service

Actions

list-backends[-l|--links]

              List all available backends, asking through the haproxy socket file.

       list-frontends

              List all available frontend as configured in the haproxy.cfg file.

       list-config-backends

              List all available backends as configured in the haproxy.cfg file.

       list-servers[-b|--backend]<backend>[-d|--details]

              List all available servers for a given backend. With --details, the command shows the state of the
              servers (if they are active in the backend or not).

       list-connections[-b|--backend]<backend>[-s|--server]<server>

              Show the number of connections for a given backend and server.

       enable-server[-b|--backend]<backend>[-s|--server]<server>

              Set a server as ACTIVE in its backend.

       drain-server[-b|--backend]<backend>[-s|--server]<server>[-w|--wait]

              Gracefuly  drain a server from its backend. If the --wait option is added, then hapc waits for all
              connections to be closed before returning, with a timeout set to 60 seconds.

       stop-server[-b|--backend]<backend>[-s|--server]<server>

              Forceably remove a server from its backend, eventually killing existing connections.

       check-safe-to-remove[-b|--backend]<backend>[-s|--server]<server>

              Check if a server is safe  to  remove  from  its  backend  (ie:  check  if  there's  not  existing
              connections to it).

       reload-haproxy

              Reload haproxy.

Authors

              This  utility  has  been written by Olivier Chaze <olivier.chaze at infomaniak dot com> and Thomas
              Goirand <zigo at debian dot org> for internal use in the Infomaniak servers.

                                                                                                         hapc(1)

Description

hapc needs an admin socket to be able to use it. So it is needed to add this to /etc/haproxy/haproxy.cfg:

       global
               stats socket /var/lib/haproxy/admin.sock mode 600 level admin

License

              This is released under the Apache-2.0 license.

Name

       hapc - administrative commands for your haproxy service

Options

-verbose|-v

              Display with a more verbose output.

Synopsis

hapc<action>[options][arguments]

See Also