Pessoal,
 Instalei o Nagios 3.0.2 aqui, e coloquei tudo pra rodar, inclusive alertas
por som, mas o envio de e-mails não tá funcionando!!  :(

Eu instalei o MTA (exim4) assim como na documentação do Nagios pede, e
alterei o /bin/mail para /usr/bin/mail

O meu command.cfg:


define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert:
$HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
        }

# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service
Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }


O Meu contacts.cfg

define contact{
        contact_name                    nagiosadmin             ; Short name
of user
        use                             generic-contact         ; Inherit
default values from generic-contact template (defined above)
        alias                           Nagios Admin            ; Full name
of user
        host_notifications_enabled              1
        service_notifications_enabled   1
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        service_notification_commands   notify-service-by-email
        host_notification_options       d,u,r
        host_notification_commands      notify-host-by-email


        email                           [EMAIL PROTECTED] ;
        }


O Meu nagios.log

[1212640473] SERVICE NOTIFICATION: nagiosadmin;jwbl;MySQL
Queries;CRITICAL;notify-service-by-email;NRPE: Unable to read output
[1212641053] Warning: Return code of 127 for check of service 'MYSQLD' on
host 'localhost' was out of bounds. Make sure the plugin you're trying to
run actually exists.
[1212641653] Warning: Return code of 127 for check of service 'MYSQLD' on
host 'localhost' was out of bounds. Make sure the plugin you're trying to
run actually exists.
[1212641873] HOST NOTIFICATION:
nagiosadmin;linksys-srw224p;DOWN;notify-host-by-email;(Host Check Timed Out)
[1212642063] Auto-save of retention data completed successfully.
[1212642253] Warning: Return code of 127 for check of service 'MYSQLD' on
host 'localhost' was out of bounds. Make sure the plugin you're trying to
run actually exists.


Eu até tentei instalar este plugin
http://www.nagiosexchange.org/cgi-bin/page.cgi?g=2217.html;d=1

Para ver se funcionava :(

Tem que colocar alguma coisa no host.cfg ? Alguma diretiva dizendo que ele
deve alertar? Pois não achei na documentação do Nagios!


Vlws

-- 
------------------------------
"Segurança da Informação se faz com tecnologia, processos e pessoas, e a
formação destas exige mais que uma seqüência de treinamentos. Porque você
treina macacos. Pessoas,você educa."

FreeBSD: The Freedom to Perform!
http://www.spreadbsd.org/aff/40/1
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
-- 
Nagios-users-br@lists.sourceforge.net mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users-br
Wiki: http://nagios-br.sf.net/wiki

Responder a