munin::master
: configure a munin mastermunin::node
: configure a munin node
munin::master::collect
: Helper class to collect the exported munin nodes.munin::node::export
: Helper class to export the munin node.
munin::master::node_definition
: Configure information about a munin node on the munin mastermunin::plugin
: Install and configure munin plugins
The munin master will install munin, and collect all exported munin node definitions as files into /etc/munin/munin-conf.d/.
include munin::master
class { 'munin::master':
tls => 'enabled',
tls_certificate => '/path/to/tls/certificate',
tls_private_key => '/path/to/tls/key',
}
The following parameters are available in the munin::master
class:
node_definitions
host_name
graph_strategy
html_strategy
config_root
file_group
collect_nodes
dbdir
htmldir
rundir
logdir
package_name
tls
tls_certificate
tls_private_key
tls_verify_certificate
extra_config
Data type: Hash
A hash of node definitions used by create_resources to make static node definitions.
Data type: Stdlib::Host
A host name for this munin master, matched with munin::node::mastername for collecting nodes. Defaults to $::fqdn
This is used for collecting munin::master::node_definition resources exported by nodes using the munin::node class.
Data type: Enum['cgi', 'cron']
Controls if munin-graph graphs all services ('cron') or if graphing is done by munin-cgi-graph (which must configured seperatly)
Data type: Enum['cgi', 'cron']
Controls if munin-html will recreate all html pages every run interval ('cron') or if html pages are generated by munin-cgi-graph (which must configured seperatly). Defaults to "cgi".
Data type: Stdlib::Absolutepath
The root directory of the munin master configuration. Default: /etc/munin on most platforms.
Data type: String
The group name for configuration file permissions.
Data type: Enum['enabled', 'disabled', 'mine', 'unclaimed']
Controls which nodes to collect.
'enabled' (default) makes the munin master collect all exported node_definitions.
'disabled' disables collection.
'mine' makes the munin master collect nodes matching the $host_name parameter.
'unclaimed' makes the munin master collect nodes not tagged with a host name.
This is used for collecting munin::master::node_definition resources exported by nodes using the munin::node class.
Data type: Optional[Stdlib::Absolutepath]
Path to the munin dbdir, where munin stores everything.
Data type: Optional[Stdlib::Absolutepath]
Path to where munin will generate HTML documents and graphs, used if graph_strategy is cron.
Data type: Optional[Stdlib::Absolutepath]
Path to directory munin uses for pid and lock files.
Data type: Optional[Stdlib::Absolutepath]
Path to directory munin uses for log files.
Data type: Variant[String,Array[String]]
The package name used for installing the munin master.
Data type: Enum['enabled', 'disabled']
Controls the use of TLS globally for master to node communications. Default 'disabled'.
Data type: Stdlib::Absolutepath
Path to a file containing a TLS certificate. No default. Required if tls is enabled.
Data type: Stdlib::Absolutepath
Path to a file containing a TLS key. No default. Required if tls is enabled.
Data type: Enum['yes','no']
If TLS is used, verify the certificate. Defaults to 'yes'.
Data type: Array[String]
Extra lines of config to put in munin.conf.
Configure a munin node, and export configuration a munin master can collect.
List of IPv4 and IPv6 addresses and networks to allow remote munin masters to connect. By default, the munin node only permits connections from the local host.
include munin::node
class {'munin::node':
allow => ['192.0.2.1', '2001:db8::1'],
}
The following parameters are available in the munin::node
class:
allow
config_root
nodeconfig
host_name
log_dir
log_file
log_destination
purge_configs
syslog_facility
export_node
masterconfig
mastername
mastergroup
plugins
address
bind_address
bind_port
package_name
service_name
service_ensure
file_group
timeout
plugin_share_dir
Data type: Array
Data type: Stdlib::Absolutepath
Root directory for munin configuration.
Data type: Array
List of lines to append to the munin node configuration.
Data type: Stdlib::Host
The host name munin node identifies as. Defaults to the $::fqdn fact.
Data type: Stdlib::Absolutepath
The log directory for the munin node process. Defaults change according to osfamily, see munin::params::node for details.
Data type: String
File name for the log file, this is appended to "log_dir". Defaults to "munin-node.log".
Data type: Enum['file','syslog']
Configures the log destination. Defaults to "file". If set to "syslog", the "log_file" and "log_dir" parameters are ignored, and the "syslog_*" parameters are used if set.
Data type: Boolean
Removes all munin plugins and munin plugin configuration files not managed by Puppet. Defaults to false.
Data type:
Optional[
Variant[
Integer[0,23],
Enum[
'kern','user','mail','daemon','auth','syslog','lpr','news','uucp',
'authpriv','ftp','cron','local0','local1','local2','local3','local4',
'local5','local6','local7'
]]]
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.
Data type: Enum['enabled','disabled']
Causes the node config to be exported to puppetmaster. Defaults to "enabled".
This is used for exporting a munin::master::node_definition, to be collected by a node with munin::master.
Data type: Array
List of configuration lines to append to the munin master node definition.
This is used for exporting a munin::master::node_definition, to be collected by a node with munin::master.
Data type: Optional[Stdlib::Host]
The name of the munin master server which will collect the node definition.
This is used for exporting a munin::master::node_definition, to be collected by a node with munin::master.
Data type: Optional[String]
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.
This is used for exporting a munin::master::node_definition, to be collected by a node with munin::master.
Data type: Hash
A hash used by create_resources to create munin::plugin instances.
Data type: String
The address used in the munin master node definition.
Data type: Variant[Enum['*'],Stdlib::Host]
The IP address the munin-node process listens on. Defaults: *.
Data type: Stdlib::Port
The port number the munin-node process listens on.
Data type: String
The name of the munin node package to install.
Data type: String
The name of the munin node service.
Data type: Enum['running','stopped']
Used as parameter "ensure" for the munin node service.
Data type: String
The UNIX group name owning the configuration files, log files, etc.
Data type: Optional[Integer[0]]
Set the global plugin runtime timeout for this node. Defaults to undef, which lets munin-node use its default of 10 seconds.
Default value: $munin::params::node::timeout
Data type: Stdlib::Absolutepath
This will add configuration for the munin master to connect to a munin node, and ask for data from its munin plugins.
The resource title is used as the munin FQN, or "fully qualified name". This defines the node name and group. It is common to use the host's fully qualified domain name, where the domain name will be implicitly used as the node group.
Note: By default, using munin::node on a node will create a export a munin::master::node_definition to PuppetDB. The node classified with munin::master will collect all these exported instances.
munin::master::node_definition { 'foo.example.com':
address => '192.0.2.1',
}
munin::master::node_definition { 'bar.example.com':
address => '192.0.2.2',
config => [ 'load.graph_future 30',
'load.load.trend yes',
'load.load.predict 86400,12' ],
}
munin::master::node_definition { 'webservers;web01.example.com':
address => '192.0.2.3',
}
The following parameters are available in the munin::master::node_definition
defined type:
Data type: String
The address of the munin node. A hostname, an IP address, or a ssh:// uri for munin-async node.
Data type: Optional[String]
The name of the munin master server which will collect the node definition. This is used when exporting and collecting munin::master::node_definition resources between hosts.
Default value: ''
Data type: Array[String]
An array of configuration lines to be added to the node definition.
Default value: []
Data type: String
The Munin FQN (Fully Qualified Name) of the node. This should be 'hostname', 'group;hostname', 'group;subgroup;hostname').
If a group is not set, munin will by default use the domain of the node as a group, if the node name is a fully qualified host name.
The title of the defined resource should be a munin FQN. See the "fqn" parameter
Default value: $title
Install and configure munin plugins
munin::plugin { 'cpu':
ensure => link,
}
munin::plugin { 'foo_bar':
ensure => link,
target => 'foo_',
}
munin::plugin { 'gazonk':
ensure => present,
source => 'puppet:///modules/profile/foo/monitoring/gazonk',
}
munin::plugin { 'bletch':
ensure => link,
config => ['env.database thing', 'user bletch'],
}
munin::plugin { 'slapd':
config => ['env.rootdn cn=admin,dc=example,dc=org'],
config_label => 'slapd_*',
}
The following parameters are available in the munin::plugin
defined type:
Data type: Enum['','present','absent','link']
The ensure parameter is mandatory for installing a plugin.
With "ensure => link", a symlink is created in the munin plugin directory to where the plugin file is installed.
With "ensure => present", the plugin is installed in the munin plugin directory, and the "source" or "content" parameter is required to provide a source for the plugin.
With "ensure => absent", remove the munin plugin.
When ensure is not set, a plugin will not be installed, but extra plugin configuration can be managed with the config and config_label parameters.
Default value: ''
Data type: Optional[String]
When ensure => present, path to a source file
Default value: undef
Data type: Optional[String[1]]
When ensure => present, content of the plugin.
Default value: undef
Data type: Optional[String[1]]
Checksum type for the plugin file.
Default value: undef
Data type: Optional[String[1]]
Checksum value for the plugin file.
Default value: undef
Data type: String
When "ensure => link", Add a link in the plugin directory to the link target.
If target is an absolute path (starts with "/") it is used directly.
If target is a relative path, $munin::node::plugin_share_dir is prepended.
If target is unset, a link is created to a plugin with the same name in the packaged $munin::node:: plugin_share_dir directory. (In other words, activate a plugin that is already installed)
Default value: ''
Data type: Optional[Array[String]]
Lines for the munin plugin config.
Default value: []
Data type: String
Label for munin plugin config
Default value: $title