Re: Problemas para enviar e-mail.

Heitor Felipe Lessa <[email protected]>
Newsgroups gmane.network.nagios.user.brazil
Message-ID <[email protected]>
Olá meu caro,

 Os arquivos estão corretos, como estão os hosts ou serviços?

 O exim é bem simples, pra te ajudar segue o arquivo de configuração, somente configure ele que fica na pasta do exim4 "/etc/exim4/update-exim4.conf.conf".

 A forma que está configurada é apontando para um Relay que fará o envio sem a autenticação que é o recomendável.

dc_eximconfig_configtype='satellite'
dc_other_hostnames='Dominio do e-mail -> teste.com.br por exemplo'
dc_local_interfaces='IP do servidor Nagios'
dc_readhost='Coloque o mesmo que other_hostnames'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='Smarthost é o servidor que fará o Relay, 200.174.51.133 por exemplo'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

Como pode ver é bem simples, eu instalei o mesmo no Debian mas em outras distros o conf é o mesmo, qualquer dúvida poste.

Lembre-se sempre de olhar o log para ver como anda os processos via # tail -f

Forte abraço.

Atenciosamente,

Heitor Lessa





> From: [email protected]
> Date: Fri, 15 Jan 2010 10:54:22 -0200
> To: [email protected]
> Subject: Re: [Nagios-users-br] Problemas para enviar e-mail.
> 
> Prezado Heitor,
> Segue abaixo as configurações de todos os arquivos de templates, mas como um
> teste configurei um host teste sem utilizar nenhum template, passei todas as
> configurações.
> 
> Vou procurar alguma informação a respeito da implementação do exim.
> 
> Agradeço a ajuda.
> 
> arquivo contacttemplates.cfg
> 
> define contact {
>     name                                  generic-contact
>     contactgroups                         admins
>     host_notification_period              24x7
>     service_notification_period           24x7
>     host_notification_options             d,u,r,f,s
>     service_notification_options          w,u,c,r,f,s
>     host_notification_commands            notify-host-by-email
>     service_notification_commands         notify-service-by-email
>     register                            0
>     }
> 
> arquivo hosttemplate.cfg
> 
> define host {
>        name                                  generic-host
>        max_check_attempts                    3
>        check_interval                        5
>        retry_interval                        1
>        check_period                          24x7
>        event_handler                         notify-host-by-email
>        event_handler_enabled                 1
>        flap_detection_enabled                1
>        process_perf_data                     1
>        retain_status_information             1
>        retain_nonstatus_information          1
>        contact_groups                        admins
>        notification_interval                 0
>        notification_period                   24x7
>        first_notification_delay              0
>        notification_options                  d,u,r,f,s
>        notifications_enabled                 1
>        stalking_options                      o,d,u
>        failure_prediction_enabled            1
>        register                            0
> 
> }
> 
> arquivo servicetemplate.cfg
> 
> define service {
>        name                                  generic-service
>        is_volatile                           0
>        max_check_attempts                    3
>        check_interval                        10
>        retry_interval                        2
>        active_checks_enabled                 1
>        passive_checks_enabled                1
>        check_period                          24x7
>        obsess_over_service                   1
>        check_freshness                       0
>        event_handler                         notify-service-by-email
>        event_handler_enabled                 1
>        flap_detection_enabled                1
>        process_perf_data                     1
>        retain_status_information             1
>        retain_nonstatus_information          1
>        notification_interval                 0
>        first_notification_delay              0
>        notification_period                   24x7
>        notification_options                  w,u,r,c,f,s
>        notifications_enabled                 1
>        contact_groups                        admins
>        stalking_options                      o,w,u,c
>        failure_prediction_enabled            1
>        register                            0
> 
> }
> 
> 2010/1/14 Heitor Felipe Lessa <[email protected]>
> 
> >
> > Caro,
> >
> >  Como está a configuração do templates.cfg?
> >
> >  Utilizo a mesma versão porém sem o NagiosQL.
> >
> >  Em relação ao MTA eu tentei utilizá-lo (Email 2.5.1) mas tive vários
> > problemas como este, voltei para o exim e tudo está funcionando
> > perfeitamente.
> >
> > Atenciosamente,
> >
> > Heitor Lessa
> >
> >
> >
> >
> > > From: [email protected]
> > > Date: Thu, 14 Jan 2010 11:14:59 -0200
> > > To: [email protected]
> > > Subject: [Nagios-users-br] Problemas para enviar e-mail.
> > >
> > > Prezados,
> > >
> > > Estou com o seguinte problema no nagios.
> > >
> > > Mesmo com as configurações de notificação não estou recendo e-mail de
> > > qualquer tipo de status. O curioso é que não é nada referente ao e-mail,
> > > pois quando entro na interface do nagios e forço uma notificação de
> > testes
> > > recebo o e-mail normalmente, me parece alguma coisa na configuração do
> > host,
> > > porém já configurei de todas as maneiras. Utilizo a versão 3.2.0 do
> > nagios,
> > > o plugin de e-mail  da clean code ( Email 2.5.1 ) e para fazer as
> > > configurações uso o nagiosql 3.0.3, o sistema está instalado em um server
> > > ubuntu 8.04.
> > >
> > > Abaixo o arquivo de configuração do host
> > >
> > > define host {
> > >     host_name            TESTE
> > >     address                10.1.3.220
> > >     check_command            check-host-alive
> > >     max_check_attempts        2
> > >     check_interval            5
> > >     retry_interval            1
> > >     check_period            24x7
> > >     event_handler            notify-host-by-email
> > >     contacts            nagiosadmin
> > >     notification_interval        0
> > >     notification_period        24x7
> > >     first_notification_delay    0
> > >     notification_options        d,u,r,f,s
> > >     stalking_options        o,d,u
> > >     register            1
> > >     }
> > >
> > > contacts.cfg
> > >
> > > define contact {
> > >     contact_name                          nagiosadmin
> > >     alias                                 Nagios Admin
> > >     contactgroups                         admins
> > >     host_notification_period              24x7
> > >     service_notification_period           24x7
> > >     host_notification_options             d,u,r,f,s,n
> > >     service_notification_options          w,u,c,r,f,s,n
> > >     host_notification_commands            notify-host-by-email
> > >     service_notification_commands         notify-service-by-email
> > >     email                                XXXXX@XXXXXX
> > >     use                                   generic-contact
> > >     }
> > >
> > > Olhando o log do nagios é possivel ver que o evento é chamado.
> > >
> > > Retornando ao estado ok
> > >
> > > [01-13-2010 17:51:57] HOST EVENT HANDLER:
> > > TESTE;UP;HARD;1;notify-host-by-email
> > > [image: Host Up][01-13-2010 17:51:57] HOST ALERT: TESTE;UP;HARD;1;PING OK
> > -
> > > Packet loss = 0%, RTA = 1.53 ms
> > >
> > >
> > > Entrando em estado critico
> > >
> > > [01-13-2010 17:41:37] HOST EVENT HANDLER:
> > > TESTE;DOWN;HARD;2;notify-host-by-email
> > > [image: Host Down][01-13-2010 17:41:37] HOST ALERT:
> > > TESTE;DOWN;HARD;2;CRITICAL - Host Unreachable (10.1.3.220)
> > >
> > >
> > >
> > > Alguem já passou por algo semelhante ou tem ideia do que mais posso fazer
> > > para testar.
> > > --
> > > =============================
> > > Atenciosamente,
> > >
> > > Paulo de Souza Nunes
> > > =============================
> > >
> > ------------------------------------------------------------------------------
> > > Throughout its 18-year history, RSA Conference consistently attracts the
> > > world's best and brightest in the field, creating opportunities for
> > Conference
> > > attendees to learn about information security's most important issues
> > through
> > > interactions with peers, luminaries and emerging and established
> > companies.
> > > http://p.sf.net/sfu/rsaconf-dev2dev
> > > --
> > > [email protected] mailing list
> > > https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> > > Wiki: http://nagios-br.sf.net/wiki
> >
> > _________________________________________________________________
> > Com o Windows 7 nenhum arquivo vai se esconder de você. Clique para
> > conhecer !
> > http://www.microsoft.com/brasil/windows7/default.html?WT.mc_id=1539
> >
> > ------------------------------------------------------------------------------
> > Throughout its 18-year history, RSA Conference consistently attracts the
> > world's best and brightest in the field, creating opportunities for
> > Conference
> > attendees to learn about information security's most important issues
> > through
> > interactions with peers, luminaries and emerging and established companies.
> > http://p.sf.net/sfu/rsaconf-dev2dev
> > --
> > [email protected] mailing list
> > https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> > Wiki: http://nagios-br.sf.net/wiki
> >
> 
> 
> 
> -- 
> =============================
> Atenciosamente,
> 
> Paulo de Souza Nunes
> E-mail: [email protected]
> Cel: 21 87183618
> Cel: 21 94793902
> =============================
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> -- 
> [email protected] mailing list
> https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> Wiki: http://nagios-br.sf.net/wiki
 		 	   		  
_________________________________________________________________
Agora é fácil compartilhar fotos no Messenger: solte todas na janelinha. Veja como!
http://www.windowslive.com.br/public/tip.aspx/view/77?product=2&ocid=CRM-WindowsLive:dicaCompartilhamentoFotos:Tagline:WLCRM:On:WL:pt-BR:Messenger
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-- 
[email protected] mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users-br
Wiki: http://nagios-br.sf.net/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.