Page 1 of 1

different Contact groups

Posted: Wed May 29, 2019 10:41 am
by bsudhakar81
i have configured Nagios core 4.4.3 and configured for host down alerts. I have 20 servers which belongs to two different groups. I want email alerts to send first 10 servers to one email address and remaining 10 to another (2nd email address ) as alert. At this time I am receiving email alerts for all 20 servers to single contact email address. Is there anyway this requirement can be achieved ?

Re: different Contact groups

Posted: Wed May 29, 2019 4:47 pm
by scottwilkerson
Setup 2 different contacts and add the contact you want to get email for to each server as a contact to the host.

10 host configurations would have

Code: Select all

contacts     contactA
the other 10 would have

Code: Select all

contacts     contactB

Re: different Contact groups

Posted: Wed May 29, 2019 11:39 pm
by bsudhakar81
Can you share sample file ?

Re: different Contact groups

Posted: Thu May 30, 2019 6:40 am
by scottwilkerson

Code: Select all

define host {
    host_name                   192.168.15.10
    use                         xiwizard_dnsquery_host
    alias                       testing
    display_name                display name
    address                     192.168.15.10
    check_command               check_dummy!2!CRITICAL!!!!!!
    max_check_attempts          5
    check_interval              5
    retry_interval              1
    contacts                    contactA
    notification_interval       60
    notification_options        d,u,r,
    notifications_enabled       1
    register                    1
}
and for other hosts

Code: Select all

define host {
    host_name                   192.168.15.11
    use                         xiwizard_dnsquery_host
    alias                       testing
    display_name                display name
    address                     192.168.15.11
    check_command               check_dummy!2!CRITICAL!!!!!!
    max_check_attempts          5
    check_interval              5
    retry_interval              1
    contacts                    contactB
    notification_interval       60
    notification_options        d,u,r,
    notifications_enabled       1
    register                    1
}

Re: different Contact groups

Posted: Tue Jun 04, 2019 6:21 am
by bsudhakar81
it worked by adding multiple usernames and email addresses. Thanks for the help

Re: different Contact groups

Posted: Tue Jun 04, 2019 6:48 am
by scottwilkerson
bsudhakar81 wrote:it worked by adding multiple usernames and email addresses. Thanks for the help
Great,

Locking thread