Configuring e-Mail Notifications in Nagios Core

This forum is intended for the discussion of Nagios Core development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagios-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: Configuring e-Mail Notifications in Nagios Core

Postby michaelpn » Wed Nov 08, 2017 11:36 am

Hi Kyang,

output: /usr/bin/mail
Should I still install mailx ?
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 36
Joined: Fri Jul 14, 2017 12:12 am

Re: Configuring e-Mail Notifications in Nagios Core

Postby michaelpn » Wed Nov 08, 2017 11:40 am

[quote="michaelpn"]Hi Kyang,

output: /usr/bin/mail - please see my attachment. My "notify-host-by-email' command definition" is set to => usr/bin/mail in the definition :)





Should I still install mailx ?

Yes I still recieve SMS notification :)
Attachments
katalog.PNG
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 36
Joined: Fri Jul 14, 2017 12:12 am

Re: Configuring e-Mail Notifications in Nagios Core

Postby kyang » Wed Nov 08, 2017 3:15 pm

output: /usr/bin/mail - please see my attachment. My "notify-host-by-email' command definition" is set to => usr/bin/mail in the definition

It seems like you are missing a /? Instead of usr/bin/mail it should be /usr/bin/mail

Could you post your commands.cfg again, just to double check?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
 
Posts: 706
Joined: Tue Jul 25, 2017 3:35 pm

Re: Configuring e-Mail Notifications in Nagios Core

Postby michaelpn » Thu Nov 09, 2017 12:14 pm

Hi kyang,

now it works :) :) you were right :) it was "/" missing.

Now it is working for my my mail accout. Do I then have to setup my colleges mail accounts the same way I did with my using this?


Configure Postfix For Relaying

To configure our Postfix server for relaying emails through smtp.example.com, we run

postconf -e 'relayhost = smtp.example.com'
postconf -e 'smtp_sasl_auth_enable = yes'
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
postconf -e 'smtp_sasl_security_options ='

Our username (someuser) and password (howtoforge) for smtp.example.com must be stored in /etc/postfix/sasl_passwd, therefore we do this:

echo "smtp.example.com someuser:howtoforge" > /etc/postfix/sasl_passwd

/etc/postfix/sasl_passwd must be owned by root, and noone else should have read access to that file, so we do this:

chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd

Now we must convert /etc/postfix/sasl_passwd into a format that Postfix can read:

postmap /etc/postfix/sasl_passwd

This will create the file /etc/postfix/sasl_passwd.db.

All that is left to do is restart Postfix:

/etc/init.d/postfix restart
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 36
Joined: Fri Jul 14, 2017 12:12 am

Re: Configuring e-Mail Notifications in Nagios Core

Postby kyang » Thu Nov 09, 2017 3:36 pm

Glad to hear it's working!

Now it is working for my my mail accout. Do I then have to setup my colleges mail accounts the same way I did with my using this?

By this, do you mean you will be setting up other mail accounts for another Core or the same Core server?

by dwhitfield
You're probably just going to be sending email as one user, correct? That would be the only user that needs to auth.

What @dwhitfield said is probably still the case, but try it out and see what happens.

Did you have any more questions or are we okay to close this thread?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
 
Posts: 706
Joined: Tue Jul 25, 2017 3:35 pm

Re: Configuring e-Mail Notifications in Nagios Core

Postby michaelpn » Thu Nov 09, 2017 3:56 pm

Hi kyang,

What I’m meaning is I still have 5 other users who should be notisfied like me by mail. So my question is how should I do that ? Do I use the same command like I did for me meaning using the relay configuring ? You see in my contact.cfg file all get a SMS notification the should also be notified by mail. Do you now understand :) I will try to enable them again in my contact.cfg file and look how it goes :)
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 36
Joined: Fri Jul 14, 2017 12:12 am

Re: Configuring e-Mail Notifications in Nagios Core

Postby michaelpn » Fri Nov 10, 2017 9:49 am

Hi
you can close this thread now.
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
michaelpn
 
Posts: 36
Joined: Fri Jul 14, 2017 12:12 am

Re: Configuring e-Mail Notifications in Nagios Core

Postby kyang » Fri Nov 10, 2017 11:51 am

Sounds great, hope you got it working! I'll be closing this topic.

If you have any more questions, feel free to create another thread!

Thank you for using the Nagios Support Forum!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
 
Posts: 706
Joined: Tue Jul 25, 2017 3:35 pm

Previous

Return to Nagios Core Development

Who is online

Users browsing this forum: No registered users and 4 guests