Customise email notifications

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Customise email notifications

Postby McHenry » Mon Mar 12, 2018 1:20 am

I have email notifications for warning and critical situations and it works well.

I would like to customise these notifications where possible starting with the sender address.

Presently all emails received originate from: nagios@localhost.localdomain
I would like the emails to be sent from:

I thought the networking config was set correctly as per below however the hosts file still has the default settings.

[root@myserver ~]# hostname
[root@myserver ~]#
[root@myserver ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail. localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
[root@myserver ~]#
Posts: 16
Joined: Thu Jan 15, 2015 5:01 pm

Re: Customise email notifications

Postby mcapra » Mon Mar 12, 2018 8:55 am

Can you share the command definition(s) you are currently using for your notification commands?

The answer to this depends on which mail client you're using as well as some things on the mail server side. Here's how to set the "sender" address if you're using mailx:
Former Nagios employee
User avatar
Posts: 3600
Joined: Thu May 05, 2016 3:54 pm

Re: Customise email notifications

Postby kyang » Tue Mar 13, 2018 11:25 am

Thanks for the help @mcapra!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Support Tech
Posts: 1792
Joined: Tue Jul 25, 2017 3:35 pm

Return to Nagios Core

Who is online

Users browsing this forum: C.Appl, LAINFOSEC, MSN [Bot], PetrSobota and 38 guests