Skip to content

Invoke-IcingaCheckScheduledTask NextRunTime Warning and Critical Threshold Bug #380

@audiocoach

Description

@audiocoach

Hello,

I think I have found a bug in the Invoke-IcingaCheckScheduledTask. Let,s say you have a scheduled task which should run every 24 hours and want a warning if the next runtime for whatever reason is 48 hours or more in the future and a critical if the next run time is 72 hours or more in the future. But when you take these values for the "WarningNextRunTime" (=48 hours or 2 days) and "CriticalNextRunTime" (=72 hours or 3 days) you always get critical because the scheduled next run time is always lower than the current time + 3 days.
Even if you take lower threshold values there will be a point in time where you get a critical. Let's say the scheduled task runs every 24 hours at 06:00 and you take 1 hour as critical next runtime threshold. At 05:01 the check will return a critical because 06:00 is lower that 05:01 (current time) + 1 hour (critical next runtime threshold).

I think it can only work the other way around and you should get a warning if the next runtime is higher than the current time + the warning threshold value and a critical if the next runtime is higher than the current time + the critical threshold value.

Maybe it is easier to understand with some screenshots:

image

image

My environment:
Icinga 2.14.1
Icinga Web 2.12.1
Icinga Director 1.11
Icinga for Windows 1.11.1

Metadata

Metadata

Assignees

Labels

InvestigationThe team is looking into the cause of the issuebugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions