Ad Widget

Collapse

Trigger File date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dominoforever67
    Junior Member
    • Mar 2022
    • 6

    #1

    Trigger File date

    Hi,

    I would like to get some alerts for some file in a specific folder. I have 2 different folders with 1 file each with a different name.

    I need to replace these files everyday. How to trigger the date file of yesterday?

    I tried with this trigger but not working: last(/myserver/vfs.file.time[\\192.168.14.25\update\file1\updatecsv.csv,modify])<12h

    when trying to use this one
    1d:now/d it said key not valid.

    Thank you.

    T.
  • dominoforever67
    Junior Member
    • Mar 2022
    • 6

    #2
    Any help? I dpn't find the good expression to get an alert if file date is from yesterday...

    Comment

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

      #3
      vfs.file.time returns time as "unix timestamp". So you cannot do just <12h. "1649056558<12h" it is a nonsense ...

      you need to do some math... like now-last is more than half a day worth of seconds..

      Comment

      • dominoforever67
        Junior Member
        • Mar 2022
        • 6

        #4
        Originally posted by cyber
        vfs.file.time returns time as "unix timestamp". So you cannot do just <12h. "1649056558<12h" it is a nonsense ...

        you need to do some math... like now-last is more than half a day worth of seconds..
        Thank you.

        In my item, for units I use unixtime, the date and time are displayed normally

        Comment

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

          #5
          Yes, if you specify units as "unixtime", then Zabbix knows how to display it "normally". but that does not change the way, how it is stored or how you should use it in expressions.

          Comment

          • dominoforever67
            Junior Member
            • Mar 2022
            • 6

            #6
            I test with this now()-last(vfs.file.time[\\192.168.14.25\update\file1\updatecsv.csv,modify])
            but not working when file is updated.

            Comment

            • dominoforever67
              Junior Member
              • Mar 2022
              • 6

              #7
              Originally posted by cyber
              Yes, if you specify units as "unixtime", then Zabbix knows how to display it "normally". but that does not change the way, how it is stored or how you should use it in expressions.
              Any help please?

              Comment

              Working...