diff options
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | include/log.c | 8 | ||||
-rw-r--r-- | include/log.h | 10 | ||||
-rw-r--r-- | misc/conf/zabbix_agentd.conf | 8 | ||||
-rw-r--r-- | misc/conf/zabbix_suckerd.conf | 8 | ||||
-rw-r--r-- | misc/conf/zabbix_trapperd.conf | 8 | ||||
-rw-r--r-- | src/zabbix_agent/sysinfo.c | 2 |
7 files changed, 40 insertions, 26 deletions
@@ -1,31 +1,33 @@ Not ready yet: -[ Fix DebugLevel ] +[ CORE. Support for automake ] -[ Support for automake ] -[ Support for Service Tree ] -[ Support for flexible permissions ] +[ CORE. Support for Service Tree ] +[ CORE. Support for flexible permissions ] -[ Make Zabbix compile by cc ] +[ CORE. Make Zabbix compile by cc ] -[ PHP. Change algorithm for audible notification ] [ PHP. Show time legend for graphs ] [ PHP. Show diff instead of real values ] [ PHP. Show triggers by userid ] -[ PHP. Support for template-based new hosts ] -[ Add support for new trigger statuses: MODIFIED/NOTSUPORTED ] -[ All parameters should contain section "How can be used" in the Manual ] +[ CORE. Add support for new trigger statuses: MODIFIED/NOTSUPORTED ] + +[ DOCS. All parameters should contain section "How can be used" in the Manual ] Changes for 1.0beta3: + - ialready existing hosts can be used as template from new host (Alexei) + - new algorithm for audible notification in screen "Status of Triggers" + (Alexei) + - changed definition of DebugLevel (Alexei) + - improved update_triggers() (Alexei) - fixed get_lastvalue() (Alexei) - minor changes in include/cfg.c (Alexei) - column functions.lastvalue changed to varchar(255) (Alexei) - column items.lastvalue changed to varchar(255) (Alexei) - column items.prevvalue changed to varchar(255) (Alexei) - - changed definition of DebugLevel (Alexei) - support for version[zabbix_agent] (Alexei) - better validation of trigger expressions in validate_expression (Alexei) diff --git a/include/log.c b/include/log.c index fd621e85..3ffb4cc6 100644 --- a/include/log.c +++ b/include/log.c @@ -18,7 +18,13 @@ static int log_level; int zabbix_open_log(int type,int level, const char *filename) { +/* Just return if we do not want to write debug */ log_level = level; + if(level == LOG_LEVEL_EMPTY) + { + return SUCCEED; + } + if(type == LOG_TYPE_SYSLOG) { openlog("zabbix_suckerd",LOG_PID,LOG_USER); @@ -50,7 +56,7 @@ void zabbix_log(int level, const char *fmt, ...) struct tm *tm; va_list ap; - if(level<log_level) + if( (level>log_level) || (level == LOG_LEVEL_EMPTY)) { return; } diff --git a/include/log.h b/include/log.h index 2460f642..f00706bd 100644 --- a/include/log.h +++ b/include/log.h @@ -1,11 +1,11 @@ #ifndef ZABBIX_LOG_H #define ZABBIX_LOG_H -#define LOG_LEVEL_DEBUG 0 -#define LOG_LEVEL_NOTICE 1 -#define LOG_LEVEL_WARNING 2 -#define LOG_LEVEL_ERR 3 -#define LOG_LEVEL_CRIT 4 +#define LOG_LEVEL_EMPTY 0 +#define LOG_LEVEL_CRIT 1 +#define LOG_LEVEL_ERR 2 +#define LOG_LEVEL_WARNING 3 +#define LOG_LEVEL_DEBUG 4 #define LOG_TYPE_UNDEFINED 0 #define LOG_TYPE_SYSLOG 1 diff --git a/misc/conf/zabbix_agentd.conf b/misc/conf/zabbix_agentd.conf index 7df7f3ec..f5234424 100644 --- a/misc/conf/zabbix_agentd.conf +++ b/misc/conf/zabbix_agentd.conf @@ -18,11 +18,13 @@ ListenPort=10000 StartAgents=5 # Specifies debug level +# 0 - debug is not created # 1 - critical information -# 2 - warnings (default) -# 3 - for debugging (produces lots of information) +# 2 - error information +# 3 - warnings (default) +# 4 - for debugging (produces lots of information) -DebugLevel=2 +DebugLevel=3 # Name of PID file diff --git a/misc/conf/zabbix_suckerd.conf b/misc/conf/zabbix_suckerd.conf index b032c3fe..125fb7c0 100644 --- a/misc/conf/zabbix_suckerd.conf +++ b/misc/conf/zabbix_suckerd.conf @@ -19,11 +19,13 @@ StartSuckers=5 HousekeepingFrequency=1 # Specifies debug level +# 0 - debug is not created # 1 - critical information -# 2 - warnings (default) -# 3 - for debugging (produces lots of information) +# 2 - error information +# 3 - warnings (default) +# 4 - for debugging (produces lots of information) -DebugLevel=2 +DebugLevel=3 # Specifies how long we wait for agent (in sec) # Must be between 1 and 30 diff --git a/misc/conf/zabbix_trapperd.conf b/misc/conf/zabbix_trapperd.conf index 7e9b2695..e9fb8a09 100644 --- a/misc/conf/zabbix_trapperd.conf +++ b/misc/conf/zabbix_trapperd.conf @@ -16,11 +16,13 @@ StartTrappers=5 ListenPort=10001 # Specifies debug level +# 0 - debug is not created # 1 - critical information -# 2 - warnings (default) -# 3 - for debugging (produces lots of information) +# 2 - error information +# 3 - warnings (default) +# 4 - for debugging (produces lots of information) -DebugLevel=2 +DebugLevel=3 # Name of PID file diff --git a/src/zabbix_agent/sysinfo.c b/src/zabbix_agent/sysinfo.c index a149d0da..d74cf262 100644 --- a/src/zabbix_agent/sysinfo.c +++ b/src/zabbix_agent/sysinfo.c @@ -208,7 +208,7 @@ void process(char *command,char *value) char key[MAX_STRING_LEN+1]; char param[1024]; char cmd[1024]; - char *res2; + char *res2 = NULL; int ret_str=0; for( p=command+strlen(command)-1; p>command && ( *p=='\r' || *p =='\n' || *p == ' ' ); --p ); |