Nagios XI and NCPA

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
robatwork
Posts: 28
Joined: Fri Feb 02, 2018 5:08 am

Nagios XI and NCPA

Post by robatwork »

Hello,
Having been pointed away from NPRE and towards NCPA to monitor my Windows 2012 server, I have a simple query that I can't seen addressed int eh docs.

Can I restart a windows service if it, for example, goes above a certain CPU threshold?

thanks
Rob
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios XI and NCPA

Post by dwhitfield »

Why not just use NSClient .4.4? That works for you, correct? Here's the previous thread: https://support.nagios.com/forum/viewtopic.php?t=47359
robatwork
Posts: 28
Joined: Fri Feb 02, 2018 5:08 am

Re: Nagios XI and NCPA

Post by robatwork »

I didn't manage to get the services restarted using NSclient++ so I thought I'd try your supported client as advised - if it can't do service restarts then I will persevere with NSClient++

So can you control windows services with NCPA?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios XI and NCPA

Post by npolovenko »

@robatwork, Here's a tutorial on how to restart a windows service using NRPE part of the NSClient++
https://assets.nagios.com/downloads/nag ... 2hEALw_wcB
You could also create an event handler to do this automatically:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Let me know if you'd like me to assist you with NSCLient + NRPE, or if you'd like to go with NCPA instead.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
robatwork
Posts: 28
Joined: Fri Feb 02, 2018 5:08 am

Re: Nagios XI and NCPA

Post by robatwork »

npolovenko wrote:@robatwork, Here's a tutorial on how to restart a windows service using NRPE part of the NSClient++
https://assets.nagios.com/downloads/nag ... 2hEALw_wcB
You could also create an event handler to do this automatically:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Let me know if you'd like me to assist you with NSCLient + NRPE, or if you'd like to go with NCPA instead.
Hi- thanks for the reply. Just for clarity - NCPA can't restart services?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios XI and NCPA

Post by npolovenko »

@robatwork, You can. It works differently on NCPA. You'd write a plugin that restarts windows services and put in the plugins directory on a windows server. Then you'd use the following command:

Code: Select all

https://localhost:5693/api/plugins/<plugin name>/<arg1>/<arg2>/?token=mytoken
or

Code: Select all

check_ncpa.py -H my.host.com -t mytoken -M 'plugins/restart_service.bat'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked