Nagios email notifications don't get sent, need to configure mailx, how?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Nagios email notifications don't get sent, need to configure mailx, how?
Okay so I've set up nagios on a CentOS 5 box and am having trouble getting it to send out email, nagios is monitoring several systems/services in the building. What I need to do is to get nagios to send notifications using a mail server rather than trying to send from itself, if that makes sense. I've googled all over the place about how to do this, but I couldn't find clear steps or guidelines everywhere and I haven't gotten the emails to get out of the box. So I guess my question is what are the steps I need to follow to get nagios email notifications sending through an external mail server?
Do you have any MTA (Mail Transfer Agent) like for example Postfix set up? Also can you indicate if you are sending mail to your own mail server or to something like a GMail/Hotmail/other account? The way I have it set up is using Postfix to relay all mail to our GMail for Enterprises and it works like a charm.
I believe I have postfix installed, but don't know exactly how to configure it to interact with nagios and the mail server. I'm trying to send the email through my companies mail server.
Thanks,
-MJ
If you have Postfix installed then all you have to do is configure it to relay the mail to your company's mailserver. Is the Nagios server on the same network as the mailserver? Configuration of Postfix for this is done in the main.cf configuration file. I'm not familiar with CentOS but I think it should be in /etc/postfix directory.
In order to relay your mails from Nagios to your mailserver in your main.cf file you should have something like this:
That should get you started sending mail to your mailserver. Of course you'll have to tell your mailserver to allow relaying from your nagios server in order to work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.