Ad Widget

Collapse

Monitor a Log File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trips2007
    Junior Member
    • Sep 2012
    • 17

    #1

    Monitor a Log File

    Is it possible to monitor for keywords (like FATAL or ERROR) in a log file?

    How?
  • ableev
    Senior Member
    Zabbix Certified Specialist
    • Oct 2012
    • 276

    #2
    Try this:
    • Create item key like
      Code:
      system.run["cat /var/log/file | grep FATAL"]
    • Store value: Delta (Simple Change)
    • Trigger with formula item_key.last(0)>0 (or smthng)

    If your item will update one time per minute, you will get count of fatal errors in file.
    You can do the same for ERROR.

    Comment

    • Colttt
      Senior Member
      Zabbix Certified Specialist
      • Mar 2009
      • 878

      #3
      take a look at this:
      http://www.zabbix.com/documentation/...ypes/log_items
      Debian-User

      Sorry for my bad english

      Comment

      • NOB
        Senior Member
        Zabbix Certified Specialist
        • Mar 2007
        • 469

        #4
        Logfile monitoring with passive agent ?

        Hi

        I remember a discussion about changing the logfile monitoring to
        passive instead of "agent (active)" only.

        This would help a lot for logfile monitoring in a clustered environment,
        i.e. the logfile "moves" with the application and filesystem / logical voiumes
        from server to server.
        In that case the zabbix server would "poll" the logfile via the virtual IP
        address of the service from the agent and the current position is
        stored independent of the agent (and log[...] item) running on the both monitored servers.

        So my question is:

        Was this feature finally implemented (in 1.8.x ?) and the documentation was not updated
        or is this still not available ?

        Kind regards

        Norbert.

        Comment

        • NOB
          Senior Member
          Zabbix Certified Specialist
          • Mar 2007
          • 469

          #5
          Answer found in source

          Hi

          obviously, the log file monitoring is still just possible for an active agent.

          Kind regards

          Norbert.

          Comment

          • Trips2007
            Junior Member
            • Sep 2012
            • 17

            #6
            Originally posted by NOB
            Hi

            obviously, the log file monitoring is still just possible for an active agent.
            Many things about Zabbix are not obvious to people who are just getting started. There is a great deal of conflicting information out there (probably due to changes between different versions). Unfortunately the official docs leave a lot out.

            Comment

            Working...