Report this

What is the reason for this report?

How do I setup email sending and notifications when using Nagios?

Posted on March 10, 2019

Hello

While the Nagios tutorial is really good, it does not show how to install something like Postfix and get email notifications up and running, which is the most important part of Nagios.

How do I set it up?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey friend,

Great topic! Installing Postfix and running your own mail server is certainly an option, but I might recommend using an external SMTP provider. Back in the day you could just slap on postfix and start sending mail, standards were just a guide. Now sending email means following and keeping up with the latest standards. It means having nearly flawless headers, PTR, forward confirmed reverse DNS, SPF, DKIM for a little extra push, all that jazz.

I don’t know about you, but when I think “make my monitoring system send me emails” I don’t think “I’d like to get into the email business and become an expert in it.” Yet, to run your own mail server, that is basically what you have to do to avoid very annoying issues like rate limiting, being filtered to the spam folder, or having your emails outright rejected by major email providers. If it sounds fun, by all means dig in, but I think you’re going to be more satisfied with a simpler approach here.

For that reason, I’m going to suggest this tutorial which outlines a path for using an external email service (Gmail in this case) to send the alerts:

https://www.unixmen.com/send-alerts-nagios-core-using-gmail-yahoo/

Jarland

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.