CMK version:
2.2.0p24.cme
I am using the default check_mk-windows_tasks to monitor the status of Windows scheduled tasks.
This normally works ok where checkmk is picking up the exit status of the last time the task was run.
But I see a problem if the scripts is not being started, in this case because the account running the task is expired or the password is expired.
I have a task scheduled to run every hour that checkmk do report as OK as last time the task was started it was ok, but in fact the script been unable to run since since a couple of weeks.
Task \test-checkmk The task exited successfully (0x00000000), Last run time: 2024-03-26 08:00:00, Next run time: 2024-04-13 12:00:00
and this is is the same as Get-ScheduledTaskInfo reports:
PS C:\Windows\system32> Get-ScheduledTaskInfo -TaskName “\test-checkmk”
LastRunTime : 2024-03-26 08:00:00
LastTaskResult : 0
NextRunTime : 2024-04-13 12:00:00
NumberOfMissedRuns : 435
TaskName : \test-checkmk
TaskPath :
PSComputerName :
The difference is the Get-ScheduledTaskInfo is also picking upp NumberOfMissedRuns. Is it possible to trigger alert in checmk based on NumberOfMissedRuns?
Thanks