I'm trying to debug why Nagios only sends a notification to ONE person in a email group, it doesn't send it to the second? I really have no idea whats going on. I'll post my configs below
contacts.cfg:
Code: Select all
define contact{
contact_name example1 ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Example One ; Full name of user
email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
contactgroups admins, examplegroup
}
define contact{
contact_name example2 ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Example Two ; Full name of user
email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
contactgroups examplegroup
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members example1
}
define contactgroup{
contactgroup_name examplegroup
alias Notifications for Example VPS
members example1, example2
}Code: Select all
# Linux host definition template - This is NOT a real host, just a template!
define host{
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period 24x7 ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 120 ; Resend notifications every 2 hours
# notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}Code: Select all
define host{
use linux-server
host_name examplename
alias examplename.example.org
address 192.168.0.1
contact_groups examplegroup
}
# Define a service to "ping" the local machine
define service{
use generic-service ; Name of service template to use
host_name example
service_description PING
check_command check_ping!100.0,20%!500.0,60%
notifications_enabled 1
}My issue is that notification emails only go to example1 instead of going to the whole group like the host is assigned.
If it makes any difference, I can see both contacts in Nagios and there aren't any errors in my config that I, or Nagios, can see.
Any help would be great!