Page 1 of 1

Check_tasksched Critical Not Found

Posted: Mon Oct 15, 2018 7:34 pm
by kwhogster
Nagios 4.3.4
Nsclient 4.2.3
Windows 2016 DC servers
Exchange 2016 CU10 DAG 2 Node2

So I have two Servers running Exchange and they both have the same scheduled tasks

The check fails Critical Exchange Journal NOT FOUND

I ran from command line with same result.

From Node 2 it fails

Code: Select all

root@serv017:/usr/local/nagios/etc/objects/windowsservers# /usr/lib/nagios/plugins/check_nrpe -t 50 -H SERV021-N2 -c check_tasksched -a "filter=title eq 'Exchange Journal'" 'critical=most_recent_run_time < -1w' empty-state=critical 'empty-syntax=CRITICAL: Exchange Journal NOT found' 'detail-syntax=${title} is stale more than -1w'
CRITICAL: Exchange Journal NOT found

From Node 1 it works.

root@serv017:/usr/local/nagios/etc/objects/windowsservers# /usr/lib/nagios/plugins/check_nrpe -t 50 -H SERV021-N1 -c check_tasksched -a "filter=title eq 'Exchange Journal'" 'critical=most_recent_run_time < -1w' empty-state=critical 'empty-syntax=CRITICAL: Exchange Journal NOT found' 'detail-syntax=${title} is stale more than -1w'
: All tasks are ok|'Exchange Journal_exit_code'=0;0;0 'Exchange Journal_most_recent_run_time'=1539637200;0;1539044570
I attached some images.

The attachment Exchange Journal Task.PNG is no longer available
Powershell view
Powershell view
the task
the task
Exchange Journal Task.PNG (4.91 KiB) Viewed 3157 times


I deleted the task and recreated it no luck

Any ideas

Thank you

Tom

Re: Check_tasksched Critical Not Found

Posted: Tue Oct 16, 2018 4:11 pm
by tgriep
Can you post your nsclient.ini file from both servers so we can check to see if there are any differences?
Do you see and errors in the nsclient.log file when you are polling the server that is generating the error?

Re: Check_tasksched Critical Not Found

Posted: Tue Oct 16, 2018 4:12 pm
by cdienger
I'm not sure how nsclient++ finds the scheduled jobs so it may be more fruitful to pose this to their forums, but make sure that the module is installed and enabled first. On my nsclient++ machine this required running "nscp settings --activate-module CheckTaskSched --add-default" in the c:\program files\nsclient++ directory. Once that was installed and enabled I could see scheduled tasks by running "nscp test" and then "check_tasksched" in the nsclient++ directory.

Re: Check_tasksched Critical Not Found

Posted: Tue Oct 16, 2018 9:59 pm
by kwhogster
To CDienger,

Ran the command and still no change I even restarted the NSCP service and ran the check.


TGriep

I am attaching both nsclient.ini for your review.
nsclientnode1.txt
NODE 1 that works
(23.27 KiB) Downloaded 294 times
nsclientnode1.txt
NODE 1 that works
(23.27 KiB) Downloaded 294 times

Thanks to both HTH

Tom

Re: Check_tasksched Critical Not Found

Posted: Wed Oct 17, 2018 1:07 pm
by cdienger
The configurations are identical in all the meaningful ways.

To clarify - running "nscp test" and then "check_tasksched" in the nsclient++ directory didn't show the job? If so, then it sounds like something with the nsclient++ module. https://exchange.nagios.org/directory/P ... ks/details looks like it could be an alternative.

Re: Check_tasksched Critical Not Found

Posted: Wed Oct 17, 2018 11:07 pm
by kwhogster
Guys

Sorry I did not express this before.

On Both NODES I have Several Task Scheduler checks which all work fine

It is just this one task scheduler check

Any thoughts?

Re: Check_tasksched Critical Not Found

Posted: Thu Oct 18, 2018 12:06 am
by kwhogster
Guys

Update.

Problem was on the Schedule Task on the Windows 2016 Server

It was marked as hidden unchecked the box and like that the check is now working.


Please Lock this as resolved.

Thank you for all the help

Re: Check_tasksched Critical Not Found

Posted: Thu Oct 18, 2018 2:59 pm
by cdienger
Glad to hear you were able to resolve it and thanks for posting the solution! :)