Page 1 of 1

Email Clarification

Posted: Tue Jun 26, 2012 2:29 pm
by jbennett
I am in need of some clarification on how the email notifications function in Nagios.

I picked up this box from a previous admin who passed along virtually no information.

Under email settings, the SMTP radio button is selected. An email address has been entered and my understanding is that this email address functions only as a relay. There is no SMTP security set.

Unfortunately, it seems that I cannot get email to be sent to some contacts.

When I check maillog, I see the following:

Code: Select all

Jun 26 14:32:17 NagiosXI sendmail[21821]: q5QJWH9n021821: to=$, ctladdr=nagios (500/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30242, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
When Nagios is set to use SMTP instead of sendmail in the settings, is this just saying that the MTU is still sendmail, but that it should use SMTP at the same time?

Any insight would be greatly appreciated.

Re: Email Clarification

Posted: Wed Jun 27, 2012 7:59 am
by scottwilkerson
Do you have an SMTP server setup on this machine? It looks like you are sending it locally

Code: Select all

..Connection refused by [127.0.0.1]

Re: Email Clarification

Posted: Wed Jun 27, 2012 10:04 am
by jbennett
I didn't think so, however, I notice that it mentions sendmail in the log.

Unfortunately, it appears that my sendmail.cf file is empty and I can't use M4 to generate a new one from sendmail.mc since m4 (and the sendmail-cf package) isn't installed.

I can't just 'yum install sendmail-cf' because i'm behind a proxy and I can't seem to get past it.

Re: Email Clarification

Posted: Wed Jun 27, 2012 10:08 am
by scottwilkerson
Are you using the default notification handlers for your contacts/users?
Configure -> CCM -> Contacts -> Modify -> Host command & Service command
xi_host_notification_handler
&
xi_service_notification_handler


If so, What do you have set in Admin -> Manage Email Settings ?

Re: Email Clarification

Posted: Mon Jul 02, 2012 9:39 am
by jbennett
scottwilkerson wrote:Are you using the default notification handlers for your contacts/users?
Configure -> CCM -> Contacts -> Modify -> Host command & Service command
xi_host_notification_handler
&
xi_service_notification_handler


If so, What do you have set in Admin -> Manage Email Settings ?
It looks like there are a selected under notifications.

I have the following:

hosts:
host-notify-by-email
xi_host_event_handler
xi_host_notification_handler

services:
notify-by-email
xi_service_event_handler
xi_service_notification_handler

I just took a look under the email settings and it appears that the auto-fill on the browser is to blame. Even though I hadn't saved the settings, for some reason, the username & password were filled in when they shouldn't have been.

Re: Email Clarification

Posted: Mon Jul 02, 2012 9:46 am
by scottwilkerson
I just want to point out that while you may have a custom setup and reason to send duplicate messages, generally you should ONLY have the following:

hosts:
xi_host_notification_handler

services:
xi_service_notification_handler