Puppet Class: icingaweb2::module::graphite
- Defined in:
- manifests/module/graphite.pp
Summary
The Graphite module draws graphs out of time series data stored in Graphite.Overview
Note:
If you want to use ‘git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`.
Note:
Here the official [Graphite module documentation](www.icinga.com/docs/graphite/latest/) can be found.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'manifests/module/graphite.pp', line 62
class icingaweb2::module::graphite (
Enum['absent', 'present'] $ensure,
Stdlib::HTTPUrl $git_repository,
Enum['git', 'none', 'package'] $install_method,
String[1] $package_name,
Stdlib::Absolutepath $module_dir = "${icingaweb2::globals::default_module_path}/graphite",
Optional[String[1]] $git_revision = undef,
Optional[Stdlib::HTTPUrl] $url = undef,
Optional[Boolean] $insecure = undef,
Optional[String[1]] $user = undef,
Optional[Icinga::Secret] $password = undef,
Optional[String[1]] $graphite_writer_host_name_template = undef,
Optional[String[1]] $graphite_writer_service_name_template = undef,
Optional[String[1]] $customvar_obscured_check_command = undef,
Optional[Enum[
'minutes', 'hours', 'days',
'weeks', 'months', 'years'
]] $default_time_range_unit = undef,
Optional[Integer[1]] $default_time_range = undef,
Optional[Boolean] $disable_no_graphs = undef,
) {
require icingaweb2
$conf_dir = $icingaweb2::globals::conf_dir
$module_conf_dir = "${conf_dir}/modules/graphite"
$graphite_settings = {
'url' => $url,
'user' => $user,
'password' => unwrap($password),
'insecure' => $insecure,
}
$icinga_settings = {
'graphite_writer_host_name_template' => $graphite_writer_host_name_template,
'graphite_writer_service_name_template' => $graphite_writer_service_name_template,
'customvar_obscured_check_command' => $customvar_obscured_check_command,
}
$ui_settings = {
'default_time_range' => $default_time_range,
'default_time_range_unit' => $default_time_range_unit,
'disable_no_graphs_found' => $disable_no_graphs,
}
$settings = {
'module-graphite-graphite' => {
'section_name' => 'graphite',
'target' => "${module_conf_dir}/config.ini",
'settings' => delete_undef_values($graphite_settings),
},
'module-graphite-icinga' => {
'section_name' => 'icinga',
'target' => "${module_conf_dir}/config.ini",
'settings' => delete_undef_values($icinga_settings),
},
'module-graphite-ui' => {
'section_name' => 'ui',
'target' => "${module_conf_dir}/config.ini",
'settings' => delete_undef_values($ui_settings),
},
}
icingaweb2::module { 'graphite':
ensure => $ensure,
git_repository => $git_repository,
git_revision => $git_revision,
install_method => $install_method,
module_dir => $module_dir,
package_name => $package_name,
settings => $settings,
}
}
|