2014-07-29 03:57:21 +02:00
|
|
|
/**
|
|
|
|
* WARNING: This service definition is automatically generated by Puppet.
|
|
|
|
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A service 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-29 17:33:32 +02:00
|
|
|
object Service "<%= @object_servicename %>" {
|
2014-07-29 04:15:10 +02:00
|
|
|
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
|
|
|
|
<%- if @template_to_import -%>
|
2014-07-29 17:33:32 +02:00
|
|
|
<%#- Otherwise, include the parameter: -%>
|
2014-07-29 04:15:10 +02:00
|
|
|
import "<%= @template_to_import -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 04:17:11 +02:00
|
|
|
<%- if @display_name -%>
|
|
|
|
display_name = "<%= @display_name -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 04:22:00 +02:00
|
|
|
<%- if @host_name -%>
|
|
|
|
host_name = "<%= @host_name -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 04:24:39 +02:00
|
|
|
<%- if @groups.length != 0 -%>
|
|
|
|
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
|
|
|
<%- end -%>
|
2014-07-29 04:26:39 +02:00
|
|
|
<%- if @vars.empty? != true -%>
|
|
|
|
<%- @vars.each_pair do |key, value| -%>
|
|
|
|
vars.<%= key %> = "<%= value %>"
|
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
2014-07-29 04:30:55 +02:00
|
|
|
<%- if @check_command -%>
|
|
|
|
check_command = "<%= @check_command -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 05:37:03 +02:00
|
|
|
<%- if @max_check_attempts -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
max_check_attempts = <%= @max_check_attempts %>
|
2014-07-29 05:37:03 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:38:07 +02:00
|
|
|
<%- if @check_period -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
check_period = <%= @check_period %>
|
2014-07-29 05:38:07 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:42:05 +02:00
|
|
|
<%- if @check_interval -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
check_interval = <%= @check_interval %>
|
2014-07-29 05:42:05 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:42:53 +02:00
|
|
|
<%- if @retry_interval -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
retry_interval = <%= @retry_interval %>
|
2014-07-29 05:42:53 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:43:38 +02:00
|
|
|
<%- if @enable_notifications -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_notifications = <%= @enable_notifications %>
|
2014-07-29 05:43:38 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:45:53 +02:00
|
|
|
<%- if @enable_active_checks -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_active_checks = <%= @enable_active_checks %>
|
2014-07-29 05:45:53 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:46:44 +02:00
|
|
|
<%- if @enable_passive_checks -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_passive_checks = <%= @enable_passive_checks %>
|
2014-07-29 05:46:44 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:47:45 +02:00
|
|
|
<%- if @enable_event_handler -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_event_handler = <%= @enable_event_handler %>
|
2014-07-29 05:47:45 +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-29 05:49:27 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:50:07 +02:00
|
|
|
<%- if @enable_perfdata -%>
|
2014-11-19 07:16:42 +01:00
|
|
|
enable_perfdata = <%= @enable_perfdata %>
|
2014-07-29 05:50:07 +02:00
|
|
|
<%- end -%>
|
2014-07-29 05:51:40 +02:00
|
|
|
<%- if @event_command -%>
|
|
|
|
event_command = "<%= @event_command -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 05:52:23 +02:00
|
|
|
<%- if @flapping_threshold -%>
|
|
|
|
flapping_threshold = "<%= @flapping_threshold -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 05:57:43 +02:00
|
|
|
<%- if @volatile -%>
|
|
|
|
volatile = "<%= @volatile -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 06:02:00 +02:00
|
|
|
<%- if @notes -%>
|
|
|
|
notes = "<%= @notes -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 06:02:39 +02:00
|
|
|
<%- if @notes_url -%>
|
|
|
|
notes_url = "<%= @notes_url -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 06:04:54 +02:00
|
|
|
<%- if @action_url -%>
|
|
|
|
action_url = "<%= @action_url -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 06:05:39 +02:00
|
|
|
<%- if @icon_image -%>
|
|
|
|
icon_image = "<%= @icon_image -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 06:06:28 +02:00
|
|
|
<%- if @icon_image_alt -%>
|
|
|
|
icon_image_alt = "<%= @icon_image_alt -%>"
|
|
|
|
<%- end -%>
|
2014-07-29 17:33:32 +02:00
|
|
|
}
|