Ad Widget

Collapse

Items of type LOG are getting disabled

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joke
    Junior Member
    • Jan 2010
    • 10

    #1

    Items of type LOG are getting disabled

    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
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    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.
    Zabbix 3.0 Network Monitoring book

    Comment

    • joke
      Junior Member
      • Jan 2010
      • 10

      #3
      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.

      Comment

      Working...