Defined Type: nagios::servicedependency
- Defined in:
- manifests/servicedependency.pp
Overview
Define: nagios::servicedependency
Wrap around the original nagios_servicedependency
-
To be able to export with the correct tag automatically
-
To be able to use defaults overridden or from facts
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'manifests/servicedependency.pp', line 7
define nagios::servicedependency (
$ensure = undef,
$server = $nagios::client::server,
$host_name = $nagios::client::host_name,
$service_description = $name,
$dependent_host_name = $nagios::client::host_name,
$dependent_service_description = undef,
$execution_failure_criteria = 'c',
$notification_failure_criteria = 'w,c',
) {
@@nagios_servicedependency { $title:
ensure => $ensure,
host_name => $host_name,
service_description => $service_description,
dependent_host_name => $dependent_host_name,
dependent_service_description => $dependent_service_description,
execution_failure_criteria => $execution_failure_criteria,
notification_failure_criteria => $notification_failure_criteria,
# Support an arrays of tags for multiple nagios servers
tag => regsubst($server,
'^(.+)$','nagios-\1'),
}
}
|