File: hapc.1

package info (click to toggle)
haproxy-cmd 0.0.7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 80 kB
  • sloc: python: 250; sh: 132; makefile: 14
file content (112 lines) | stat: -rw-r--r-- 2,370 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.TH hapc 1
.SH NAME
hapc \- administrative commands for your haproxy service
.SH SYNOPSIS
.B hapc
.B <action> [options] [arguments]

.SH DESCRIPTION
.LP
.I hapc
configures the backends of an haproxy setup, so it is possible to put
backend servers in maintenance gracefully.

.SH "OPTIONS"

.LP
.I \-verbose|\-v
.IP
Display with a more verbose output.


.SH "ACTIONS"

.LP
.B list\-backends
.I [-l|--links]
.IP
List all available backends, asking through the haproxy socket file.

.LP
.B list\-frontends
.IP
List all available frontend as configured in the haproxy.cfg file.

.LP
.B list\-config\-backends
.IP
List all available backends as configured in the haproxy.cfg file.

.LP
.B list\-servers
.I "[\-b|\-\-backend] <backend>"
.I [\-d|\-\-details]
.IP
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).

.LP
.B list\-connections
.I "[\-b|\-\-backend] <backend>"
.I "[\-s|\-\-server] <server>"
.IP
Show the number of connections for a given backend and server.

.LP
.B enable\-server
.I "[\-b|\-\-backend] <backend>"
.I "[\-s|\-\-server] <server>"
.IP
Set a server as ACTIVE in its backend.

.LP
.B drain\-server
.I "[\-b|\-\-backend] <backend>"
.I "[\-s|\-\-server] <server>"
.I "[\-w|\-\-wait]"
.IP
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.

.LP
.B stop\-server
.I "[\-b|\-\-backend] <backend>"
.I "[\-s|\-\-server] <server>"
.IP
Forceably remove a server from its backend, eventually killing existing
connections.

.LP
.B check\-safe\-to\-remove
.I "[\-b|\-\-backend] <backend>"
.I "[\-s|\-\-server] <server>"
.IP
Check if a server is safe to remove from its backend (ie: check if there's
not existing connections to it).

.LP
.B reload\-haproxy
.IP
Reload haproxy.

.SH DESCRIPTION
.LP
.I 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


.SH LICENSE
.IP
This is released under the Apache-2.0 license.

.SH AUTHORS
.IP
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.