diff --git a/CHANGELOG.md b/CHANGELOG.md index 4945acb..f337dc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,160 +1,168 @@ # Changelog +## 0.0.10 - 2015-08-01 + +* Bugfix: Add missing dependency for the "munin-node" package when + $munin::node::purge_configs is true. + ([#34](https://github.com/ssm/ssm-munin/pull/34)) + +Contributors to this release: Martin Meinhold + ## 0.0.9 - 2015-07-29 * Bugfix: The mastergroup, if used in the node's FQN (Fully Qualified Name), should no longer be empty on Puppet 4.0. ([#27](https://github.com/ssm/ssm-munin/pull/27)) * Bugfix: Using munin::master and munin::node with export and collect disabled should no longer trigger warnings about missing storeconfigs. ([#30](https://github.com/ssm/ssm-munin/issues/30), [#33](https://github.com/ssm/ssm-munin/pull/33)) ### munin::master * Add FreeBSD support. ### munin::node * New feature: Log to syslog with the "log\_destination" and "syslog\_facility" parameters. ([#23](https://github.com/ssm/ssm-munin/issues/23), [#24](https://github.com/ssm/ssm-munin/pull/24), [#25](https://github.com/ssm/ssm-munin/pull/25)) * New feature: Set the plugin runtime timeout with the "timeout" parameter. ([#29](https://github.com/ssm/ssm-munin/issues/29), [#32](https://github.com/ssm/ssm-munin/pull/32)) * New feature: Purge unmanaged plugins and plugin configuration with the "purge_configs" parameter. ([#28](https://github.com/ssm/ssm-munin/issues/28), [#31](https://github.com/ssm/ssm-munin/pull/31)) ## 0.0.8 - 2015-02-06 Support the future parser. Contributors to this release: Rike-Benjamin Schuppner, Stig Sandbeck Mathisen ## 0.0.7 - 2014-12-05 This release adds support for DragonFly BSD, FreeBSD, OpenBSD. Other changes listed below, per component. Contributors to this release: Alex Hornung, Chris Roddy, Frank Groeneveld, Fredrik Thulin, Julien Pivotto, Martin Jackson, Sebastian Wiesinger, Stig Sandbeck Mathisen ### munin::node * Add "host_name" parameter to override the host name of the munin node. * Add "file_group" parameter, used for configuration and log files. * Add "log_dir" parameter. * Improved handling of "allow" ACL parameter. ### munin::master * Improved collection logic. Set "collect_nodes" to "mine" to collect nodes which are targeted for this master, or "unclaimed" to pick up nodes not aimed a specific master. * Add global tls_* parameters for connecting to nodes. * Add "dbdir", "htmldir", "rundir" parameters. * Add "extra_config" parameter, which takes an array of extra configuration lines for munin.conf. ### munin::plugin * Support absolute paths as target for a plugin. ## 0.0.6 - 2014-12-05 * Retracted, had a breaking bug on older (3.4.x) puppet versions. ## 0.0.5 - 2014-03-19 * Support multiple masters with different nodes (Thanks: Cristian Gae) * Support older (1.4.6) munin versions (Thanks: Sergio Oliveira) * Update for compatibility with puppet 3.4 (Thanks: Harald Skoglund) * Easier configuration with more parameters. All parameters have trivial validation. ### munin::master - new parameter "config_root". Defaults should match supported operating systems. ### munin::plugin - new parameter "config_root". Defaults should match supported operating systems. ### munin::node - new parameter "address". Default is $::fqdn. This will be used as the "address" when registering with the munin master. - new parameter "config_root". Defaults should match supported operating systems. - new parameter "package_name". Default should match supported operating systems. - new parameter "service_name". Default should match supported operating systems. - new parameter "service_ensure". Default is "". Possible values: "", "running" or "stopped". ### munin::params - new class ## 0.0.4 - 2013-08-13 Bugfix for the munin::plugin define. - Bugfix: Ensure that we can run tests on ruby 1.8. - Bugfix: No longer requires the class `Munin::Plugins`, which does not exist in this module. ([#3](https://github.com/ssm/ssm-munin/issues/3)) - The `ensure` attribute no longer defaults to "link". If not set, a potentially existing plugin with the same name is not touched. - Plugin and configuration directories are now configurable. - Improved rspec tests, which now actually match the documentation. ## 0.0.2 - 2013-06-31 A few pull requests - Bugfix: Install munin package before creating munin-conf.d directory ([#1](https://github.com/ssm/ssm-munin/pull/1)) - Make graph strategy configurable ([#2](https://github.com/ssm/ssm-munin/pull/2)) - Improve documentation ## 0.0.1 - 2013-06-02 Initial release diff --git a/manifests/node.pp b/manifests/node.pp index ca4d423..cd929f4 100644 --- a/manifests/node.pp +++ b/manifests/node.pp @@ -1,183 +1,184 @@ # munin::node - Configure a munin node, and export configuration a # munin master can collect. # # Parameters: # # allow: List of IPv4 and IPv6 addresses and networks to allow to connect. # # config_root: Root directory for munin configuration. # # nodeconfig: List of lines to append to the munin node configuration. # # host_name: The host name munin node identifies as. Defaults to # the $::fqdn fact. # # log_dir: The log directory for the munin node process. Defaults # change according to osfamily, see munin::params::node for details. # # log_file: Appended to "log_dir". Defaults to "munin-node.log". # # log_destination: "file" or "syslog". Defaults to "file". If log_destination # is "syslog", the "log_file" and "log_dir" parameters are ignored, and the # "syslog_*" parameters are used if set. # # purge_configs: Removes all other munin plugins and munin plugin # configuration files. Boolean, defaults to false. # # syslog_facility: Defaults to undef, which makes munin-node use the # perl Net::Server module default of "daemon". Possible values are any # syslog facility by number, or lowercase name. # # masterconfig: List of configuration lines to append to the munin # master node definitinon # # mastername: The name of the munin master server which will collect # the node definition. # # mastergroup: The group used on the master to construct a FQN for # this node. Defaults to "", which in turn makes munin master use the # domain. Note: changing this for a node also means you need to move # rrd files on the master, or graph history will be lost. # # plugins: A hash used by create_resources to create munin::plugin # instances. # # address: The address used in the munin master node definition. # # package_name: The name of the munin node package to install. # # service_name: The name of the munin node service. # # service_ensure: Defaults to "". If set to "running" or "stopped", it # is used as parameter "ensure" for the munin node service. # # export_node: "enabled" or "disabled". Defaults to "enabled". # Causes the node config to be exported to puppetmaster. # # file_group: The UNIX group name owning the configuration files, # log files, etc. # # timeout: Used to set the global plugin runtime timeout for this # node. Integer. Defaults to undef, which lets munin-node use its # default of 10 seconds. class munin::node ( $address = $munin::params::node::address, $allow = $munin::params::node::allow, $config_root = $munin::params::node::config_root, $host_name = $munin::params::node::host_name, $log_dir = $munin::params::node::log_dir, $log_file = $munin::params::node::log_file, $masterconfig = $munin::params::node::masterconfig, $mastergroup = $munin::params::node::mastergroup, $mastername = $munin::params::node::mastername, $nodeconfig = $munin::params::node::nodeconfig, $package_name = $munin::params::node::package_name, $plugins = $munin::params::node::plugins, $purge_configs = $munin::params::node::purge_configs, $service_ensure = $munin::params::node::service_ensure, $service_name = $munin::params::node::service_name, $export_node = $munin::params::node::export_node, $file_group = $munin::params::node::file_group, $log_destination = $munin::params::node::log_destination, $syslog_facility = $munin::params::node::syslog_facility, $timeout = $munin::params::node::timeout, ) inherits munin::params::node { validate_array($allow) validate_array($nodeconfig) validate_array($masterconfig) if $mastergroup { validate_string($mastergroup) } if $mastername { validate_string($mastername) } validate_hash($plugins) validate_string($address) validate_absolute_path($config_root) validate_string($package_name) validate_string($service_name) if $service_ensure { validate_re($service_ensure, '^(running|stopped)$') } validate_re($export_node, '^(enabled|disabled)$') validate_absolute_path($log_dir) validate_re($log_destination, '^(?:file|syslog)$') validate_string($log_file) validate_string($file_group) validate_bool($purge_configs) if $timeout { validate_integer($timeout) } case $log_destination { 'file': { $_log_file = "${log_dir}/${log_file}" validate_absolute_path($_log_file) } 'syslog': { $_log_file = 'Sys::Syslog' if $syslog_facility { validate_string($syslog_facility) validate_re($syslog_facility, '^(?:\d+|(?:kern|user|mail|daemon|auth|syslog|lpr|news|uucp|authpriv|ftp|cron|local[0-7]))$') } } default: { fail('log_destination is not set') } } if $mastergroup { $fqn = "${mastergroup};${host_name}" } else { $fqn = $host_name } if $service_ensure { $_service_ensure = $service_ensure } else { $_service_ensure = undef } # Defaults File { ensure => present, owner => 'root', group => $file_group, mode => '0444', } package { $package_name: ensure => installed, } service { $service_name: ensure => $_service_ensure, enable => true, require => Package[$package_name], } file { "${config_root}/munin-node.conf": content => template('munin/munin-node.conf.erb'), require => Package[$package_name], notify => Service[$service_name], } # Export a node definition to be collected by the munin master. # (Separated into its own class to prevent warnings about "missing # storeconfigs", even if $export_node is not enabled) if $export_node == 'enabled' { class { 'munin::node::export': address => $address, fqn => $fqn, mastername => $mastername, masterconfig => $masterconfig, } } # Generate plugin resources from hiera or class parameter. create_resources(munin::plugin, $plugins, {}) # Purge unmanaged plugins and plugin configuration files. if $purge_configs { file { ["${config_root}/plugins", "${config_root}/plugin-conf.d" ]: ensure => directory, recurse => true, purge => true, + require => Package[$package_name], notify => Service[$service_name], } } } diff --git a/metadata.json b/metadata.json index cb71aca..9db9c64 100644 --- a/metadata.json +++ b/metadata.json @@ -1,62 +1,62 @@ { "name": "ssm/munin", - "version": "0.0.9", + "version": "0.0.10", "author": "ssm", "license": "Apache-2.0", "summary": "Configure munin master, node and plugins", "source": "https://github.com/ssm/ssm-munin", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.3.0" } ], "project_page": "https://github.com/ssm/ssm-munin", "issues_url": "https://github.com/ssm/ssm-munin/issues", "operatingsystem_support": [ { "operatingsystem": "CentOS", "operatingsystemrelease": [ "5", "6", "7" ] }, { "operatingsystem": "Debian", "operatingsystemrelease": [ "6", "7", "8" ] }, { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ "5", "6", "7" ] }, { "operatingsystem": "RedHat", "operatingsystemrelease": [ "5", "6", "7" ] }, { "operatingsystem": "Scientific", "operatingsystemrelease": [ "5", "6", "7" ] }, { "operatingsystem": "SmartOS" }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "10.04", "12.04", "14.04" ] }, { "operatingsystem": "FreeBSD", "operatingsystemrelease": [ "9", "10" ] }, { "operatingsystem": "DragonFly" }, { "operatingsystem": "OpenBSD" } ], "tags": [ "munin", "monitoring", "graphing", "performance", "trending" ] }