Ad Widget

Collapse

A very simple trigger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Technotikker
    Junior Member
    • Sep 2024
    • 4

    #1

    A very simple trigger?

    Hello!
    I have a simple problem, but I don't understand it. (I am new to Zabbix)
    I have a log file on a windows server that I read with a log[] item and I created a simple trigger like this:

    last(/SERVER/log["DRIVE:\PATH\LOGFILE.txt",,,,,,,])<>date()

    The logfile gets a YYMMDD formatted string when written or appended.

    Should this trigger not be false if the logfiles content is the current day in YYYYMMDD?

    Because the trigger fires even though the logfiles content is currently 20240917.
  • Technotikker
    Junior Member
    • Sep 2024
    • 4

    #2
    Hmmm... nevermind it works now. I have no idea why though...

    Comment

    • Technotikker
      Junior Member
      • Sep 2024
      • 4

      #3
      Ah, one small additional question, is the time() function 12 hours or 24 hours? HHMMSS? Is 125959 the max or 235959?

      I have a time in HHMMSS in a log file and I would like to figure out if the value is older than one hour.
      Last edited by Technotikker; 18-09-2024, 14:43.

      Comment

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

        #4
        It is 24h format.. How else would you distinguis between AM and PM.. there is no space for that.

        Comment

        • Technotikker
          Junior Member
          • Sep 2024
          • 4

          #5
          Ah true... I should have thought of that! Sorry!

          So if I wanted to see if the string returned from last() is older than one hour I'd go time()-10000?

          Comment

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

            #6
            I see the issue rising at 00:00-01:00...

            Comment

            Working...