Service Handlers and Remote Hosts

I’m trying to setup Nagios such that if it detects that apache has stopped or is no longer responding that it will execute a script to restart apache.

After muddling through setting up sudo (I’m not extremely proficient when it comes to the really geeky side of Linu:evil: I managed to get Nagios to kick off an event handler on the local machine to restart apache when I stop it. So at least I know I have a working script to accomplish that part of my goal. I have also managed to get NRPE to work on another box and can do the NRPE-based checks using check_nrpe.

So, all that being said, what is the best route for me to take? I’m thinking that I’ll need to have either NRPE or NCSA on the box I want to be able to bounce apache on, but how do I get Nagios to kick of the script that way?

On remote 'nix type machines, I install a mini nagios setup and send the output via nsca to the Central nagios server.
So, the way I would do it is to setup a mini nagios on your linux box, with no cgi’s/html/etc. The checks on the remote machine running apache would be run via that nagios setup. The checks that fail, would then fire off the eventhandler and restart apache.
Edited Thu Feb 16 2006, 07:09PM ]