module-icinga2/templates/object_host.conf.erb

85 lines
2.4 KiB
Text

/**
* WARNING: This host definition is automatically generated by Puppet.
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
*/
/**
* A host definition. You can create your own configuration files
* in the conf.d directory (e.g. one per host). By default all *.conf
* files in this directory are included.
*
*/
//Parameters to include:
// * notes
// * notes_url
// * action_url
// * icon_image
// * icon_image_alt
object Host "<%= @object_hostname %>" {
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
<%- if @template_to_import -%>
<%#- Otherwise, include the parameter: -%>
import "<%= @template_to_import -%>"
<%- end -%>
<%- if @display_name -%>
display_name = "<%= @display_name -%>"
<%- end -%>
<%- if @ipv4_address -%>
address = "<%= @ipv4_address -%>"
<%- end -%>
<%- if @ipv6_address -%>
address6 = "<%= @ipv6_address -%>"
<%- end -%>
<%- if @groups.length != 0 -%>
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
<%- end -%>
<%- if @vars.empty? != true -%>
<%- @vars.each_pair do |key, value| -%>
vars.<%= key %> = "<%= value %>"
<%- end -%>
<%- end -%>
<%- if @check_command -%>
check_command = "<%= @check_command -%>"
<%- end -%>
<%- if @max_check_attempts -%>
max_check_attempts = <%= @max_check_attempts -%>
<%- end -%>
<%- if @check_period -%>
check_period = <%= @check_period -%>
<%- end -%>
<%- if @check_interval -%>
check_interval = <%= @check_interval -%>
<%- end -%>
<%- if @retry_interval -%>
retry_interval = <%= @retry_interval -%>
<%- end -%>
<%- if @enable_notifications -%>
enable_notifications = <%= @enable_notifications -%>
<%- end -%>
<%- if @enable_active_checks -%>
enable_active_checks = <%= @enable_active_checks -%>
<%- end -%>
<%- if @enable_passive_checks -%>
enable_passive_checks = <%= @enable_passive_checks -%>
<%- end -%>
<%- if @enable_event_handler -%>
enable_event_handler = <%= @enable_event_handler -%>
<%- end -%>
<%- if @enable_flap_detection -%>
enable_flap_detection = <%= @enable_flap_detection -%>
<%- end -%>
<%- if @enable_perfdata -%>
enable_perfdata = <%= @enable_perfdata -%>
<%- end -%>
<%- if @event_command -%>
event_command = "<%= @event_command -%>"
<%- end -%>
<%- if @flapping_threshold -%>
flapping_threshold = "<%= @flapping_threshold -%>"
<%- end -%>
<%- if @volatile -%>
volatile = "<%= @volatile -%>"
<%- end -%>
}