Page 1 of 1

NSClient CheckTaskSched Questions

Posted: Mon Jun 23, 2014 9:36 pm
by rajasegar
XI 2012R2.9 Enterprise Edition
Windows 2008R2
NSClient 0.4.1.102
CheckTaskSched2 = 1

I have 2 tasks in the Task Scheduler

./check_nrpe -H 10.104.28.124 -c CheckTaskSched -a "filter=title eq 'Test' AND exit_code ne 0" MaxCrit=1 "syntax=%title%: %exit_code% %most_recent_run_time%"
Test: 5555 2014-Jun-24 02:01:47, eventlog: 1 > critical|'eventlog'=1;0;1

./check_nrpe -H 10.104.28.124 -c CheckTaskSched -a "filter=title eq 'Test2' AND exit_code ne 0" MaxCrit=1 "syntax=%title%: %exit_code% %most_recent_run_time%"
Test2: 6666 2014-Jun-24 02:11:46, eventlog: 1 > critical|'eventlog'=1;0;1

The time returned is GMT, how do I get it to return the same timezone as the target machine?

Here I used a wrong name for the title
./check_nrpe -H 10.104.28.124 -c CheckTaskSched -a "filter=title eq 'Test231312' AND exit_code ne 0" MaxCrit=1 "syntax=%title%: %exit_code% %most_recent_run_time%"
OK: All scheduled tasks are good.|'eventlog'=0;0;1

Since the task name is not found, I want it to say, task not found with unknown error code. How do I go about this?

Thanks

Re: NSClient CheckTaskSched Questions

Posted: Tue Jun 24, 2014 6:45 am
by WillemDH
I had some issues with the checktasksched too, so I made my own script to monitor them. You could give it a try. http://exchange.nagios.org/directory/Pl ... ks/details You can edit the output as you like in the script.

Re: NSClient CheckTaskSched Questions

Posted: Tue Jun 24, 2014 6:50 am
by rajasegar
WillemDH wrote:I had some issues with the checktasksched too, so I made my own script to monitor them. You could give it a try. http://exchange.nagios.org/directory/Pl ... ks/details You can edit the output as you like in the script.
I did see your script but the administrator requirements is not possible in my environment.

Re: NSClient CheckTaskSched Questions

Posted: Tue Jun 24, 2014 7:15 am
by WillemDH
Well, if you are running the script locally, there should not be any administrator requirements. I can confirm I have it running on a server as local system.

Re: NSClient CheckTaskSched Questions

Posted: Tue Jun 24, 2014 6:02 pm
by rajasegar
WillemDH wrote:Well, if you are running the script locally, there should not be any administrator requirements. I can confirm I have it running on a server as local system.
This is great news as we run it locally also. I have given up on the NSClient for Task Schedule monitoring.
Thanks for your effort in producing this plugin.

Re: NSClient CheckTaskSched Questions

Posted: Wed Jun 25, 2014 8:48 am
by tmcdonald
Thanks as usual for the input, Willem!

raja, I assume we are safe to lock this thread?

Re: NSClient CheckTaskSched Questions

Posted: Wed Jun 25, 2014 7:00 pm
by rajasegar
tmcdonald wrote:Thanks as usual for the input, Willem!

raja, I assume we are safe to lock this thread?
Yes, please close it.