NSClient CheckTaskSched Questions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

NSClient CheckTaskSched Questions

Post 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
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NSClient CheckTaskSched Questions

Post 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.
Nagios XI 5.8.1
https://outsideit.net
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: NSClient CheckTaskSched Questions

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NSClient CheckTaskSched Questions

Post 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.
Nagios XI 5.8.1
https://outsideit.net
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: NSClient CheckTaskSched Questions

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NSClient CheckTaskSched Questions

Post by tmcdonald »

Thanks as usual for the input, Willem!

raja, I assume we are safe to lock this thread?
Former Nagios employee
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: NSClient CheckTaskSched Questions

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
Locked