Page 1 of 3

Re: Questions from a beginner

Posted: Thu May 02, 2013 6:12 am
by WillemDH
We have the same problem. Notifications for users are sent out normally, but when there is only a contact, no email is sent.

THis is the output of [root@srvnagios01 ~]# ll /etc/alternatives/mta

lrwxrwxrwx. 1 root root 26 Jun 6 2012 /etc/alternatives/mta -> /usr/sbin/sendmail.postfix

Also in the notifications area, you can see the notification to the contact should have been sent out, but no email is arriving in the mailbox.

Tried changing the hostname localhost in Nagios XI itself, and addign an entry to the /etc/hosts "<ip> <hostname> , but still no email notifications for contacts though.
Notifications for users still work though..

Looking into the /var/log/maillog it seems nagios is trying to connect to the wrong smtp server..
I can see the following entries:
May 2 15:35:09 srvnagios01 postfix/smtp[4552]: connect to mail2.domain.be[xxx.123.3.141]:25: Connection timed out
May 2 15:35:39 srvnagios01 postfix/smtp[4552]: connect to mail.domain.be[xxx.123.26.149]:25: Connection timed out

But mail.domain.be and the IP addresses don't exist... So obviously Nagios fails to send the email.. Can anyone tell me where I can change the smtp server he tries connecting to? As I seem to find only information about Nagios Core and Sendmail on the web.


Any help is much appreciated.

Re: Questions from a beginner

Posted: Thu May 02, 2013 10:16 am
by abrist
@WillemDH: Are you using sendmail or smtp in XI? Have you configured the "send mail from" address in brackets under Admin --> Manage email settings?

Re: Questions from a beginner

Posted: Thu May 02, 2013 2:00 pm
by WillemDH
We are using smtp in XI. Notifications for users are arrving normally. I'll check tomoorow if I put it between bracket.

Re: Questions from a beginner

Posted: Thu May 02, 2013 3:52 pm
by slansing
Could both of you PM me your latest configuration snapshot? It is located at Admin > Manage Snapshots > Download the latest one by clicking the diskette icon.

Re: Questions from a beginner

Posted: Fri May 03, 2013 12:50 am
by WillemDH
Config snapshot has been sent. The contact I have been testing with is "test.contact". Manage Email settings has been set but it's not within brackets => Nagios XI <[email protected]>

Re: Questions from a beginner

Posted: Fri May 03, 2013 7:53 am
by scottwilkerson
Have you set the hostname for this machine?

Re: Questions from a beginner

Posted: Mon May 06, 2013 2:07 am
by WillemDH
Yes the hostname of the machine has been set.

Re: Questions from a beginner

Posted: Mon May 06, 2013 10:58 am
by slansing
Can you provide me with an example host/service who had tripped a notification to be sent? "I should have asked this before, apologies." You can send that information in a PM if need be. In addition, is this test.contact also a user? Do you have a sample user with it's own contact who is not receiving notifications?

Re: Questions from a beginner

Posted: Tue May 07, 2013 3:29 am
by WillemDH
Sent you a pm with new config file and tests.

Re: Questions from a beginner

Posted: Tue May 07, 2013 9:24 am
by slansing
Excellent, I replied via PM, once we solve this there I'll post the resolution here.