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.
diff --git a/src/server.c b/src/server.c
index 0decb82..87452d3 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1151,6 +1151,14 @@
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]);