We have SSIS tasks (dtexec
) that are executed by Windows Task Manager and monitored by Nagios. Regularly, however, Nagios reports warnings because the exit code is empty (where it should be 0). This appears to happen if the check happens while the task is running (GUI-wise, Task Manager then displays a kind of temporary exit code).
define service{
use generic-service
host_name ms.example.com
service_description My task name
retry_interval 10
check_command check_schedtask!"TaskName=\\"\\Category\\My task name\\"" "ExitCode=0x0" "Elapsed=1.0:10" "LastEvent"
contact_groups
contacts Annoyed people
notification_interval 240
servicegroups functional_tasks
}
How can I ignore tasks that are running during the check?