summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-04 20:35:03 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-06-04 20:35:03 +0000
commitdd8f19b8ebba622d8dd6c7b668579e3fa0ba9b60 (patch)
tree7542a67dad0ceaeb3c3e126a473e0c3b460f3c91
parentc556043bf06a4ec319aadebdd41cacb318e4b0c6 (diff)
downloadzabbix-dd8f19b8ebba622d8dd6c7b668579e3fa0ba9b60.tar.gz
zabbix-dd8f19b8ebba622d8dd6c7b668579e3fa0ba9b60.tar.xz
zabbix-dd8f19b8ebba622d8dd6c7b668579e3fa0ba9b60.zip
- added parameter DisableActive for zabbix_agentd (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1818 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--ChangeLog1
-rw-r--r--misc/conf/zabbix_agentd.conf4
-rw-r--r--src/zabbix_agent/zabbix_agentd.c9
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a8c92ff7..6ce5d29b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
Changes for 1.1alpha11:
+ - added parameter DisableActive for zabbix_agentd (Alexei)
- trigger expressions may contain spaces (Alexei)
- improvements for snprintf.c (Alexei)
- added table escalation_rules (Alexei)
diff --git a/misc/conf/zabbix_agentd.conf b/misc/conf/zabbix_agentd.conf
index e9328996..c65cb33b 100644
--- a/misc/conf/zabbix_agentd.conf
+++ b/misc/conf/zabbix_agentd.conf
@@ -35,6 +35,10 @@ StartAgents=5
#RefreshActiveChecks=120
+# Disable active checks. The agent will work in passive mode listening server.
+
+#DisableActive=1
+
# Specifies debug level
# 0 - debug is not created
# 1 - critical information
diff --git a/src/zabbix_agent/zabbix_agentd.c b/src/zabbix_agent/zabbix_agentd.c
index f16c38e4..34f6f86d 100644
--- a/src/zabbix_agent/zabbix_agentd.c
+++ b/src/zabbix_agent/zabbix_agentd.c
@@ -73,6 +73,7 @@ char *CONFIG_PID_FILE = NULL;
char *CONFIG_LOG_FILE = NULL;
int CONFIG_AGENTD_FORKS = AGENTD_FORKS;
int CONFIG_NOTIMEWAIT = 0;
+int CONFIG_DISABLE_ACTIVE = 0;
int CONFIG_TIMEOUT = AGENT_TIMEOUT;
int CONFIG_LISTEN_PORT = 10050;
int CONFIG_SERVER_PORT = 10051;
@@ -236,6 +237,7 @@ void init_config(void)
{"PidFile",&CONFIG_PID_FILE,0,TYPE_STRING,PARM_OPT,0,0},
{"LogFile",&CONFIG_LOG_FILE,0,TYPE_STRING,PARM_OPT,0,0},
/* {"StatFile",&CONFIG_STAT_FILE,0,TYPE_STRING,PARM_OPT,0,0},*/
+ {"DisableActive",&CONFIG_DISABLE_ACTIVE,0,TYPE_INT,PARM_OPT,0,1},
{"Timeout",&CONFIG_TIMEOUT,0,TYPE_INT,PARM_OPT,1,30},
{"NoTimeWait",&CONFIG_NOTIMEWAIT,0,TYPE_INT,PARM_OPT,0,1},
{"ListenPort",&CONFIG_LISTEN_PORT,0,TYPE_INT,PARM_OPT,1024,32767},
@@ -483,8 +485,11 @@ int main(int argc, char **argv)
}
/* Initialize thread for active checks */
- s=strtok(CONFIG_HOSTS_ALLOWED,",");
- pids[CONFIG_AGENTD_FORKS-1] = child_active_make(CONFIG_AGENTD_FORKS-1, s, CONFIG_SERVER_PORT);
+ if(CONFIG_DISABLE_ACTIVE==0)
+ {
+ s=strtok(CONFIG_HOSTS_ALLOWED,",");
+ pids[CONFIG_AGENTD_FORKS-1] = child_active_make(CONFIG_AGENTD_FORKS-1, s, CONFIG_SERVER_PORT);
+ }
parent=1;