Email Notification Issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Email Notification Issue

Post by rlinux57 »

Hi,
I have problem regarding email notifications, Actually i have created a contactgroups in order to distribute service notification for different teams. I have attached contacts.cfg with dummy data but the hierarchy is same. The problem is that nagios sent every notification to the other groups as well.
But i have mentioned contact groups in specific services such as:

Code: Select all

define service{
        use                             local-service,srv-pnp
        hostgroup_name                  Databases
        host_name                       DB-Server
        service_description             HTTP
        check_command                   check_http
        contact_groups                  team
        notifications_enabled           1
        }
Kindly guide me in this regard to find out the problem. please find attachment.
Attachments
samplecontact.cfg
(2.93 KiB) Downloaded 241 times
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Email Notification Issue

Post by rlinux57 »

And below is my template:

Code: Select all

define contact{
       name                            team
       service_notification_period     24x7
       host_notification_period        24x7 
       service_notification_options    w,c,r
       host_notification_options       d,u,r,f,s
       service_notification_commands   notify-service-by-email
       host_notification_commands      notify-host-by-email
       register                        0
        }
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Email Notification Issue

Post by rlinux57 »

Could anybody help me with the mentioned issue?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Email Notification Issue

Post by cdienger »

What does the host definition look like? Per https://assets.nagios.com/downloads/nag ... tance.html, contacts and contact_groups can be inherited from the host if not defined on the service.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Email Notification Issue

Post by rlinux57 »

I didn't define contact_groups in my host.cfg. My host definition looks like:

Code: Select all

define host{
        use                     linux-server,host-pnp
        host_name               Server-01
        alias                   Server-01
        address                 IP-Address
        }

define host{
        use                     linux-server,host-pnp
        host_name               Server-02
        alias                   Server-02
        address                 IP-Address
        }
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Email Notification Issue

Post by mcapra »

It's still useful for troubleshooting to understand how exactly a particular service/host is resolving its contacts.

Can you share the following template definitions as well as any dependencies they have (to other templates, groups, etc):

Code: Select all

linux-server
host-pnp
local-service
srv-pnp
Former Nagios employee
https://www.mcapra.com/
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Email Notification Issue

Post by cdienger »

Thanks for the assist, @mcapra!

@rlinux57, feel free to PM me the files if they contain anything sensitive.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked