Ad Widget

Collapse

Log monitoring trigger setup when to go UP/DOWN

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nicolasg
    Member
    • Apr 2011
    • 50

    #1

    Log monitoring trigger setup when to go UP/DOWN

    Hi All,

    I'm able to successful monitor log files send notifications alerts.

    Using nodata in the trigger the alert goes clear after 10 minutes if the string patter doesn't appear again in the logs.

    I want to have something more sophisticated, for example in /var/log/messages :

    If a host losse the connection with a server the application will write in the /var/log/messages "server lost connection" .

    If a host finds again the connection with the server the application will write to the /var/log/messages "server connection restored" .

    So basically what I want to do in Zabbix is to monitoring the log file and
    fire an alert when "server lost connection" is found in the logs and clears the alert only when "server connection restored" is logged.

    Is there a way we can do this in Zabbix ? any help ?

    Regards,
    Nicolas.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    Take a look at:
    Hysteresis

    Comment

    • nicolasg
      Member
      • Apr 2011
      • 50

      #3
      Thanks BDiE8VNy but that does't look it could solve my problem.

      Comment

      • BDiE8VNy
        Senior Member
        • Apr 2010
        • 680

        #4
        [...]fire an alert when "server lost connection" is found in the logs and clears the alert only when "server connection restored" is logged.
        In the following example an item gathers any log entry containing 'foobar'.
        The trigger gets active (in problem state) if it is inactive (in OK state) and a gathered log entry contains 'server lost connection'.
        If the trigger is active it keeps active as long as log entries doesn't contain 'server connection restored'.

        Code:
        ({TRIGGER.VALUE}=0&{Template example:log["/var/log/messages","foobar"].str("server lost connection")}=1)|
        ({TRIGGER.VALUE}=1&{Template example:log["/var/log/messages","foobar"].str("server connection restored")}=0)
        Wasn't that what You aimed to achieve?

        Comment

        Working...