User receiving unwanted email alerts
-
markmerchant
- Posts: 65
- Joined: Tue Oct 17, 2017 8:38 am
Re: User receiving unwanted email alerts
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
I PMed the file(s), had to split them.
-
kyang
Re: User receiving unwanted email alerts
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.
Back to your first question, If you didn't want the user to receive recovery service alerts.
You could take out the r in the service_notifation_options in your contact template.
A link to the object definitions.
https://assets.nagios.com/downloads/nag ... ml#contact
Is that a possible solution for you?
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,sCode: Select all
r = notify on service recoveries (OK states)Code: Select all
service_notification_options w,u,c,f,shttps://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
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
}
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
}
Re: User receiving unwanted email alerts
I believe you have a typo. The username is "rostertag", correct?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?
Also, the notification you showed us is a service notificaiton, NOT a host one.
Looking at the "ICMP" service on the "afgpl13" host, we can see that there are three contact groups added to it: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)
Code: Select all
define service {
host_name afgpl13
service_description ICMP
...
contact_groups UNIX,REPORTING,OPERATIONS
...
}Code: Select all
define contactgroup {
contactgroup_name OPERATIONS
alias OPERATIONS
members ...,rostertag,...
}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
That's the key, Thx. I thought it was coming from the host.
Re: User receiving unwanted email alerts
I am glad I could help! 
Be sure to check out our Knowledgebase for helpful articles and solutions!