User receiving unwanted email alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: User receiving unwanted email alerts

Post by markmerchant »

I PMed the file(s). Had to split them.
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: User receiving unwanted email alerts

Post by markmerchant »

I PMed the file(s), had to split them.
kyang

Re: User receiving unwanted email alerts

Post by kyang »

As @dwhitfield mentioned,

You could create another contact template for that user or users so they don't receive those unwanted email notifications.

From the profile, I see you do have every host/service notification option for all of your contact templates.

Code: Select all

host_notification_options d,u,r,f,s
service_notification_options w,u,c,r,f,s
Back to your first question, If you didn't want the user to receive recovery service alerts.

Code: Select all

r = notify on service recoveries (OK states)
You could take out the r in the service_notifation_options in your contact template.

Code: Select all

service_notification_options w,u,c,f,s
A link to the object definitions.
https://assets.nagios.com/downloads/nag ... ml#contact

Is that a possible solution for you?
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: User receiving unwanted email alerts

Post by markmerchant »

I don't think I am explaining this correctly. Given the example I started with,
I have a user rosterg who is receiving emails for the server below. Why is this
user receiving any alerts at all? Shouldn't the only one receiving an alert be
shall?


/app/nagios/etc/hosts/afgpl13.cfg
define host {
host_name afgpl13
use generic-network-host
alias Bristol,UK
address afgpl13.xxx.xxx
parents afgga01
check_command check-wan-alive
register 1
}

/app/nagios/etc/hosttemplates.cfg
define host {
name generic-network-host
max_check_attempts 3
event_handler_enabled 0
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contact_groups FOO
notification_interval 0
notification_period 24x7
notification_options u,d,r
notifications_enabled 1
register 0
}

/app/nagios/etc/contactgroups.cfg
define contactgroup {
contactgroup_name FOO
alias FOO
members shall
}

/app/nagios/etc/contacts.cfg
define contact {
contact_name shall
alias shall
email [email protected]
use standard-contact
}
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: User receiving unwanted email alerts

Post by lmiltchev »

I have a user rosterg who is receiving emails for the server below. Why is this user receiving any alerts at all? Shouldn't the only one receiving an alert be shall?
I believe you have a typo. The username is "rostertag", correct?

Also, the notification you showed us is a service notificaiton, NOT a host one.
To: <[email protected]>
Subject: RECOVERY Service Alert - xxxx13/ICMP is OK
X-PHP-Originating-Script: 501:class.phpmailer.php
Date: Tue, 28 Nov 2017 21:32:22 +0000
From: <[email protected]>
Reply-To: <[email protected]>
Message-ID: <[email protected]>
X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer)
Looking at the "ICMP" service on the "afgpl13" host, we can see that there are three contact groups added to it:

Code: Select all

define service {
	host_name	afgpl13
	service_description	ICMP
	...
	contact_groups	UNIX,REPORTING,OPERATIONS
	...
	}
The "fostertag" user is a member of the OPERATIONS contactgroup, that's why he/she is receiving notifications about this service.

Code: Select all

define contactgroup {
	contactgroup_name             		OPERATIONS
	alias                         		OPERATIONS
	members                       		...,rostertag,...
	}
Note: I am omitting parts of the config on purpose.

Let us know if this answers your question.
Be sure to check out our Knowledgebase for helpful articles and solutions!
markmerchant
Posts: 65
Joined: Tue Oct 17, 2017 8:38 am

Re: User receiving unwanted email alerts

Post by markmerchant »

That's the key, Thx. I thought it was coming from the host.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: User receiving unwanted email alerts

Post by lmiltchev »

I am glad I could help! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked