Ad Widget

Collapse

Log file monitor, not trigger upon duplicate lines

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moshikoy
    Member
    • Aug 2017
    • 56

    #1

    Log file monitor, not trigger upon duplicate lines

    Hi,
    I was wondering if there is a simple solution to exclude duplicate lines from triggering.
    Saying the same exact line appeared in the log file more than once.

    Can I add the log file trigger a comparison between item.value and item.value1 (see example below)

    example:
    take this:
    {Log File monitor Template:logrt[/var/log/syslog,@log_filter_syslog,,,skip].iregexp(@log_filter_syslog)}=1

    and make it into this:
    {Log File monitor Template:logrt[/var/log/syslog,@log_filter_syslog,,,skip].iregexp(@log_filter_syslog)}=1 and {ITEM.VALUE} != {ITEM.VALUE1}


    Not sure about the syntax..
    Is this a legal trigger?

    - Moshe
  • moshikoy
    Member
    • Aug 2017
    • 56

    #2
    found a solution:

    {Log File monitor Template:logrt[/var/log/syslog,@log_filter_syslog,,,skip].iregexp(@log_filter_syslog)}=1 and
    and {Log File monitor Template:logrt[/var/log/syslog,@log_filter_syslog,,,skip].diff()}=1



    In addition, I needed to set "OK event generation" to None, since the exact same line generate an OK event which is closing the first event


    Mosh

    Comment

    Working...