Title: Untitled Document
"Olá" Leonardo,

Please note that Nagios uses mostly scripts to check services/disk/etc. and that those scripts that 'tell' nagios the status of the service/daemon/disk/etc.
That said, I think you should not focus on Nagios to be proactive hence that it's scripts could be used for that.

Let's say you have check_http configured to check www.example.com.
It would connect to www.example.com on port 80 and report if it suceeds on sending a cmd or not .
If something goes wrong, it would send a critical message back.
This does not mean that the script is necessarily alerting nagios about the problem, it is alerting whatever called it in the first place.

What I mean is, you don't *need* nagios to be in the middle of it and (IMO) you should not try to integrate it into this kind of solution because it would just make things more complicated.

One simple way to implement that would be improving the scripts that comes with nagios-plugins.
A "simple" if statement and some coding after it would do the trick.
If the script already has the capability to check the status of something and be aware of the present status and take active measures .

Interfere with the  "function" that prints the message "CRITICAL" to make it, for eg., "ssh -T host /etc/init.d/apache2 restart".

This email might be a little confusing cause I'm not thinking proper english this morning, but I would be happy to help you in our both mother language (portuguese) if you prefer.

Good luck for now,

 

Leandro Quibem Magnabosco
Consultor de TI
(48) 3251-5323
[email protected]
www.fcdl-sc.org.br

Rua: Rafael Bandeira, 41
CEP. 88015-450  Florianópolis - SC

"Este é um e-mail oriundo da Federação das Câmaras de Dirigentes Lojistas de Santa Catarina, e seu conteúdo é confidencial e destinado exclusivamente a seu(s) destinatário(s), não podendo ser copiado ou repassado,no todo ou em parte, a terceiros. Se esta mensagem foi-lhe enviada por engano, pedimos o obséquio de entrar em contato conosco.
This is an e-mail from the Federação das Câmaras de Dirigentes Lojistas de Santa Catarina and its contents are privileged and confidential to the ordinary user(s) of the e-mail address(es) to which it was addressed, and no one else may copy or forward all or any of it in any form. If this e-mail was sent to you in error, please contact us."



Leonardo Carneiro escreveu:
hello everyone.

Started to play with Nagios a few days ago and i'm very excited with it. 
I have a very small setup (2 linux server being monitored via npre by a 
third linux server) and i'd wrote some bash scripts to monitor some of 
the services that we run on those services (proprietary services, 
non-standard ones like ssh, apache and that stuff).

I know Nagios can send sms, email and other things to warn 
administrators about problems, but can Nagios take any action to fix the 
problem, like restart the service if reach critical state, or restart 
the service if the service stays critical for more than 5 minutes?

If yes, can someone just point me to the direction i should go? :)

Tks in advance, and sorry about my poor english. I'm from Brazil.
  
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to