Need help with CheckTaskSched


#1

Hello!

I have a MS Windows Server 2012 R2 (en) System the package NSClient++ in Version 0.4.4.23 installed. In the nsclient.ini in the modules section I did add: CheckTaskSched = 1

On that system there is a Scheduled Task, that runs daily and sometime it could produce a return code that is not 0. I need to monitor that scheduled task.

I searched on the web and didn’t find a working solution yet. I found that the installed NSClient++ version and the operating system matters. So I postet the information above.

One thing that I tried is: root# /usr/local/icinga/libexec/check_nrpe -H hostname.domain.tld -c CheckTaskSched -a “filter=title eq ‘jobname’” “warn=exit_code ne 0 OR count ne 1” "detail-syntax=${title}: ${exit_code}" Failed to validate filter see log for details root#

sincerely yours

Mario


#2

Hi!

I found a solution. Here it is: check_command $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_tasksched -a “filter=title eq ‘$ARG1$’” “critical=exit_code ne 0” “show-all”

ARG1 is the name of the Scheduled Task that I want to monitor.

thanks and you can close the case.

sincerely yours

Mario