1

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.

Markus
  • 1,360
  • 1
  • 16
  • 22

1 Answers1

1

Now after several tries... found a solution:

Using the filter:

  • "enabled eq 1 AND not exit_code eq 267009"

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

MacMartin
  • 2,366
  • 1
  • 24
  • 27
Markus
  • 1,360
  • 1
  • 16
  • 22