Defining specific timeperiods within a template group
Posted: Wed Dec 21, 2016 8:12 pm
Okay I'm going to start off by saying I'm new so be nice!
In my templates.cfg I have 4 definitions for 4 templates. I have another folder containing .cfg's for each of those templates.
As of right now all the templates use the the same hours for reporting/ creating a ticket. In one of the defined templates .cfg's there are 100 hosts and I am trying to change 20 or so of them to not send tickets on Sunday.
Would the only way to accomplish this be to create a new template definition and move those hosts or can I add a statement to the host definition to point to a different notification schedule I create?
This is in the template.cfg
define hostgroup{
hostgroup_name Group_HQ ; The name of the hostgroup
alias Head Quarters ; Long name of the group
}
define host{
name template_HQ ; The name of this host template
hostgroups Group_HQ
check_period 24x7 ; By default, hosts are checked round the clock
active_checks_enabled 1
check_command check-host-alive-HQ
event_handler_enabled 1 ; Host event handler is enabled
process_perf_data 0 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notifications_enabled 1 ; 1 enabled, 0 disabled
obsess_over_host 0
flap_detection_enabled 0 ; Flap detection is enabled
contact_groups normal ; Notifications get sent to the admins by default
notification_period 24x7 ; Send host notifications at any time
notification_options d,u
check_interval 1 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 3 ; Check each server 2 times (max)
first_notification_delay 2 ; This defines the time to wait before sending first notification when host enters a non-UP state
notification_interval 0 ; Interval to send alarms if still active
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
This is in the template_HQ.cfg
define host{
use template_HQ ; Inherit default values from a template
host_name HeadQuarters ; The name we're giving to this host
alias x.x.x.x ; A longer name associated with the host
}
In my templates.cfg I have 4 definitions for 4 templates. I have another folder containing .cfg's for each of those templates.
As of right now all the templates use the the same hours for reporting/ creating a ticket. In one of the defined templates .cfg's there are 100 hosts and I am trying to change 20 or so of them to not send tickets on Sunday.
Would the only way to accomplish this be to create a new template definition and move those hosts or can I add a statement to the host definition to point to a different notification schedule I create?
This is in the template.cfg
define hostgroup{
hostgroup_name Group_HQ ; The name of the hostgroup
alias Head Quarters ; Long name of the group
}
define host{
name template_HQ ; The name of this host template
hostgroups Group_HQ
check_period 24x7 ; By default, hosts are checked round the clock
active_checks_enabled 1
check_command check-host-alive-HQ
event_handler_enabled 1 ; Host event handler is enabled
process_perf_data 0 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notifications_enabled 1 ; 1 enabled, 0 disabled
obsess_over_host 0
flap_detection_enabled 0 ; Flap detection is enabled
contact_groups normal ; Notifications get sent to the admins by default
notification_period 24x7 ; Send host notifications at any time
notification_options d,u
check_interval 1 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 3 ; Check each server 2 times (max)
first_notification_delay 2 ; This defines the time to wait before sending first notification when host enters a non-UP state
notification_interval 0 ; Interval to send alarms if still active
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
This is in the template_HQ.cfg
define host{
use template_HQ ; Inherit default values from a template
host_name HeadQuarters ; The name we're giving to this host
alias x.x.x.x ; A longer name associated with the host
}