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
Nagios XI and NCPA
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios XI and NCPA
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
Re: Nagios XI and NCPA
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?
So can you control windows services with NCPA?
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios XI and NCPA
@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.
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.
Re: Nagios XI and NCPA
Hi- thanks for the reply. Just for clarity - NCPA can't restart services?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.
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios XI and NCPA
@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:
or
Code: Select all
https://localhost:5693/api/plugins/<plugin name>/<arg1>/<arg2>/?token=mytoken
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.