Welcome to Pandora FMS Community › Forums › Community support › Restarting down agents/processes?
-
Restarting down agents/processes?
Posted by mac315 on June 4, 2008 at 20:07Does anyone know or have any idea… I use Pandora FMS to monitor an application to check to see if that said application is up or down. Periodically the application goes down and Pandora sends a notification which is great.
But my question is, does anyone know if there is a way that once the signal is generated that the application is down, Pandora can restart the application? or send a signal to have the application restarted?
Seems to me that it would not be that difficult, because the agent will send a 1 or 0 to the server depending on if the application is up or down. If it is down and you can capture the 0 trap you should be able to send a restart signal as well as give notice the application is down.
I just can’t find a way to do it yet. Any assistance would greatly be appreciated.
mac315 replied 16 years, 8 months ago 3 Members · 4 Replies -
4 Replies
-
::
The only way I can image you can do that is creating a new alert. In theory, in the command line you can add the commands to restart the application, if that application runs in the same box as Pandora FMS Server/Console…. If not, but you can restart remotely the application running some scripts, you can invoke those scripts from the alert command… I think 😀
Please, advise me if I’m wrong
Raul
-
::
The application is running on a remote box that has an agent on it that sends data to the Pandora FMS Server via ssh.
For more detail, it is a snort box, that inspects the network (Legally), and sometimes the buffer gets overloaded and the application bombs. When this happens I normally get a Pandora Alert telling me the application is down. I then have to log in and restart the app. This happens about once every week and half. The problem is that it is a secure network and if I am outside the facility I have not way to remotely connect to restart the app. Sometimes I have to wait until the next day to restart.
To be more specific, I was wondering if there was a way to have the Pandora FMS server send a signal to the remote server to run a perl script, etc, that could restart that service when it detected it was down.
-
::
Hi mac,
As Raul said, it is “possible”.
You can define an alert that runs a script.
The key here is that script must contain some sort of instructions to connect to the remote server (sending login and pass, if needed), and do what you need to be done.
For that script you might want to take a look at expect, which is great for those kind of interaction (specially when sending user/pass automatically)Did I explain myself?
-
::
Yep, I believe you explained it. I will set up an alert that calls a script that will log into the box and restart the application.
I don’t know if I will get to this until this weekend with my work load, but I will be posting the results here after I attempt it.
Thanks, and BTW, this is a great product.