Ad Widget

Collapse

Can't find a way to monitor a log and trigger an action

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ZabbixBeginner
    Junior Member
    • Jan 2022
    • 1

    #1

    Can't find a way to monitor a log and trigger an action


    Hi everyone,
    I am trying to monitor a log and to trigger an action when a regexp is found in the log. But somehow, even after reading the docs, watching tutorials, I can't seem to get it.
    I could set an item and It was detecting the right lines that were containing the regexp, but when it comes to setting a trigger, I can't find how. I tried using the find() function :

    Code:
    find(/zabbixMonitored/log[/var/log/logtest.log,,,,skip,,,,],,"like","error")=1
    But with this, the trigger is fired whether or not the line contains the "error" key. Any idea why ?



  • adminjerry
    Junior Member
    • May 2022
    • 18

    #2
    Hi,
    At first glance replace "like" with "iregexp".

    Comment

    Working...