Hi all,<br>
<br>
I'm trying to configure nagios 3.0.6 so that I can add contact groups
to a host by adding a host template to the host definition.<br>
<br>
I have one host template called 'unix-host' that I'm using to aggregate
the Unix Team contacts into a template. I have another host template
called 'oncall-host' that I'm using to represent people on call 24x7.
If a host is critical enough that the on-call people should be alerted
if it goes down, I want to be able to add the 'oncall-host' host
template as a template for the critical host, have the 'unix-host' host
template as another template for the host, and have nagios alert both
the people on call and the Unix Team admins if the host goes down. The
on-call people should be alerted by SMS and email every 5 minutes, but
the Unix Team admins are should only be alerted by email every 10
minutes.<br>
<br>
I have an email server called 'doris' that is currently down, and is
configured as specified below. What's happening is that the on-call
people are being alerted by SMS and email every 10 minutes (which is as
it should be), but the Unix Team admins aren't being alerted at all. If
I remove the 'oncall-host' template from the host definition, the Unix
Team admins are alerted by email as they should be.<br>
<br>
Can anyone suggest how I might get the alerting working, and still be
able to just add the 'oncall-host' template as a template for a
critical host? Perhaps it would be better to do this with hostgroups?<br>
<br>
Here are all my definitions... sorry if it's a bit convoluted:<br>
<br>
Here's the host definition for the host in question:<br>
define host {<br>
host_name doris<br>
alias doris email server<br>
address 192.168.2.25<br>
parents sw-l3-mail<br>
use oncall-host,unix-host<br>
register 1<br>
}<br>
<br>
'unix-host' host template:<br>
define host {<br>
name unix-host<br>
alias Unix Team host template<br>
use generic-host<br>
contact_groups +unix-admin<br>
register 0<br>
}<br>
<br>
'oncall-host' host template:<br>
define host {<br>
name oncall-host<br>
alias Host template for critical hosts<br>
use generic-host<br>
contact_groups oncall-primary<br>
notification_interval 5<br>
register 0<br>
}<br>
<br>
'generic-host' host template:<br>
define host {<br>
name generic-host<br>
alias Top-level host template<br>
check_command check-host-alive<br>
max_check_attempts 10<br>
check_interval 5<br>
retry_interval 1<br>
active_checks_enabled 1<br>
check_period 24x7<br>
obsess_over_host 1<br>
check_freshness 1<br>
event_handler notify-host-by-email<br>
event_handler_enabled 1<br>
flap_detection_enabled 1<br>
process_perf_data 1<br>
retain_status_information 1<br>
retain_nonstatus_information 1<br>
notification_interval 10<br>
notification_period 24x7<br>
notification_options d,u,r<br>
notifications_enabled 1<br>
failure_prediction_enabled 1<br>
register 0<br>
}<br>
<br>
'unix-admin' contact group:<br>
define contactgroup {<br>
contactgroup_name unix-admin<br>
alias Unix Team Admins<br>
members nagiosadmin<br>
}<br>
<br>
'oncall-primary' contact group:<br>
define contactgroup {<br>
contactgroup_name oncall-primary<br>
alias On-call Primary<br>
members oncall_phone1<br>
}<br>
<br>
'nagiosadmin' contact:<br>
define contact {<br>
contact_name nagiosadmin<br>
alias Nagios Admin<br>
contactgroups unix-admin<br>
email <a href="mailto:nagiosadmin@mydomain.co.uk">nagiosadmin@mydomain.co.uk</a><br>
use human-contact<br>
}<br>
<br>
'oncall-phone1' contact:<br>
define contact {<br>
contact_name oncall_phone1<br>
alias On-call Phone #1<br>
contactgroups oncall-primary<br>
email <a href="mailto:phone1@mydomain.co.uk">phone1@mydomain.co.uk</a><br>
pager 07555555555<br>
use oncall-contact<br>
}<br>
<br>
'human-contact' contact template:<br>
define contact {<br>
name human-contact<br>
alias Human contact template<br>
contactgroups unix-admin<br>
host_notification_period 24x7<br>
service_notification_period 24x7<br>
host_notification_options d,u,r<br>
service_notification_options w,u,c,r<br>
host_notification_commands notify-host-by-email<br>
service_notification_commands notify-service-by-email<br>
use generic-contact<br>
register 0<br>
}<br>
<br>
'oncall-contact' contact template:<br>
define contact {<br>
name oncall-contact<br>
alias On-call contact template<br>
contactgroups oncall-primary<br>
host_notification_period 24x7<br>
service_notification_period 24x7<br>
host_notification_options d,r<br>
service_notification_options u,c,r<br>
host_notification_commands notify-host-by-email,notify-host-by-sms<br>
service_notification_commands notify-service-by-email,notify-service-by-sms<br>
use generic-contact<br>
register 0<br>
}<br>
<br>
'generic-contact' contact template:<br>
define contact {<br>
name generic-contact<br>
alias Highest-level contact template<br>
host_notifications_enabled 1<br>
service_notifications_enabled 1<br>
host_notification_period 24x7<br>
service_notification_period 24x7<br>
register 0<br>
}<br><br>Regards,<br>Guy.<br>