Jump to content

Recommended Posts

Posted
Hi my company is currently using Nagios to remotely monitor systems running on the ubuntu os. NRPE was installed in all of the host machines that are being monitored. There is a new requirement, which is to use the Nagios server to reboot a remote system whenever the company decides or needs to. Has anybody done this before? It must be done using Nagios and/or NRPE. I have been searching the internet for weeks with no luck.
Posted
Hi my company is currently using Nagios to remotely monitor systems running on the ubuntu os. NRPE was installed in all of the host machines that are being monitored. There is a new requirement, which is to use the Nagios server to reboot a remote system whenever the company decides or needs to. Has anybody done this before? It must be done using Nagios and/or NRPE. I have been searching the internet for weeks with no luck.

 

You will need to write a script with your reboot command in. Then call this script as if it were a check running on the remote host. Of course, the script would only be run manually.

 

I'm not sure that using Nagios to do this is ideal though.

Posted
I've done this using Nagios to issue a shutdown -r via ssh

 

Also try WebReboot Nagios Plugin - Nagios Exchange (I haven't used this so YMMV).

 

Hi unixman_again.. thanks for your reply. I just started using Nagios and i did try connecting via ssh. Just to confirm, were you referring to the check_ssh command? i tried using that but i always get as "Connection refused" reply when i try using it.

Posted
You will need to write a script with your reboot command in. Then call this script as if it were a check running on the remote host. Of course, the script would only be run manually.

 

I'm not sure that using Nagios to do this is ideal though.

 

i have written the script but stuck at the part where i have to enter the sudo password. I tried using <

Posted
When I did it, I wrote my own script. To execute a script on a remote machine, setup an ssh certificate. Trying to get the root password through isn't easy unless you know Expect (which I do - I used it extensively over the years).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...