Email Alerts not working

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
creditsafe
Posts: 5
Joined: Wed May 21, 2014 9:40 am

Email Alerts not working

Post by creditsafe »

Hello,

We have been trialing Nagios log Server now for a good week with a view to purchasing as we already a Nagios XI customer.

Everything seems to be working fine, that was until we tried to test email alerting and having searched the forums I can see another user has posted something similar (http://support.nagios.com/forum/viewtop ... 37&t=30597)

So we have made sure certain alerting conditions are being met, which they're, yet no email alerts are arriving and I dont think their even making it out of the server at the minute. I've checked with one of our Exchange guys this morning and hes confirmed there is nothing in the Exchange relay logs for the servers address.

I've checked the mailog on Nagios Log Server and this is whats in there;
Jan 14 10:48:09 localhost sendmail[1428]: starting daemon (8.14.4): SMTP+queueing@01:00:00
Jan 14 10:48:09 localhost sm-msp-queue[1436]: starting daemon (8.14.4): queueing@01:00:00

No entries before or after the above timestamp... and no sign of mail being sent.

The mail settings on Nagios Log Server are identical to that of our Nagios XI instance. Same exchange server IP address, same sender address (We dont use TLS or SSL) The settings are literally identical on both servers. NagiosXI sends mail absolutely fine and always has done, Nagios Log Server... nothing.

Would appreciate some help on what we might be doing wrong here in terms of setup and config, or is there any other commands or tests we can run to find out why no mail is getting out of the box.
Last edited by creditsafe on Tue Jan 20, 2015 5:38 am, edited 1 time in total.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Email Alerts not working

Post by tgriep »

Could you go to "Alerting" and provide a screen capture of that screen?
Be sure to check out our Knowledgebase for helpful articles and solutions!
creditsafe
Posts: 5
Joined: Wed May 21, 2014 9:40 am

Re: Email Alerts not working

Post by creditsafe »

Hi,

Yes of course, please see below screensho - taken from this morning.
alert_screen.png
You do not have the required permissions to view the files attached to this post.
Last edited by creditsafe on Tue Jan 20, 2015 5:38 am, edited 1 time in total.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Email Alerts not working

Post by tmcdonald »

When you set up the SMTP settings, are you entering a username/password or leaving that blank?
Former Nagios employee
creditsafe
Posts: 5
Joined: Wed May 21, 2014 9:40 am

Re: Email Alerts not working

Post by creditsafe »

Hi,

Here are the email settings were using; no to your question though - settings are identical to the two instances of Nagios we have running within the organisation. NagiosXI alerts fine with the settings, the Log Server isnt basically.
email_settings.png
Something else I noticed, when checking the mailog this morning again, there appears to be 3 logs in the folder now, should this be the case?
mailog.png
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Email Alerts not working

Post by tgriep »

In the Alerts, in the Alert Method field, are the user names that the Alert is sending too in there?
Be sure to check out our Knowledgebase for helpful articles and solutions!
creditsafe
Posts: 5
Joined: Wed May 21, 2014 9:40 am

Re: Email Alerts not working

Post by creditsafe »

Yes, there are multiple usernames in there, all of which can be selected. I'm the current recipient for the alerts. I have also tried using a different user, but the same result... no alerts being sent.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Email Alerts not working

Post by lgroschen »

Are you using security encryption on your SMTP mail server? TLS/SSL/STARTTLS? Because that functionality has just been added and may cause your SMTP alert to fail if it doesn't know the protocol.

A good work around for this until the update comes out is to add the encryption to the front of the hostname:

SSL: ssl://<hostname>
TLS: tls://<hostname>
STARTTLS: tcp://<hostname>
/Luke
creditsafe
Posts: 5
Joined: Wed May 21, 2014 9:40 am

Re: Email Alerts not working

Post by creditsafe »

Hi,

No, we arent using any form of encryption.

I do have an update as we managed to get it working this morning and wish we had tried this sooner. We switched the send email method from SMTP Server to PHP Mail and bang, email alerts start coming through and this is also reflected in the mailog now.

So, could there be an issue with the SMTP service/setup on the server? (We're using the x64 OVF from the Nagios downloads for reference)

Cheers.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Email Alerts not working

Post by lgroschen »

There was a recent update that was made to the SMTP also. If you get that update to Log Server here, you will know it's up to date when you see a new drop down that reads 'SMTP Security' and has all the security options with 'None' as default in the SMTP mail settings.

Can you try updating and see if the SMTP alert fails again? Also, could you run this command before you go through testing this and we can see if there are any errors that are popping up from adjusting the email settings, saving and generating an alert:

Code: Select all

tail -f /var/log/httpd/error_log
Also, go through your SMTP settings and make sure everything is set and also properly input into the mail settings. Hopefully we can figure out if this is a bug or not.
/Luke
Locked