Ad Widget

Collapse

unixtime last run time > 24 hours

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • herz0g
    Junior Member
    • Jan 2020
    • 1

    #1

    unixtime last run time > 24 hours

    Hello,

    I have an item prototype named:
    Task: {#APPTASKS}: Last Run Time

    From this item I receive an unixtime numeric unsigned value.
    Within my latest data for that host the value looks like this:

    Name

    Task: DBExport: Last Run Time
    Last check

    2020-01-08 16:34:31
    Last value

    2020-01-08 02:00:00

    I want to configure a alarm if the last value is older than 24 hours
    For testing I have tried the trigger below and expect a alarm after 2 minutes but I think it is not the right function:

    {Template Windows Scheduled Tasks:TaskSchedulerMonitoring[TaskLastRunTime,{#APPTASKS}].last()}>120

    Can anyone tell me what would be the right function for that kind of trigger?


    Thanks in advance.
  • gert.derouck
    Member
    • Jan 2020
    • 69

    #2
    Hi,

    You can use the 'now' trigger function to get the current time.
    So the trigger you need would contain following expression:

    {Template Windows Scheduled Tasks:TaskSchedulerMonitoring[TaskLastRunTime,{#APPTASKS}].now()} - {Template Windows Scheduled Tasks:TaskSchedulerMonitoring[TaskLastRunTime,{#APPTASKS}].last()} > 86400


    Regards
    Last edited by gert.derouck; 14-01-2020, 02:14.

    Comment

    Working...