need help in configuring email notifications for nagios core

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
anoopjeev
Posts: 29
Joined: Wed Jul 26, 2017 6:58 pm

need help in configuring email notifications for nagios core

Post 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?
Last edited by anoopjeev on Mon Sep 18, 2017 5:07 pm, edited 1 time in total.
dwasswa

Re: need help in configuring email notifications for nagios

Post 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.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: need help in configuring email notifications for nagios

Post 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.
anoopjeev
Posts: 29
Joined: Wed Jul 26, 2017 6:58 pm

Re: need help in configuring email notifications for nagios

Post 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
Attachments
Capture.JPG
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: need help in configuring email notifications for nagios

Post 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.
anoopjeev
Posts: 29
Joined: Wed Jul 26, 2017 6:58 pm

Re: need help in configuring email notifications for nagios

Post 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: xxxxxxxxxx@xxxx.nc.gov
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??
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: need help in configuring email notifications for nagios

Post 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).
Former Nagios employee
anoopjeev
Posts: 29
Joined: Wed Jul 26, 2017 6:58 pm

Re: need help in configuring email notifications for nagios

Post 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?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: need help in configuring email notifications for nagios

Post 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.
Locked