OK, guys, sorry for my probably stupid questions but I'm very new at this. I was assigned to research how to use Nagios to monitor different services and if a service falls down, to attempt to restart it and send out notification. Nagios seems to be huge software and I don't find the docs to be very friendly for a newcommer like me...

I've successfully installed Nagios on a Debian box, I've configured the web interface and now I'm frustrated.

So, I want to be able to monitor a service. I can write all the logic as a python plugin probably - I can write a command_line program in python that will read in the parameters supplied by Nagios, return the status code, message, etc but I do not know where to put that plugin, how to configure it so that Nagios is aware if it.

I also do not know how to attach event handlers if service' status changes - to implement some logic like restarting the service, etc.

Any help will be very appreciated - a link to tutorial might be all I need, just point me the direction.

  • 1
    Nagios can do that as the answer below says, but things like monit are better designed for restarting services. – johnshen64 Apr 5 '12 at 15:10

You want to look at Nagios Event Handlers. Here's the official documentation:


There's an example of restarting a process on that page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.