Page 1 of 3

Nagios core not sending notification emails

Posted: Tue May 17, 2016 4:29 pm
by mrkrupp
Hello,
I am on RHEL 7. And I'm running Nagios 4.1.1 with the plugins 2.1.1 and my nagios seemed to be configured correctly before. I was receiving notification emails for the servers I was monitoring being up or down but the emails have stopped coming in and I'm not sure why. I looked at my nagios config file and it is still pointing to the correct contact.cfg file, which has the correct email listed in it.

Any ideas and help would be greatly appreciated!

Thanks!

Re: Nagios core not sending notification emails

Posted: Tue May 17, 2016 4:42 pm
by tgriep
Are you using sendmail or postfix for sending email from the server?
Are there any error messages in the /var/log/maillog file that could help you out in this?

Re: Nagios core not sending notification emails

Posted: Wed May 25, 2016 6:56 pm
by mrkrupp
I am using postfix. I restarted the serviceIt is currently running and does not show errors when I check its status.

in the maillog May 25 16:42:42 bserver218 postfix/master[2754]: daemon started -- version 2.10.1, configuration /etc/postfix is the last line I see, no errors or anything are popping up after that.

Re: Nagios core not sending notification emails

Posted: Thu May 26, 2016 10:49 am
by rkennedy
Can you post your maillog file for us to look at? I'm hoping we can see a 'delayed' or 'rejected'. Do you notice a different result if you change the contact notification email?

Re: Nagios core not sending notification emails

Posted: Thu May 26, 2016 2:34 pm
by mrkrupp

Code: Select all

May 25 16:20:25 bauspap218 postfix/sendmail[4479]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:20:27 bauspap218 postfix/sendmail[4475]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:20:38 bauspap218 postfix/sendmail[4485]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:20:49 bauspap218 postfix/sendmail[4507]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:20:56 bauspap218 postfix/sendmail[4515]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:21:10 bauspap218 postfix/sendmail[4548]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:21:12 bauspap218 postfix/sendmail[4538]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:21:19 bauspap218 postfix/sendmail[4564]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:21:20 bauspap218 postfix/sendmail[4549]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:21:23 bauspap218 postfix/sendmail[4567]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:21:33 bauspap218 postfix/sendmail[4571]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:21:44 bauspap218 postfix/sendmail[4578]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:22:00 bauspap218 postfix/sendmail[4610]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:22:04 bauspap218 postfix/sendmail[4625]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:22:05 bauspap218 postfix/sendmail[4619]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:22:07 bauspap218 postfix/sendmail[4616]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:22:09 bauspap218 postfix[4635]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:22:20 bauspap218 postfix/sendmail[4648]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:24:42 bauspap218 postfix/sendmail[4854]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:25:20 bauspap218 postfix[4892]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:26:55 bauspap218 postfix/sendmail[5069]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:27:37 bauspap218 postfix[5087]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:37:35 bauspap218 postfix/sendmail[2374]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:38:11 bauspap218 postfix[2436]: fatal: config variable inet_interfaces: host not found: localhost
May 25 16:42:42 bauspap218 postfix/postfix-script[2752]: starting the Postfix mail system
May 25 16:42:42 bauspap218 postfix/master[2754]: daemon started -- version 2.10.1, configuration /etc/postfix
May 26 09:02:21 bauspap218 postfix/postfix-script[1452]: starting the Postfix mail system
May 26 09:02:21 bauspap218 postfix/master[1460]: daemon started -- version 2.10.1, configuration /etc/postfix
I restarted one of our systems to see if a notification would try and send, but nothing appeared in the log. I see the message being generated in the var/log/messages though..

Re: Nagios core not sending notification emails

Posted: Thu May 26, 2016 3:56 pm
by rkennedy
From the Nagios machine, what is the output of nslookup localhost? Also, please post your /etc/hosts file for us to look at.

Re: Nagios core not sending notification emails

Posted: Thu May 26, 2016 5:51 pm
by mrkrupp
when I try the nslookup localhost I am timing out... it cant find any servers.

/etc/hosts file:

127.0.0.1 bauspap218.bam.com bauspap218 localhost.localdomain localhost
172.17.205.83 bauspap310.bam.com bauspap310
172.17.205.94 bauspap312.bam.com bauspap312
172.29.10.103 cgunx03

Re: Nagios core not sending notification emails

Posted: Thu May 26, 2016 8:48 pm
by Box293
What is the output of:

Code: Select all

host localhost
This requires bind-utils to be installed.

Code: Select all

yum -y install bind-utils

Re: Nagios core not sending notification emails

Posted: Fri May 27, 2016 10:19 am
by mrkrupp
host localhost output:
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

yum -y install bind-utils

[root@bauspap218 ~]# yum -y install bind-utils
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
[Errno -3] Temporary failure in name resolution

Package 32:bind-utils-9.9.4-29.el7_2.3.x86_64 already installed and latest version

Re: Nagios core not sending notification emails

Posted: Mon May 30, 2016 1:52 am
by Box293
It's apparent you have a networking issue.

What's the output of:

Code: Select all

ip addr