Defined Type: nagios_common::check_command
- Defined in:
- modules/nagios_common/manifests/check_command.pp
Overview
- ensure
-
present or absent, to make the definition present or absent. Defaults to present
- config_dir
-
The base directory to put configuration in. Defaults to '/etc/icinga/'
- plugin_source
-
Path to source for the executable plugin file. Defaults to puppet:///modules/nagios_common/check_commands/$title
- config_source
-
Path to source for the plugin configuration. Defaults to puppet:///modules/nagios_common/check_commands/$title.cfg
- config_content
-
String content for the plugin configuration. Should not be specified if config_source is specified
- owner
-
The user which should own the config file. Defaults to 'icinga'
- group
-
The group which should own the config file. Defaults to 'icinga'
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'modules/nagios_common/manifests/check_command.pp', line 33
define nagios_common::check_command(
$ensure = present,
$config_dir = '/etc/icinga',
$plugin_source = "puppet:///modules/nagios_common/check_commands/${title}",
$config_source = undef,
$config_content = undef,
$owner = 'icinga',
$group = 'icinga',
) {
file { "/usr/lib/nagios/plugins/${title}":
ensure => $ensure,
source => $plugin_source,
owner => 'root',
group => 'root',
mode => '0755',
}
if ($config_source == undef) and ($config_content == undef) {
$real_config_source = "puppet:///modules/nagios_common/check_commands/${title}.cfg"
} else {
$real_config_source = $config_source
}
nagios_common::check_command::config { $title:
ensure => $ensure,
source => $real_config_source,
content => $config_content,
config_dir => $config_dir,
owner => $owner,
group => $group
}
}
|