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
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
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 [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******