Page 1 of 1

need help in configuring email notifications for nagios core

Posted: Mon Sep 18, 2017 2:52 pm
by anoopjeev
Can someone share videos/official documentation on how to configure email notifications for nagios core.
My nagios server is on centos 7. Please let me know if you need any more details.
When i am reading about this, i see people talking about send mail and post fix. Which one should i choose?

Re: need help in configuring email notifications for nagios

Posted: Mon Sep 18, 2017 4:23 pm
by dwasswa
Hi @ anoopjeev,

You are going to be using postfix which Linux uses by default.
For email notifications,you will need to create object definitions.

Here is some documentation below:
object definitions

https://assets.nagios.com/downloads/nag ... tions.html

https://access.redhat.com/documentation ... tions.html



Here is also another forum topic related to yours...https://support.nagios.com/forum/viewto ... =7&t=38375

Please let me know if you have any questions or find something confusing.

Re: need help in configuring email notifications for nagios

Posted: Mon Sep 18, 2017 4:46 pm
by tacolover101
notify-host-by-email and notify-service-by-email will be your 'stock' notification commands. how these are defined in your commands.cfg, is what they will act on. if you need to add any SMTP information, this is where you would do so.

if you experience problems, take a look at your maillog for more information why.

Re: need help in configuring email notifications for nagios

Posted: Mon Sep 18, 2017 5:05 pm
by anoopjeev
HI @ dwasswa

I was trying to follow this link: http://www.telnetport25.com/2012/02/con ... gios-core/. As it was in ubuntu, and my server is on centos,
I did yum install postfix. But that didn't take me to the next step of choosing "what type of POSTFIX SMTP Server". please check the attachment.
Are the steps different for centos? Please help

Re: need help in configuring email notifications for nagios

Posted: Mon Sep 18, 2017 8:45 pm
by dwhitfield
Thanks @tacolover101!

Postfixadmin is a little different, but I wonder if it would be better for your situation: https://www.rosehosting.com/blog/how-to ... -centos-7/

Also, have you looked at Nagios XI? I think you'll find setting up notifications are much easier. There's a free trial, so you might as well give it a shot. You could also just copy over the postfix config from a working XI server.

Re: need help in configuring email notifications for nagios

Posted: Tue Sep 19, 2017 9:02 am
by anoopjeev
Thanks for the responses. This is my first time working with Linux, nagios and email servers.
Setting up mail server is pretty confusing to me. Can some one please take some time and explain patiently please.
My main idea is to setup mail server and send it to my official email. it is some thing like this: [email protected]
And all my computers fqdn is xxxxxx.ncxxxxx.pri.
I want the nagios notifications come to office email.

I looked up at this article: https://wiki.centos.org/HowTos/postfix

My questions here are:
In the article it says to create users and mail boxes. Are these dummy users?
or should i use my original name and email here?
what is relaying??

Re: need help in configuring email notifications for nagios

Posted: Tue Sep 19, 2017 9:45 am
by tmcdonald
Not to push you away, but configuring a mail server is outside the scope of what we support here, and is not something generally speaking that should be attempted by someone brand new to Linux. Is there a Linux admin in your organization who could take a look at this thread and help get that set up? That would probably be faster and less error-prone than trying to do it yourself (no offense meant at all).

Re: need help in configuring email notifications for nagios

Posted: Tue Sep 19, 2017 10:22 am
by anoopjeev
tmcdonald wrote:Not to push you away, but configuring a mail server is outside the scope of what we support here, and is not something generally speaking that should be attempted by someone brand new to Linux. Is there a Linux admin in your organization who could take a look at this thread and help get that set up? That would probably be faster and less error-prone than trying to do it yourself (no offense meant at all).
No offense taken. I will take help from linux admin.
One last question, can nagios core send email notifications without installing any mailing system?

Re: need help in configuring email notifications for nagios

Posted: Tue Sep 19, 2017 4:33 pm
by dwhitfield
anoopjeev wrote: can nagios core send email notifications without installing any mailing system?
You could send out notifications, but not mail notifications. I think what you're looking for is a mail relay, to avoid having to set up everything.

PagerDuty has some really good documentation on setting up notifications from the Nagios side once you get the mail relay set up.