how to configure & Monitor Windows Schedule Tasks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

how to configure & Monitor Windows Schedule Tasks

Post by cyient »

Hi ,

I want to configure & Monitor Windows schedule Tasks in Nagios XI 5.4.3 tool .Please share the configuration procedure and suitable plugins .

Thanks in Advance

Sridhar
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: how to configure & Monitor Windows Schedule Tasks

Post by mcapra »

@WillemDH did a pretty good write-up of this topic:
https://outsideit.net/monitoring-window ... led-tasks/

You will need to leverage NSClient++ as the agent on the Windows-side of things for this. More on that topic here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

The above documentation won't work for check_nrpe though. This documentation covers enabling the NRPE server on your NSClient++ setup:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Former Nagios employee
https://www.mcapra.com/
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: how to configure & Monitor Windows Schedule Tasks

Post by avandemore »

Thanks @mcapra!
@cyient, does that answer your question?
Previous Nagios employee
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: how to configure & Monitor Windows Schedule Tasks

Post by cyient »

Hi ,

As per your given url download powershell script check_ms_win_tasks.ps1 , installed NSClient++ agent in windows server 2008 R2 and configured NRPE settings also .

We configured command for checking schedule tasks

check_ms_win_tasks : $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c $ARG1$ $ARG2$ $ARG3$ $ARG4$

But we got some error message , please find the attached documents for your reference and give the proper solution for that .I think In our domain scripts are not running so , please provide any plugin for monitoring windows tasks.

Thanks in advance

Regards
Sridhar
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: how to configure & Monitor Windows Schedule Tasks

Post by mcapra »

You will need to change the Powershell settings on the remote machine to allow the script to run. These articles should help:
https://technet.microsoft.com/en-us/lib ... 76961.aspx
https://superuser.com/questions/106360/ ... ll-scripts
Former Nagios employee
https://www.mcapra.com/
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: how to configure & Monitor Windows Schedule Tasks

Post by dwhitfield »

Thanks for the assist @mcapra!
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: how to configure & Monitor Windows Schedule Tasks

Post by cyient »

HI Team,

We have followed below steps enabled the script to run on Remote machine. We could see the Uptime,Tasks,Ping and other services but we could not find the number of task Running,Succeeded,Failure of the Task. When we opened the task column we could not see the number of task Running,Succeeded,Failure for reference please find the attached screenshot1.

Regards,
Sridhar
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: how to configure & Monitor Windows Schedule Tasks

Post by dwhitfield »

It looks like you will need to modify the output of the script.

As a test, what's the output of the powershell script when you run it on Windows?

As far as editing the script, if you don't know Powershell, you could write your script in any language you have access to on Windows. Certainly there are community members that may be able to help you modify your script, but as a matter of policy, the support team doesn't write custom scripts.
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: how to configure & Monitor Windows Schedule Tasks

Post by cyient »

Hi ,

As per your request we have run powershell script in windows system , please find the attachment for output figure 1 .

and also attached documents are Powershell script and nsclient.ini .

Please check the files and give the correct configuration of nsclient.ini file for excute the powershell script in Nagios monitoring tool .


Thanking in Advance
Sridhar
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: how to configure & Monitor Windows Schedule Tasks

Post by tgriep »

I looks like the check command that is defined in XI is missing the NRPE command and it is just doing the version check.
Edit the service and add the following to the $ARG1$ field and see if that fixes the issue.

Code: Select all

check_ms_win_tasks
and add this to $ARG2$

Code: Select all

a '-H localhost -IF "\\"'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked