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:
Misiek 2017-01-09 09:39:51 +01:00 committed by Willy Tarreau
parent e7f2b7301c
commit ea849333ca

View File

@ -1151,6 +1151,14 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
newsrv->agent.inter = val;
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")) {
global.maxsock++;
newsrv->agent.port = atol(args[cur_arg + 1]);