I am aware of how NSClient++ can restart services automatically when they fail. Tried it with an SFTP service on a Windows box and it works nicely.
With the monitoring system we use it's possible to *manually* execute an action to restart an application/service (both on Windows and on Linux).
For example, when the process is still running but does not appear to be responsive anymore.
This feature is highly valued by support engineers who have no direct access to the host(s) themselves, for restarting services.
Does Nagios XI have this possibility? I searched the forum and the 'net at large but did not find a concrete example.
Manually executing remote commands
Manually executing remote commands
--
Martijn
Martijn
Re: Manually executing remote commands
At this time it does not. The only way to execute the NSClient++ commands would be through a shell of some sort.
You could always add an additional allowed ip both to NRPE and NSClient++ though, and build a platform for accomplishing something like this though. Then your shell wouldn't need to be on the Nagios server itself.
I can file a feature request if you'd like for something like this, if you'd like.
You could always add an additional allowed ip both to NRPE and NSClient++ though, and build a platform for accomplishing something like this though. Then your shell wouldn't need to be on the Nagios server itself.
I can file a feature request if you'd like for something like this, if you'd like.
Former Nagios Employee
Re: Manually executing remote commands
I think it would be a valuable addition to Nagios XI to be able to manually execute remote commands on a host for those occasions when personnel do not have, or are not allowed, direct access to the host. Please create a feature request for this. Will you need more input from me for that?
Practical example: my company makes use of an 'offshore partner' for overnight monitoring. Some of their guys have no direct shell/command/RDP access to our hosts, but using the functionality of our current monitoring system they are able to manually restart applications by way of the monitoring system, when required. Thus they can solve certain issues immediately, improving service uptime and letting me sleep
Our current solution is cross-platform (Windows Server, Linux). Leveraging the installed base of NRPE and NSClient++ would be the practical way to go, I would say (disclaimer: I'm new enough to Nagios that I do not know how the internals of these work).
Practical example: my company makes use of an 'offshore partner' for overnight monitoring. Some of their guys have no direct shell/command/RDP access to our hosts, but using the functionality of our current monitoring system they are able to manually restart applications by way of the monitoring system, when required. Thus they can solve certain issues immediately, improving service uptime and letting me sleep
Our current solution is cross-platform (Windows Server, Linux). Leveraging the installed base of NRPE and NSClient++ would be the practical way to go, I would say (disclaimer: I'm new enough to Nagios that I do not know how the internals of these work).
--
Martijn
Martijn
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Manually executing remote commands
This can be done using the Actions Component.
Here's a guide:
https://support.nagios.com/kb/article.php?id=204
Here's another guide:
https://support.nagios.com/kb/article.php?id=408
Basically all you need to do is create a bash script that executes check_nrpe and passes some variables to it, just like you do with the SFTP service.
The actions component is quite powerful, it just takes a little bit to get your head around it. One of our end users combines it with Nagios Reactor to push out and update NSClient++ http://outsideit.net/naf-windows-request-install
Here's a guide:
https://support.nagios.com/kb/article.php?id=204
Here's another guide:
https://support.nagios.com/kb/article.php?id=408
Basically all you need to do is create a bash script that executes check_nrpe and passes some variables to it, just like you do with the SFTP service.
The actions component is quite powerful, it just takes a little bit to get your head around it. One of our end users combines it with Nagios Reactor to push out and update NSClient++ http://outsideit.net/naf-windows-request-install
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.