Ad Widget

Collapse

Log[] not evaluating lastvalue correct

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maand
    Junior Member
    • Mar 2019
    • 15

    #1

    Log[] not evaluating lastvalue correct

    Hi,
    I have a simple Log[] that reads a log and checks for text 'error' that works as expected.

    But i have a trigger that should create a new problem for each row if find error in it and sets the item.lastvalue in the name of the trigger, and then the problem autocloses after 30s since i just want a notification to fire but not solve the problem manually in the dashboard.

    Name: Log error: {ITEM.LASTVALUE}
    Expression: {ASBCM01:logrt["c:\users\maada\test.log","error",,,skip].strlen()}>0 and {ASBCM01:logrt["c:\users\maada\test.log","error",,,skip].nodata(30s)}=0
    OK Event generation: Expression
    Problem event generation Mode: Multiple
    OK Event closes All problems

    This works good if i have one new row containing error, but if i enter three new rows all containing error it will not report the first row correct

    For example i enter these rows:
    error 1
    error 2
    error 3

    Three problems will be created named
    error 2
    error 3
    error 3

    So the first row found will always have the last rows value in it.

    The strange thing is also that first two problems are created at the same time, and then the third problem is created some seconds later.

    Is this a bug or am i doing something wrong?

    //Mathias
  • maand
    Junior Member
    • Mar 2019
    • 15

    #2
    Seems like having the nodata check with logrt events didnt work as i expected.

    I solved this by creating a trigger just creating the problem and then in the notification action send my notification and run a script that closes the problems. This way i get a notification for all rows containing specific words and then they are closed

    If anyone have any other way solving this without a script please let me know

    //Mathias

    Comment

    Working...