summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--misc/conf/zabbix_agentd.conf1
-rw-r--r--src/zabbix_agent/zabbix_agentd.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/misc/conf/zabbix_agentd.conf b/misc/conf/zabbix_agentd.conf
index 429ef174..e9328996 100644
--- a/misc/conf/zabbix_agentd.conf
+++ b/misc/conf/zabbix_agentd.conf
@@ -4,6 +4,7 @@
############ GENERAL PARAMETERS #################
# List of comma delimited IP addresses of ZABBIX servers. No spaces allowed.
+# First IP is used for sending active checks.
Server=127.0.0.1
diff --git a/src/zabbix_agent/zabbix_agentd.c b/src/zabbix_agent/zabbix_agentd.c
index 24b1fd20..e7911aaf 100644
--- a/src/zabbix_agent/zabbix_agentd.c
+++ b/src/zabbix_agent/zabbix_agentd.c
@@ -419,6 +419,7 @@ int main(int argc, char **argv)
char host[128];
int ch;
+ char *s;
static struct sigaction phan;
@@ -482,7 +483,8 @@ int main(int argc, char **argv)
}
/* Initialize thread for active checks */
- pids[CONFIG_AGENTD_FORKS-1] = child_active_make(CONFIG_AGENTD_FORKS-1, CONFIG_HOSTS_ALLOWED, CONFIG_SERVER_PORT);
+ s=strtok(CONFIG_HOSTS_ALLOWED,",");
+ pids[CONFIG_AGENTD_FORKS-1] = child_active_make(CONFIG_AGENTD_FORKS-1, s, CONFIG_SERVER_PORT);
parent=1;