Hosts/Services problem notifition sender email is different

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
phyo
Posts: 162
Joined: Sun Dec 01, 2013 10:50 pm

Re: Hosts/Services problem notifition sender email is differ

Post by phyo »

tgriep wrote:Go to Admin > System Config > Manage Email Settings and post back how the Mail Method is setup.
Here is the email setting.

Image
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Hosts/Services problem notifition sender email is differ

Post by tgriep »

Try changing the Alert Settings, notification settings for the contacts with the wrong From address to the same notification settings as the contacts with the correct from address.
Be sure to check out our Knowledgebase for helpful articles and solutions!
phyo
Posts: 162
Joined: Sun Dec 01, 2013 10:50 pm

Re: Hosts/Services problem notifition sender email is differ

Post by phyo »

tgriep wrote:Try changing the Alert Settings, notification settings for the contacts with the wrong From address to the same notification settings as the contacts with the correct from address.
Sorry, I don't get what you mean.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Hosts/Services problem notifition sender email is differ

Post by scottwilkerson »

phyo,

I believe it is possible that you have some nagios contacts setup using using a notification handler other than
xi_host_notification_handler
xi_service_notification_handler

I would start with the users that are receiving messages from [email protected], go to the CCM -> Contact -> Alert Settings ->
Manage Host Notification Commands
Manage Service Notification Commands
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
phyo
Posts: 162
Joined: Sun Dec 01, 2013 10:50 pm

Re: Hosts/Services problem notifition sender email is differ

Post by phyo »

I would start with the users that are receiving messages from [email protected], go to the CCM -> Contact -> Alert Settings ->
Manage Host Notification Commands
Manage Service Notification Commands
Host notification commands is notify-host-by-email
and Service notification commands is notify-service-by-email
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Hosts/Services problem notifition sender email is differ

Post by questrad »

All users has the same settings?
Do you did any changes on notify-service-by-email and notify-host-by-email?

Are you sure that all users has just "notify-service-by-email" or "notify-host-by-email" and not "xi_host_notification_handler" or "xi_service_notification_handler"?

Because on the screen shots that you provide it seems some of them has notify-host-by-email and some of them has xi_host_notification_handler.
phyo
Posts: 162
Joined: Sun Dec 01, 2013 10:50 pm

Re: Hosts/Services problem notifition sender email is differ

Post by phyo »

questrad wrote:All users has the same settings?
Do you did any changes on notify-service-by-email and notify-host-by-email?

Are you sure that all users has just "notify-service-by-email" or "notify-host-by-email" and not "xi_host_notification_handler" or "xi_service_notification_handler"?

Because on the screen shots that you provide it seems some of them has notify-host-by-email and some of them has xi_host_notification_handler.
In our system, we created two kind of contact.
First one is created via Admin --> Users --> Manage Users and create new user. While create new user, I enable "Create as Monitoring Contact". For those contact, I used xi_host_notification_handler and xi_service_notification_handler.
Second one is created via Configure --> CCM --> Alerting --> Contacts and Add new contacts. For those contact, I used notify-host-by-email and notify-service-by-email.
All of the contact creating by first method got the correct email sender.
The contact creating by second method got the email from user@hostname email address.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Hosts/Services problem notifition sender email is differ

Post by scottwilkerson »

It is because those setup with
notify-host-by-email
and
notify-service-by-email
Use different commands

You can edit these commands in the CCM -> Commands to change the sender email address. By default they will just use the systems email account and use /bin/mail to send the email..

When changing the commands for notify-host-by-email and notify-service-by-email you will want to likely add the following right after /bin/mail -r

Code: Select all

/bin/mail -r "[email protected]" 
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Hosts/Services problem notifition sender email is differ

Post by questrad »

To avoid such of miss-configuration in our environment all notification types are included in contact template.
And when we creating contact we making sure that the contact has correct template and nothing else in Alert setting tab
So, we are sure that contact has correct notification settings.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Hosts/Services problem notifition sender email is differ

Post by abrist »

scottwilkerson wrote:It is because those setup with
notify-host-by-email
and
notify-service-by-email
Use different commands

You can edit these commands in the CCM -> Commands to change the sender email address. By default they will just use the systems email account and use /bin/mail to send the email..

When changing the commands for notify-host-by-email and notify-service-by-email you will want to likely add the following right after /bin/mail -r

Code: Select all
/bin/mail -r "[email protected]"
OP, can you confirm if Scott's suggestion worked for you?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked