Page 1 of 2
Email Warnings - patchy at best, generally don't get any
Posted: Fri Jan 25, 2019 6:58 am
by robatwork
Email notifications from our Nagios XI installation either don't work at all, or sometimes email one user.
Setup:
Just upgraded to the latest 5.5.9 and rebooted.
Users are logging in with their AD credentials as Nagios is linked to AD.
Email is setup to use SMTP unencrypted, sending via our Exchange server.
The test emails always send fine.
In Admin/Manage Users, Email All Users always works fine too.
So I conclude emails are setup OK
There are 4 users setup including me. All are set the same in Notification Preferences - Enable is ticked and all alerts are also ticked to email.
Notification methods - Receive alerts by email is ticked.
Now it gets weird. On occasion, but more often not, I get emails from Nagios about services stopped and started.
Nobody else ever gets any notifications.
Further info is that a non-domain authenticated admin user also gets test emails to a gmail account, but never receives alerts either.
Where do I start investigating?
(Edit: read sticky - it's 64 bit VMware version. nagiosxi-64 free edition
Guest OS
CentOS 4/5 or later (64-bit)
Compatibility
ESX/ESXi 4.0 and later (VM version 7)
VMware Tools
No
CPUs
2
Memory
2 GB
)
Re: Email Warnings - patchy at best, generally don't get any
Posted: Fri Jan 25, 2019 7:20 am
by robatwork
If it helps, here are the headers from one of the few notifications that got through to me:
Code: Select all
Received: from EXCHANGE1.ad.london.co.uk
(xxxx:233d:e792:7822:e3c2:1177:df51:3298) by EXCHANGE1.ad.london.co.uk
(xxxx:233d:e792:7822:e3c2:1177:df51:3298) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3
via Mailbox Transport; Fri, 25 Jan 2019 11:41:39 +0000
Received: from nagios.ad.london.co.uk (192.168.0.119) by
EXCHANGE1.ad.london.co.uk (xxxx:233d:e792:7822:e3c2:1177:df51:3298) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Fri, 25 Jan
2019 11:41:39 +0000
Date: Fri, 25 Jan 2019 11:41:38 +0000
To: <[email protected]>
From: NAGIOS <[email protected]>
Reply-To: NAGIOS <[email protected]>
Subject: FLAPPINGSTART Service Alert - WEB/Uptime is OK
Message-ID: <[email protected]>
X-Priority: 1
X-Mailer: PHPMailer 5.2.26 (https://github.com/PHPMailer/PHPMailer)
X-MSMail-Priority: High
Importance: High
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_459d964d05e5eeb2f3611802aed54134"
Content-Transfer-Encoding: 8bit
Return-Path: [email protected]
X-MS-Exchange-Organization-Network-Message-Id: cdd9be65-598c-4ba9-59e8-08d682ba11aa
X-MS-Exchange-Organization-AuthSource: EXCHANGE1.ad.london.co.uk
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 07
X-ClientProxiedBy: EXCHANGE1.ad.london.co.uk
(xxxx:233d:e792:7822:e3c2:1177:df51:3298) To EXCHANGE1.ad.london.co.uk
(xxxx:233d:e792:7822:e3c2:1177:df51:3298)
X-EsetResult: clean, is OK
X-EsetId: 37303A292DAD936A647263
X-MS-Exchange-Organization-AVStamp-Enterprise: 1.0
X-MS-Exchange-Transport-EndToEndLatency: 00:00:00.3820773
X-MS-Exchange-Processed-By-BccFoldering: 15.01.1531.003
Re: Email Warnings - patchy at best, generally don't get any
Posted: Fri Jan 25, 2019 3:20 pm
by benjaminsmith
Hello
@robatwork,
Can you upload or post the notifications report for the period in question. Go to Home > Incident Management > Notifications. I'd like to review a report of the notifications sent, for which host and service and the contact.
Also, could you post the mail log, so we can review any errors.
Code: Select all
/usr/local/nagiosxi/tmp/phpmailer.log
Thanks.
Reference: Nagios XI - Notification Problems
https://support.nagios.com/kb/article.php?id=36
Re: Email Warnings - patchy at best, generally don't get any
Posted: Mon Jan 28, 2019 4:48 am
by robatwork
Hello @benjaminsmith, many thanks for your reply.
I'm not doing well with your requests so far!
Firstly I don't have the option for Incident Management, having googled, it looks like I need to install IM as per
https://support.nagios.com/kb/article.php?id=107 which I will do now.
Also, that file you refer to doesn't exist on my system:
[root@nagios ~]# find / -name "phpmailer.log" -print
[root@nagios ~]#
Over the weekend, 2 out of 5 people set to get email notifications got them. One on our domain and the other on gmail, so no pattern to the failure.
regards
Rob
Re: Email Warnings - patchy at best, generally don't get any
Posted: Mon Jan 28, 2019 10:20 am
by robatwork
I have managed to load NagiosIM and am doing further investigation myself, and will update this thread in due course
kind regards
Rob
Re: Email Warnings - patchy at best, generally don't get any
Posted: Mon Jan 28, 2019 2:54 pm
by benjaminsmith
Hi Rob,
I have managed to load NagiosIM and am doing further investigation myself, and will update this thread in due course
kind regards
Sounds good. Let me know if you have any questions.
Re: Email Warnings - patchy at best, generally don't get any
Posted: Tue Jan 29, 2019 6:47 am
by robatwork
I've worked it out now - will document briefly for other inexperienced users who come across this thread.
Your tip about NagiosIM helped - I was able to see the alerts being sent. From that I noticed certain alerts were going to the admin, and some to me. But it was consistent.
So what I needed to do was configure all the hosts and services to send to the right people - the template must have been to just send alerts to whomever had setup the service/host.
I setup a contact group for alerts and added the users to that, then put that group in each service and host ALERTS tab we needed to be alerted for.
There may well be an easier way of doing the above with editing/importing files rather than using the GUI, but NagiosXI was working as expected, I just hadn't realised it doesn't send everything to everyone by default - it's service and host based.
I also changed the templates so that future services will also go to the alerts group.
You can close the thread, thanks
Re: Email Warnings - patchy at best, generally don't get any
Posted: Tue Jan 29, 2019 6:57 am
by robatwork
Oh just a quick update - when I loaded NagiosIM it then broke NagiosXI
nagiosxi is currently unable to handle this request. HTTP ERROR 500
I had to reload sourceguardian:
Code: Select all
cd /usr/local/nagiosxi/tmp/nagiosxi/
./install-sourceguardian-extension.sh
Re: Email Warnings - patchy at best, generally don't get any
Posted: Tue Jan 29, 2019 12:09 pm
by benjaminsmith
Hi
@robatwork,
Oh just a quick update - when I loaded NagiosIM it then broke NagiosXI
Interesting. Did you get it working again?
Re: Email Warnings - patchy at best, generally don't get any
Posted: Wed Jan 30, 2019 3:55 am
by robatwork
Yes Benjamin after much googling I had to ./install-sourceguardian-extension.sh which seemed to sort out the httpd issues.
So now I have the incident manager embedded into NagiosXI which looks very helpful. just playing with all the notification settings now as we want some alerts to be sent within seconds of an issue but not all.