Ad Widget

Collapse

Create trigger when log file is updated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Oebiounit
    Junior Member
    • Jun 2023
    • 3

    #1

    Create trigger when log file is updated

    Hello,

    In zabbix 6.2 I have created an item that reads a log file in linux, but I need to create a trigger that when the log is updated it generates an alert, but I am not able with the expressions of version 6.2 in 5.4 it was simpler.

    Any help would be appreciated
  • galavichid
    Member
    • Mar 2021
    • 40

    #2
    Share the expression, it will be easier to help

    Comment

    • Oebiounit
      Junior Member
      • Jun 2023
      • 3

      #3
      Originally posted by galavichid
      Share the expression, it will be easier to help
      None of the 6.2 expressions I've tried works.

      I just need a trigger every time a log is updated

      This is the item key:

      log[/home/admin/User1/logs/download_executor_error.log]

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        I would use vfs.file.size​ instead and trigger, if there is a change. Numbers are always easier for calculations than loglines...
        Or vfs.file.time​ for last change time check...

        Comment

        • Oebiounit
          Junior Member
          • Jun 2023
          • 3

          #5
          Originally posted by cyber
          I would use vfs.file.size​ instead and trigger, if there is a change. Numbers are always easier for calculations than loglines...
          Or vfs.file.time​ for last change time check...
          Good idea, I'll try that

          Comment

          Working...