PDA

View Full Version : Items of type LOG are getting disabled


joke
15-03-2010, 15:07
I've created an item to trace the output of a log file. So I tried using system.run as a remote command.

The item uses zabbix.agent, the item type is set to LOG and remote commands are enabled:
system.run[test -e /path/logfile && cat /path/logfile && rm /path/logfile || true]
As soon as system.run doesn't produce some output in case the log file got delete the agent reports unsupported and the item gets disabled.

Is there any way how to prevent the item from getting disabled?
Even an item like
system.run[cat /path/empty_log_file]
is getting disabled. It must be possible to log an empty log message.

Thanks

richlv
17-03-2010, 21:06
why are you attempting to use some hackish log output instead of built-in log and/or logrt item keys ? i'd suggest just sticking to those.

joke
17-03-2010, 21:11
The items get disabled if the logfile doesn't exist. and it takes time before they are checked again.

Second each line gets logged on it's own not as a complete log entry of several lines which is not exactly what I want.