Nagios core not sending notification emails

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Nagios core not sending notification emails

Post 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!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios core not sending notification emails

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Re: Nagios core not sending notification emails

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios core not sending notification emails

Post 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?
Former Nagios Employee
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Re: Nagios core not sending notification emails

Post 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..
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios core not sending notification emails

Post 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.
Former Nagios Employee
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Re: Nagios core not sending notification emails

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios core not sending notification emails

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mrkrupp
Posts: 22
Joined: Fri Apr 01, 2016 5:23 pm

Re: Nagios core not sending notification emails

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios core not sending notification emails

Post by Box293 »

It's apparent you have a networking issue.

What's the output of:

Code: Select all

ip addr
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked