2014-07-29 03:57:07 +02:00
|
|
|
# == Defined type: icinga2::object::service
|
2014-07-29 17:33:32 +02:00
|
|
|
#
|
2014-07-29 03:57:07 +02:00
|
|
|
# This is a defined type for Icinga 2 service objects.
|
|
|
|
# See the following Icinga 2 doc page for more info:
|
|
|
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-service
|
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
# See the inline comments.
|
|
|
|
#
|
|
|
|
|
2014-07-29 03:59:09 +02:00
|
|
|
define icinga2::object::service (
|
2014-07-29 04:12:32 +02:00
|
|
|
$object_servicename = $name,
|
2014-07-29 04:17:11 +02:00
|
|
|
$template_to_import = 'generic-service',
|
2014-07-29 04:22:00 +02:00
|
|
|
$display_name = $name,
|
2014-07-29 04:24:39 +02:00
|
|
|
$host_name = $fqdn,
|
2014-07-29 04:26:39 +02:00
|
|
|
$groups = [],
|
|
|
|
$vars = {},
|
2014-07-29 04:30:55 +02:00
|
|
|
$check_command = undef,
|
2014-07-29 05:37:03 +02:00
|
|
|
$max_check_attempts = undef,
|
2014-07-29 05:38:07 +02:00
|
|
|
$check_period = undef,
|
2014-07-29 05:42:05 +02:00
|
|
|
$check_interval = undef,
|
2014-07-29 05:42:53 +02:00
|
|
|
$retry_interval = undef,
|
2014-07-29 05:43:38 +02:00
|
|
|
$enable_notifications = undef,
|
2014-07-29 05:45:53 +02:00
|
|
|
$enable_active_checks = undef,
|
2014-07-29 05:46:44 +02:00
|
|
|
$enable_passive_checks = undef,
|
2014-07-29 05:47:45 +02:00
|
|
|
$enable_event_handler = undef,
|
2014-07-29 05:49:27 +02:00
|
|
|
$enable_flap_detection = undef,
|
2014-07-29 05:50:07 +02:00
|
|
|
$enable_perfdata = undef,
|
2014-07-29 05:51:40 +02:00
|
|
|
$event_command = undef,
|
2014-07-29 05:52:23 +02:00
|
|
|
#flapping_threshold is defined as a percentage, eg. 10%, 50%, etc.
|
|
|
|
$flapping_threshold = undef,
|
2014-07-29 05:57:43 +02:00
|
|
|
$volatile = undef,
|
2014-07-29 06:02:00 +02:00
|
|
|
$notes = undef,
|
2014-07-29 06:02:39 +02:00
|
|
|
$notes_url = undef,
|
2014-07-29 06:04:54 +02:00
|
|
|
$action_url = undef,
|
2014-07-29 06:05:39 +02:00
|
|
|
$icon_image = undef,
|
2014-07-29 06:06:28 +02:00
|
|
|
$icon_image_alt = undef,
|
2014-07-29 03:59:09 +02:00
|
|
|
$target_dir = '/etc/icinga2/conf.d',
|
|
|
|
$target_file_name = "${name}.conf",
|
|
|
|
$target_file_owner = 'root',
|
|
|
|
$target_file_group = 'root',
|
|
|
|
$target_file_mode = '644'
|
|
|
|
) {
|
2014-07-29 03:57:07 +02:00
|
|
|
|
|
|
|
file {"${target_dir}/${target_file_name}":
|
|
|
|
ensure => file,
|
|
|
|
owner => $target_file_owner,
|
|
|
|
group => $target_file_group,
|
|
|
|
mode => $target_file_mode,
|
|
|
|
content => template('icinga2/object_service.conf.erb'),
|
|
|
|
notify => Service['icinga2'],
|
|
|
|
}
|
|
|
|
|
2014-07-29 17:33:32 +02:00
|
|
|
}
|