Notification Email for multiple ID`s


#1

I have set the alert notification and it`s working fine for one user. But now i want to send alert notifcation to multiple people. Below is my configuration.

define contact{
contact_name nagiosadmin
use generic-contact
alias Nagios Admin
contactgroups admins
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email abc at domail.com
notifications_enabled 1

    }

define contact{
contact_name nagiosuser
use generic-contact
alias Nagios user
contactgroups admins
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email xyz at domain.com
notifications_enabled 1

    }

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin, nagiosuser
}

Here mails are only going to nagiosadmin not to nagiosuser. Means mails are going to abc at domain.com

Please guide me what should i do.

Thanks


#2

did you restart the nagios service?


#3

Ya i have already restarted… Pls…suggest me what should i do to resolve this prob. ?


#4

Hi,

firstly, when you run nagios-inst/bin/nagios -v nagios-inst/etc/nagios.cfg
=> does it tell you anything ?

also, you could try removing the directive “contactgroups admins” from your “contact” definition, as this option is already entered via the “members” option in the contact-group definition

If everything fails, you could also post a snipet of your:
-hostgroup def
-host def
-service def
-generic service def
-generic host def
-generic contact def

Hope this helps


#5

app1.cfg (host)

define host{
name linux-box10 ; Name of this template
use generic-host ; Inherit default values
check_period 24x7
check_interval 1
retry_interval 1
max_check_attempts 1
check_command check-host-alive
notification_period 24x7
notification_interval 10
notification_options d,r,u
contact_groups admins
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE
}

define host{
use linux-box10 ; Inherit default values from a template
host_name app1 ; The name we’re giving to this server
alias app1 ; A longer name for the server
address 192.168.1.18 ; IP address of the server
}

define service{
use generic-service
host_name app1
service_description CPU Load
check_command check_nrpe!check_load
}


contact.cfg

define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email abc@gmail.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******

    contactgroups                   admins
    service_notification_period     24x7
    host_notification_period        24x7
    service_notification_options    w,u,c,r
    host_notification_options       d,u,r
    service_notification_commands  notify-by-email
    host_notification_commands     host-notify-by-email
    notifications_enabled           1


    }

define contact{
contact_name nagiosuser
use generic-contact
alias Nagios User
email xyz@gmail.com

    contactgroups                   admins
    service_notification_period     24x7
    host_notification_period        24x7
    service_notification_options    w,u,c,r
    host_notification_options       d,u,r
    service_notification_commands  notify-by-email
    host_notification_commands     host-notify-by-email
    notifications_enabled           1
    }

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin, nagiosuser
}