Although I am normally quite happy to install from source, on production servers I prefer to use the distro’s own version so that I don’t have to spend 25 hours a day looking for and applying the security patches to the hundred-and-one things that need patching.
I did have 1 contactgroup initially - “admins”. It works. It still works. I duplicated the contact and modified the contact_name and email directives of the duplicates. I then duplicated the contactgroup and modified the contact_group name, alias and members directives of the duplicate.:[code]define contact {
contact_name Grant
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}
define contact {
contact_name Nikolai
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}
define contact {
contact_name Ed
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}
define contactgroup{
contactgroup_name admins
alias Notify about ALL incidents
members Grant
}
define contactgroup {
contactgroup_name 1and1admins
alias Notify about 1&1 Servers only
members Nikolai,Ed
}[/code]Obviously I have changed the email addresses in this posting, but I can guarantee that the addresses used can receive mail.
I have duplicated and modified the host template accordingly:define host{
name 1and1-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
check_command check-host-alive
max_check_attempts 10
notification_interval 0
notification_period 24x7
notification_options d,u,r
contact_groups admins,1and1admins
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
And there are a number of hosts that are told to use the 1and1-host template:define host{
use 1and1-host
host_name 1 and 1 host
alias Host Alias
address 12.34.56.78
}
However, when any of these 1and1 hosts have failures I am still the only one who gets notified.