Ad Widget

Collapse

zabbix current timestamp compare with string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matteo.peveri
    Junior Member
    • Dec 2019
    • 1

    #1

    zabbix current timestamp compare with string


    I'm using active zabbix agent on windows machines and there is an application that writes the last execution timestamp into a .txt file.

    I successfully create an item that collects the string written in the text file on a time base.
    vfs.file.regexp[C:\ZABBIX\test.txt,".*^(\d{10}|\d{11})$",,,,\1]
    and this works just fine.

    I am now trying to define a trigger but I got stuck. I don't think I can use fuzzytime() since this is a string, unless I can convert. I am looking for a suggestion. I am sure I am missing something simple.

    Basically I am trying to achieve the following trigger:
    if (the Zabbix server timestamp) - (the timestamp retrieved from the txt file) > 300 seconds raise alarm.
    Can someone please help me?
Working...