mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-28 05:48:01 +00:00
MINOR: checks: Add agent-addr config directive
This directive add possibility to set different address for agent-checks. With this you can manage server status and weight from central place. Can be backported to 1.7.
This commit is contained in:
parent
e7f2b7301c
commit
ea849333ca
@ -1151,6 +1151,14 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
|||||||
newsrv->agent.inter = val;
|
newsrv->agent.inter = val;
|
||||||
cur_arg += 2;
|
cur_arg += 2;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(args[cur_arg], "agent-addr")) {
|
||||||
|
if(str2ip(args[cur_arg + 1], &newsrv->agent.addr) == NULL) {
|
||||||
|
Alert("parsing agent-addr failed. Check if %s is correct address.\n", args[cur_arg + 1]);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
cur_arg += 2;
|
||||||
|
}
|
||||||
else if (!strcmp(args[cur_arg], "agent-port")) {
|
else if (!strcmp(args[cur_arg], "agent-port")) {
|
||||||
global.maxsock++;
|
global.maxsock++;
|
||||||
newsrv->agent.port = atol(args[cur_arg + 1]);
|
newsrv->agent.port = atol(args[cur_arg + 1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user