Ad Widget

Collapse

Help setting up log trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blastik
    Junior Member
    • Sep 2011
    • 7

    #1

    Help setting up log trigger

    Hi folks,

    I have setup an item like this:

    log["C:\whatever\Logstest.txt",,100]

    But i need help setting up the trigger. I've tried to search around in the forum and also check the documentation but i cannot get it to work. I want to trigger an alert when a trace like the one below is recorded at the log:

    Code:
    2015-05-15 11:16:23.8370|Error|1556|1|Unregistering errored channel ...
    And reset the trigger status to OK when the following trace comes up:

    Code:
    2015-05-15 11:10:57.1960|Info|3420|31|Channel whatever started
    Any ideas?

    Thanks a lot!
    D.
    Last edited by blastik; 18-05-2015, 11:46.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    See Trigger hysteresis

    Comment

    • blastik
      Junior Member
      • Sep 2011
      • 7

      #3
      Originally posted by BDiE8VNy
      So I've tried

      Code:
      {TRIGGER.VALUE}=0 and {host:log["C:\whatever\Logstest.txt",,100].str(|Error|1556|1|Unregistering errored channel)} or {TRIGGER.VALUE}=1 and {host:log["C:\whatever\Logstest.txt",,100].str(|Info|3420|31|Channel * started)}
      but apparently is not making the trick... Any thoughts?

      Comment

      • limlayhin
        Junior Member
        • Apr 2015
        • 3

        #4
        This is how I do it:

        Item:
        log[/var/log/system.log,"FAILED"]


        Trigger Expression:
        {ServerName:log[/var/log/system.log,"FAILED"].str("FAILED",1)}=1


        But I do not know how to make trigger status to ok.

        Comment

        • Alex_SYB
          Senior Member
          • Feb 2012
          • 133

          #5
          Wow, I have just posted a similar question

          How to set the trigger back to OFF

          Comment

          • BDiE8VNy
            Senior Member
            • Apr 2010
            • 680

            #6
            One needs to use at least one time-based function within the trigger expression to get a trigger evaluated when no new item value(s) occur.

            See: Zabbix Trigger Timeout

            Comment

            • Alex_SYB
              Senior Member
              • Feb 2012
              • 133

              #7
              Hi

              THanks , I will try the nodata addition and see how that goes

              Comment

              Working...