can nagios take some pro-active actions?

Menard, Chris Chris.Menard at Aspect.com
Thu Sep 3 17:40:13 CEST 2009


Using nagios event_handlers provided a couple benefits.

First, you can configure when to restart or correct the service.  You can wait for the 2nd or 3rd SOFT non-OK status to perform the corrective action.  This takes into account false-positives (as described in another thread today) and will avoid corrective actions when not needed.

Second, by using nagios event_handlers, you have a record of all actions in one place, and visibility to the issue.

From: Leandro Quibem Magnabosco [mailto:leandro.magnabosco at fcdl-sc.org.br]
Sent: Thursday, September 03, 2009 8:19 AM
To: Leonardo Carneiro
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] can nagios take some pro-active actions?

"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<http://www.example.com>.
It would connect to www.example.com<http://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,

[cid:image001.gif at 01CA2C8B.2B064D30]




Leandro Quibem Magnabosco
Consultor de TI
(48) 3251-5323
leandro.magnabosco at fcdl-sc.org.br<mailto:leandro.magnabosco at fcdl-sc.org.br>
www.fcdl-sc.org.br<http://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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090903/91462261/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3319 bytes
Desc: image001.gif
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090903/91462261/attachment.gif>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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


More information about the Users mailing list