Tried several ways, using default check_tasksched works and checks only enabled ones by default (filter).
Now my problem: running tasks will be notified with "warning" while they're running.
Now after several tries... found a solution:
Using the filter:
because 267009 seems to be the code for "running".
Here's the command-template:
object CheckCommand "check_tasksched" {
import "plugin-check-command"
command = [
PluginDir + "/check_nrpe",
"-H", "$address$",
"-c", "check_tasksched",
"-a", "filter=$filter$"
]
vars = {
"filter" = "enabled eq 1 AND not exit_code eq 267009"
}
}
Don't forget to set CheckTaskSched = 1 in nsclient.ini.
Further infos for that command: http://docs.nsclient.org/reference/windows/CheckTaskSched/#check_tasksched_filter_keys