Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
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
add comment

1 Answer

up vote 6 down vote accepted

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

http://nagios.sourceforge.net/docs/3_0/eventhandlers.html

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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