Email Notification Issue

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 SourceForge.net 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.

Email Notification Issue

Postby rlinux57 » Wed Aug 01, 2018 8:22 am

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 45 times
rlinux57
 
Posts: 317
Joined: Mon Dec 08, 2014 12:03 am

Re: Email Notification Issue

Postby rlinux57 » Wed Aug 01, 2018 10:52 pm

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: 317
Joined: Mon Dec 08, 2014 12:03 am

Re: Email Notification Issue

Postby rlinux57 » Thu Aug 02, 2018 1:56 pm

Could anybody help me with the mentioned issue?
rlinux57
 
Posts: 317
Joined: Mon Dec 08, 2014 12:03 am

Re: Email Notification Issue

Postby cdienger » Fri Aug 03, 2018 1:45 pm

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.
User avatar
cdienger
Support Tech
 
Posts: 1895
Joined: Tue Feb 07, 2017 11:26 am

Re: Email Notification Issue

Postby rlinux57 » Mon Aug 06, 2018 12:36 am

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
        }
rlinux57
 
Posts: 317
Joined: Mon Dec 08, 2014 12:03 am

Re: Email Notification Issue

Postby mcapra » Mon Aug 06, 2018 8:56 am

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3423
Joined: Thu May 05, 2016 3:54 pm

Re: Email Notification Issue

Postby cdienger » Mon Aug 06, 2018 2:22 pm

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.
User avatar
cdienger
Support Tech
 
Posts: 1895
Joined: Tue Feb 07, 2017 11:26 am


Return to Nagios Core

Who is online

Users browsing this forum: tgriep and 27 guests