2014-07-10 07:20:01 +02:00
|
|
|
/**
|
|
|
|
* 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.
|
2014-07-11 06:04:51 +02:00
|
|
|
*
|
2014-07-10 07:20:01 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
object Host "<%= @object_hostname %>" {
|
|
|
|
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
|
|
|
|
<%- if @template_to_import -%>
|
2014-09-14 04:46:24 +02:00
|
|
|
<%#- Otherwise, include the parameter: -%>
|
2014-07-10 07:20:01 +02:00
|
|
|
import "<%= @template_to_import -%>"
|
|
|
|
<%- end -%>
|
|
|
|
<%- if @display_name -%>
|
|
|
|
display_name = "<%= @display_name -%>"
|
|
|
|
<%- end -%>
|
|
|
|
<%- if @ipv4_address -%>
|
|
|
|
address = "<%= @ipv4_address -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 03:21:38 +02:00
|
|
|
<%- if @ipv6_address -%>
|
|
|
|
address6 = "<%= @ipv6_address -%>"
|
|
|
|
<%- end -%>
|
2014-07-11 06:57:46 +02:00
|
|
|
<%- if @groups.length != 0 -%>
|
|
|
|
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
|
|
|
<%- end -%>
|
2014-07-27 03:41:27 +02:00
|
|
|
<%- if @vars.empty? != true -%>
|
2015-01-13 16:35:31 +01:00
|
|
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
2014-11-25 19:07:12 +01:00
|
|
|
<%- if value.is_a?(Hash) -%>
|
|
|
|
vars.<%= key %> = {
|
2015-01-13 16:35:31 +01:00
|
|
|
<%- value.sort_by {|subkey,subvalue| subkey}.each do |subkey,subvalue| -%>
|
2014-11-25 19:07:12 +01:00
|
|
|
<%= subkey %> = <%= subvalue %>
|
|
|
|
<%- end -%>
|
|
|
|
}
|
|
|
|
<%- else -%>
|
2014-07-27 03:41:27 +02:00
|
|
|
vars.<%= key %> = "<%= value %>"
|
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
2014-11-25 19:07:12 +01:00
|
|
|
<%- end -%>
|
2014-07-27 03:59:25 +02:00
|
|
|
<%- if @check_command -%>
|
2014-07-27 05:15:04 +02:00
|
|
|
check_command = "<%= @check_command -%>"
|
2014-07-27 04:10:44 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:15:04 +02:00
|
|
|
<%- if @max_check_attempts -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
max_check_attempts = <%= @max_check_attempts %>
|
2014-07-27 03:59:25 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:15:55 +02:00
|
|
|
<%- if @check_period -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
check_period = <%= @check_period %>
|
2014-07-27 05:15:55 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:16:56 +02:00
|
|
|
<%- if @check_interval -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
check_interval = <%= @check_interval %>
|
2014-07-27 05:16:56 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:19:41 +02:00
|
|
|
<%- if @retry_interval -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
retry_interval = <%= @retry_interval %>
|
2014-07-27 05:19:41 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:41:31 +02:00
|
|
|
<%- if @enable_notifications -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_notifications = <%= @enable_notifications %>
|
2014-07-27 05:41:31 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:45:48 +02:00
|
|
|
<%- if @enable_active_checks -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_active_checks = <%= @enable_active_checks %>
|
2014-07-27 05:45:48 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:47:24 +02:00
|
|
|
<%- if @enable_passive_checks -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_passive_checks = <%= @enable_passive_checks %>
|
2014-07-27 05:47:24 +02:00
|
|
|
<%- end -%>
|
2014-07-27 05:50:26 +02:00
|
|
|
<%- if @enable_event_handler -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_event_handler = <%= @enable_event_handler %>
|
2014-07-27 05:50:26 +02:00
|
|
|
<%- end -%>
|
2014-11-18 06:37:06 +01:00
|
|
|
<%- if @enable_flapping -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_flapping = <%= @enable_flapping %>
|
2014-07-27 05:53:07 +02:00
|
|
|
<%- end -%>
|
2014-07-27 06:08:09 +02:00
|
|
|
<%- if @enable_perfdata -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_perfdata = <%= @enable_perfdata %>
|
2014-07-27 06:08:09 +02:00
|
|
|
<%- end -%>
|
2014-07-27 06:10:25 +02:00
|
|
|
<%- if @event_command -%>
|
|
|
|
event_command = "<%= @event_command -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 06:12:29 +02:00
|
|
|
<%- if @flapping_threshold -%>
|
|
|
|
flapping_threshold = "<%= @flapping_threshold -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 06:14:20 +02:00
|
|
|
<%- if @volatile -%>
|
|
|
|
volatile = "<%= @volatile -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 06:15:01 +02:00
|
|
|
<%- if @notes -%>
|
|
|
|
notes = "<%= @notes -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 06:16:05 +02:00
|
|
|
<%- if @notes_url -%>
|
|
|
|
notes_url = "<%= @notes_url -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 06:18:01 +02:00
|
|
|
<%- if @action_url -%>
|
|
|
|
action_url = "<%= @action_url -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 06:18:38 +02:00
|
|
|
<%- if @icon_image -%>
|
|
|
|
icon_image = "<%= @icon_image -%>"
|
|
|
|
<%- end -%>
|
2014-07-27 06:19:21 +02:00
|
|
|
<%- if @icon_image_alt -%>
|
|
|
|
icon_image_alt = "<%= @icon_image_alt -%>"
|
|
|
|
<%- end -%>
|
2014-07-10 07:20:01 +02:00
|
|
|
}
|