summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/client/base.pp1
-rw-r--r--manifests/client/darwin.pp1
-rw-r--r--manifests/client/debian.pp1
-rw-r--r--manifests/client/gentoo.pp1
-rw-r--r--manifests/client/openbsd.pp52
-rw-r--r--manifests/client/package.pp20
-rw-r--r--manifests/host.pp70
-rw-r--r--manifests/host/cgi.pp33
-rw-r--r--manifests/plugin.pp4
-rw-r--r--manifests/plugin/deploy.pp70
-rw-r--r--manifests/plugin/scriptpaths.pp5
-rw-r--r--manifests/plugins/apache.pp10
-rw-r--r--manifests/plugins/base.pp91
-rw-r--r--manifests/plugins/centos.pp3
-rw-r--r--manifests/plugins/dom0.pp15
-rw-r--r--manifests/plugins/gentoo.pp4
-rw-r--r--manifests/plugins/interfaces.pp34
-rw-r--r--manifests/plugins/linux.pp16
-rw-r--r--manifests/plugins/openbsd.pp14
-rw-r--r--manifests/plugins/physical.pp8
-rw-r--r--manifests/plugins/selinux.pp6
-rw-r--r--manifests/plugins/vserver.pp1
22 files changed, 267 insertions, 193 deletions
diff --git a/manifests/client/base.pp b/manifests/client/base.pp
index 17387e8..7c2adc2 100644
--- a/manifests/client/base.pp
+++ b/manifests/client/base.pp
@@ -1,4 +1,5 @@
class munin::client::base {
+
service { 'munin-node':
ensure => running,
enable => true,
diff --git a/manifests/client/darwin.pp b/manifests/client/darwin.pp
index 369a605..9cfe7e9 100644
--- a/manifests/client/darwin.pp
+++ b/manifests/client/darwin.pp
@@ -1,4 +1,5 @@
class munin::client::darwin {
+
file { "/usr/share/snmp/snmpd.conf":
mode => 744,
content => template("munin/darwin_snmpd.conf.erb"),
diff --git a/manifests/client/debian.pp b/manifests/client/debian.pp
index 97f5fbf..7c56788 100644
--- a/manifests/client/debian.pp
+++ b/manifests/client/debian.pp
@@ -1,4 +1,5 @@
class munin::client::debian inherits munin::client::package {
+
# the plugin will need that
package { "iproute": ensure => installed }
diff --git a/manifests/client/gentoo.pp b/manifests/client/gentoo.pp
index c24d317..d4fe71e 100644
--- a/manifests/client/gentoo.pp
+++ b/manifests/client/gentoo.pp
@@ -1,4 +1,5 @@
class munin::client::gentoo inherits munin::client::package {
+
Package['munin-node'] {
name => 'munin',
category => 'net-analyzer',
diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp
index c10a474..1f6248d 100644
--- a/manifests/client/openbsd.pp
+++ b/manifests/client/openbsd.pp
@@ -1,39 +1,57 @@
# currently we install munin on openbsd by targz
# :(
+
class munin::client::openbsd inherits munin::client::base {
- file{'/usr/src/munin_openbsd.tar.gz':
+
+ if $operatingsystemrelease == '4.3' {
+ file{'/usr/src/munin_openbsd.tar.gz':
source => "puppet://$server/modules/munin/openbsd/package/munin_openbsd.tar.gz",
owner => root, group => 0, mode => 0600;
- }
- package{ [ 'p5-Compress-Zlib', 'p5-Crypt-SSLeay', 'p5-HTML-Parser',
- 'p5-HTML-Tagset', 'p5-HTTP-GHTTP', 'p5-LWP-UserAgent-Determined',
- 'p5-Net-SSLeay', 'p5-Net-Server', 'p5-URI', 'p5-libwww', 'pcre', 'curl' ]:
- ensure => installed,
- before => File['/var/run/munin'],
- }
- exec{'extract_openbsd':
+ }
+ exec{'extract_openbsd':
command => 'cd /;tar xzf /usr/src/munin_openbsd.tar.gz',
unless => 'test -d /opt/munin',
require => File['/usr/src/munin_openbsd.tar.gz'],
+ before => File['/var/run/munin'],
+ }
+ package{'p5-Compress-Zlib':
+ ensure => installed,
+ before => File['/var/run/munin'],
+ }
+ } else {
+ package{'munin-node':
+ ensure => installed,
+ }
+ }
+ package{ [ 'p5-Crypt-SSLeay', 'p5-HTML-Parser', 'p5-HTML-Tagset', 'p5-HTTP-GHTTP',
+ 'p5-LWP-UserAgent-Determined', 'p5-Net-SSLeay', 'p5-Net-Server',
+ 'p5-URI', 'p5-libwww', 'pcre', 'curl' ]:
+ ensure => installed,
+ before => File['/var/run/munin'],
}
file{[ '/var/run/munin', '/var/log/munin' ]:
- ensure => directory,
- require => Exec['extract_openbsd'],
- owner => root, group => 0, mode => 0755;
+ ensure => directory,
+ owner => root, group => 0, mode => 0755;
}
openbsd::rc_local{'munin-node':
- binary => '/opt/munin/sbin/munin-node',
+ binary => $operatingsystemrelease ? {
+ '4.3' => '/opt/munin/sbin/munin-node',
+ default => '/usr/local/sbin/munin-node'
+ },
require => File['/var/run/munin'],
}
Service['munin-node']{
restart => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`',
stop => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`',
- start => '/opt/munin/sbin/munin-node',
- hasstatus => false,
- hasrestart => false,
+ start => $operatingsystemrelease ? {
+ '4.3' => '/opt/munin/sbin/munin-node',
+ default => '/usr/local/sbin/munin-node'
+ },
+ status => 'test -e /var/run/munin/munin-node.pid && (ps ax | egrep -q "^$(cat /var/run/munin/munin-node.pid).*munin-node")',
+ hasstatus => true,
+ hasrestart => true,
require => [ File['/var/run/munin'], File['/var/log/munin'] ],
}
-
cron{'clean_munin_logfile':
command => 'rm /var/log/munin/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`',
minute => 0,
diff --git a/manifests/client/package.pp b/manifests/client/package.pp
index 18566b8..0ee7443 100644
--- a/manifests/client/package.pp
+++ b/manifests/client/package.pp
@@ -1,11 +1,21 @@
class munin::client::package inherits munin::client::base {
- package { 'munin-node': ensure => installed }
+
+ if $munin_node_ensure_version == '' { $munin_node_ensure_version = 'installed' }
+
+ if $operatingsystem == "Debian" and $lsbdistcodename != "lenny" {
+ package { 'munin-common':
+ before => Package['munin-node'],
+ ensure => $munin_node_ensure_version;
+ }
+
+ package { 'munin-node': ensure => $munin_node_ensure_version }
Service['munin-node']{
- require => Package[munin-node],
+ require => Package[munin-node],
}
File['/etc/munin/munin-node.conf']{
- # this has to be installed before the package, so the postinst can
- # boot the munin-node without failure!
- before => Package['munin-node'],
+ # this has to be installed before the package, so the postinst can
+ # boot the munin-node without failure!
+ before => Package['munin-node'],
}
+ }
}
diff --git a/manifests/host.pp b/manifests/host.pp
index 87d3255..b9e59e4 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -4,41 +4,47 @@
class munin::host inherits munin
{
- package {"munin": ensure => installed, }
- File <<| tag == 'munin' |>>
-
- file{'/etc/munin/munin.conf.header':
- source => [ "puppet://$server/modules/site-munin/config/host/${fqdn}/munin.conf.header",
- "puppet://$server/modules/site-munin/config/host/munin.conf.header.$operatingsystem",
- "puppet://$server/modules/site-munin/config/host/munin.conf.header",
- "puppet://$server/modules/munin/config/host/munin.conf.header.$operatingsystem",
- "puppet://$server/modules/munin/config/host/munin.conf.header" ],
- notify => Exec['concat_/etc/munin/munin.conf'],
+ if $munin_ensure_version == '' { $munin_ensure_version = 'installed' }
+
+ File <<| tag == 'munin' |>>
+
+ package {"munin": ensure => $munin_ensure_version, }
+
+ File <<| tag == 'munin' |>>
+
+ file{'/etc/munin/munin.conf.header':
+ source => [ "puppet://$server/modules/site-munin/config/host/${fqdn}/munin.conf.header",
+ "puppet://$server/modules/site-munin/config/host/munin.conf.header.$operatingsystem",
+ "puppet://$server/modules/site-munin/config/host/munin.conf.header",
+ "puppet://$server/modules/munin/config/host/munin.conf.header.$operatingsystem",
+ "puppet://$server/modules/munin/config/host/munin.conf.header" ],
+ notify => Exec['concat_/etc/munin/munin.conf'],
+ owner => root, group => 0, mode => 0644;
+ }
+
+ concatenated_file { "/etc/munin/munin.conf":
+ dir => '/var/lib/puppet/modules/munin/nodes',
+ header => "/etc/munin/munin.conf.header",
+ }
+
+ file { ["/var/log/munin-update.log", "/var/log/munin-limits.log",
+ "/var/log/munin-graph.log", "/var/log/munin-html.log"]:
+ ensure => present,
+ mode => 640, owner => munin, group => 0;
+ }
+
+ include munin::plugins::muninhost
+
+ case $operatingsystem {
+ centos: {
+ include munin::host::cgi
+ # from time to time we cleanup hanging munin-runs
+ file{'/etc/cron.d/munin_kill':
+ content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n",
owner => root, group => 0, mode => 0644;
+ }
}
-
- concatenated_file { "/etc/munin/munin.conf":
- dir => '/var/lib/puppet/modules/munin/nodes',
- header => "/etc/munin/munin.conf.header",
- }
-
- file { ["/var/log/munin-update.log", "/var/log/munin-limits.log",
- "/var/log/munin-graph.log", "/var/log/munin-html.log"]:
- ensure => present,
- mode => 640, owner => munin, group => 0;
- }
-
- include munin::plugins::muninhost
-
- case $operatingsystem {
- centos: { include munin::host::cgi }
- }
-
- # from time to time we cleanup hanging munin-runs
- file{'/etc/cron.d/munin_kill':
- content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n",
- owner => root, group => 0, mode => 0644;
}
if $use_shorewall {
include shorewall::rules::out::munin
diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp
index aeb0cdf..0cb3b32 100644
--- a/manifests/host/cgi.pp
+++ b/manifests/host/cgi.pp
@@ -1,16 +1,29 @@
-class munin::host::cgi {
- exec{'set_modes_for_cgi':
+class munin::host::cgi inherits munin::host {
+
+ case $operatingsystem {
+ debian: {
+ exec { 'set_modes_for_cgi':
+ command => 'chgrp www-data /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/munin/* -maxdepth 1 -type d -exec chgrp -R www-data {} \; && find /var/www/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;',
+ refreshonly => true,
+ subscribe => File['/etc/munin/munin.conf.header'],
+ }
+ }
+ default: {
+ exec { 'set_modes_for_cgi':
command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;',
refreshonly => true,
subscribe => File['/etc/munin/munin.conf.header'],
+ }
}
+ }
- file{'/etc/logrotate.d/munin':
- source => [ "puppet://$server/modules/site-munin/config/host/${fqdn}/logrotate",
- "puppet://$server/modules/site-munin/config/host/logrotate.$operatingsystem",
- "puppet://$server/modules/site-munin/config/host/logrotate",
- "puppet://$server/modules/munin/config/host/logrotate.$operatingsystem",
- "puppet://$server/modules/munin/config/host/logrotate" ],
- owner => root, group => 0, mode => 0644;
- }
+ file{ '/etc/logrotate.d/munin':
+ source => [ "puppet://$server/modules/site-munin/config/host/${fqdn}/logrotate",
+ "puppet://$server/modules/site-munin/config/host/logrotate.$operatingsystem",
+ "puppet://$server/modules/site-munin/config/host/logrotate",
+ "puppet://$server/modules/munin/config/host/logrotate.$operatingsystem",
+ "puppet://$server/modules/munin/config/host/logrotate" ],
+ owner => root, group => 0, mode => 0644;
+ }
+
}
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index cdaa17d..08ac916 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -8,7 +8,7 @@
define munin::plugin (
$ensure = "present",
$script_path_in = '',
- $config = '')
+ $config = '' )
{
include munin::plugin::scriptpaths
$real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in }
@@ -16,6 +16,7 @@ define munin::plugin (
$plugin_src = $ensure ? { "present" => $name, default => $ensure }
$plugin = "/etc/munin/plugins/$name"
$plugin_conf = "/etc/munin/plugin-conf.d/$name.conf"
+
case $ensure {
"absent": {
file { $plugin: ensure => absent, }
@@ -62,3 +63,4 @@ define munin::plugin (
}
}
}
+
diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp
index 846a873..0ab4e9f 100644
--- a/manifests/plugin/deploy.pp
+++ b/manifests/plugin/deploy.pp
@@ -1,37 +1,39 @@
-define munin::plugin::deploy($source = '', $ensure = 'present', $config = '') {
- $plugin_src = $ensure ? {
- 'present' => $name,
- 'absent' => $name,
- default => $ensure
- }
- $real_source = $source ? {
- '' => "munin/plugins/$plugin_src",
- default => $source
- }
- include munin::plugin::scriptpaths
- file { "munin_plugin_${name}":
- path => "$munin::plugin::scriptpaths::script_path/${name}",
- source => "puppet://$server/modules/$real_source",
- mode => 0755, owner => root, group => 0;
- }
+define munin::plugin::deploy( $source = '', $ensure = 'present', $config = '' )
+{
+ $plugin_src = $ensure ? {
+ 'present' => $name,
+ 'absent' => $name,
+ default => $ensure
+ }
+
+ $real_source = $source ? {
+ '' => "munin/plugins/$plugin_src",
+ default => $source
+ }
+
+ include munin::plugin::scriptpaths
+
+ file { "munin_plugin_${name}":
+ path => "$munin::plugin::scriptpaths::script_path/${name}",
+ source => "puppet://$server/modules/$real_source",
+ mode => 0755, owner => root, group => 0;
+ }
- case $kernel {
- openbsd: { $basic_require = File['/var/run/munin'] }
- default: { $basic_require = Package['munin-node'] }
- }
- if $require {
- File["munin_plugin_${name}"]{
- require => [ $basic_require, $require ],
- }
- } else {
- File["munin_plugin_${name}"]{
- require => $basic_require,
- }
- }
- # register the plugin
- if $require {
- munin::plugin{$name: ensure => $ensure, config => $config, require => $require }
- } else {
- munin::plugin{$name: ensure => $ensure, config => $config }
+ case $kernel {
+ openbsd: { $basic_require = File['/var/run/munin'] }
+ default: { $basic_require = Package['munin-node'] }
+ }
+
+ if $require { File["munin_plugin_${name}"]{ require => [ $basic_require, $require ] } }
+ else {
+ File["munin_plugin_${name}"]{
+ require => $basic_require,
}
+ }
+
+ # register the plugin
+ if $require { munin::plugin{$name: ensure => $ensure, config => $config, require => $require } }
+ else {
+ munin::plugin{$name: ensure => $ensure, config => $config }
+ }
}
diff --git a/manifests/plugin/scriptpaths.pp b/manifests/plugin/scriptpaths.pp
index ce27384..164a17e 100644
--- a/manifests/plugin/scriptpaths.pp
+++ b/manifests/plugin/scriptpaths.pp
@@ -3,7 +3,10 @@ class munin::plugin::scriptpaths {
gentoo: { $script_path = "/usr/libexec/munin/plugins" }
debian: { $script_path = "/usr/share/munin/plugins" }
centos: { $script_path = "/usr/share/munin/plugins" }
- openbsd: { $script_path = "/opt/munin/lib/plugins/" }
+ openbsd: { $script_path = $operatingsystemrelease ? {
+ '4.3' => '/opt/munin/lib/plugins/',
+ default => '/usr/local/libexec/munin/plugins/'
+ } }
default: { $script_path = "/usr/share/munin/plugins" }
}
}
diff --git a/manifests/plugins/apache.pp b/manifests/plugins/apache.pp
index ee90de8..030e7e6 100644
--- a/manifests/plugins/apache.pp
+++ b/manifests/plugins/apache.pp
@@ -1,6 +1,8 @@
class munin::plugins::apache inherits munin::plugins::base {
- munin::plugin{ "apache_accesses": }
- munin::plugin{ "apache_processes": }
- munin::plugin{ "apache_volume": }
- munin::plugin::deploy { "apache_activity": }
+
+ munin::plugin{ "apache_accesses": }
+ munin::plugin{ "apache_processes": }
+ munin::plugin{ "apache_volume": }
+ munin::plugin::deploy { "apache_activity": }
+
}
diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp
index 4658acc..64756bc 100644
--- a/manifests/plugins/base.pp
+++ b/manifests/plugins/base.pp
@@ -1,50 +1,55 @@
class munin::plugins::base {
- file {
- [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]:
- source => "puppet://$server/modules/common/empty",
- ignore => [ '\.ignore', 'snmp_*' ],
- ensure => directory, checksum => mtime,
- recurse => true, purge => true, force => true,
- mode => 0755, owner => root, group => 0,
- notify => Service['munin-node'];
- '/etc/munin/plugin-conf.d/munin-node':
- ensure => present,
- mode => 0644, owner => root, group => 0,
- notify => Service['munin-node'],
- }
- munin::plugin {
- [ df, cpu, interrupts, load, memory, netstat, open_files,
- processes, swap, uptime, users, vmstat
- ]:
- ensure => present,
- }
- include munin::plugins::interfaces
+ file {
+ [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]:
+ source => "puppet://$server/modules/common/empty",
+ ignore => [ '\.ignore', 'snmp_*' ],
+ ensure => directory, checksum => mtime,
+ recurse => true, purge => true, force => true,
+ mode => 0755, owner => root, group => 0,
+ notify => Service['munin-node'];
- case $kernel {
- openbsd: {
- File['/etc/munin/plugin-conf.d/munin-node']{
- before => File['/var/run/munin'],
- }
- }
- default: {
- File['/etc/munin/plugin-conf.d/munin-node']{
- before => Package['munin-node'],
- }
- }
+ '/etc/munin/plugin-conf.d/munin-node':
+ ensure => present,
+ mode => 0644, owner => root, group => 0,
+ notify => Service['munin-node'],
+ }
+
+ munin::plugin {
+ [ df, cpu, interrupts, load, memory, netstat, open_files,
+ processes, swap, uptime, vmstat ]:
+ ensure => present,
+ }
+
+ include munin::plugins::interfaces
+
+ case $kernel {
+ openbsd: {
+ File['/etc/munin/plugin-conf.d/munin-node']{
+ before => File['/var/run/munin'],
+ }
}
- case $kernel {
- linux: {
- case $vserver {
- guest: { include munin::plugins::vserver }
- default: {
- include munin::plugins::linux
- }
- }
- }
+ default: {
+ File['/etc/munin/plugin-conf.d/munin-node']{
+ before => Package['munin-node'],
+ }
}
- case $virtual {
- physical: { include munin::plugins::physical }
- xen0: { include munin::plugins::dom0 }
+ }
+
+ case $kernel {
+ linux: {
+ case $vserver {
+ guest: { include munin::plugins::vserver }
+ default: {
+ include munin::plugins::linux
+ }
+ }
}
+ }
+
+ case $virtual {
+ physical: { include munin::plugins::physical }
+ xen0: { include munin::plugins::dom0 }
+ }
+
}
diff --git a/manifests/plugins/centos.pp b/manifests/plugins/centos.pp
new file mode 100644
index 0000000..60c706c
--- /dev/null
+++ b/manifests/plugins/centos.pp
@@ -0,0 +1,3 @@
+class munin::plugins::centos inherits munin::plugins::base {
+ munin::plugin { users: ensure => present; }
+}
diff --git a/manifests/plugins/dom0.pp b/manifests/plugins/dom0.pp
index 8d919c3..3efc6bd 100644
--- a/manifests/plugins/dom0.pp
+++ b/manifests/plugins/dom0.pp
@@ -1,9 +1,10 @@
class munin::plugins::dom0 inherits munin::plugins::physical {
- munin::plugin::deploy { "xen": config => "user root"}
- munin::plugin::deploy { "xen-cpu": config => "user root"}
- munin::plugin::deploy { "xen_memory": config => "user root"}
- munin::plugin::deploy { "xen_mem": config => "user root"}
- munin::plugin::deploy { "xen_vm": config => "user root"}
- munin::plugin::deploy { "xen_vbd": config => "user root"}
- munin::plugin::deploy { "xen_traffic_all": config => "user root"}
+
+ munin::plugin::deploy { "xen": config => "user root"}
+ munin::plugin::deploy { "xen-cpu": config => "user root"}
+ munin::plugin::deploy { "xen_memory": config => "user root"}
+ munin::plugin::deploy { "xen_mem": config => "user root"}
+ munin::plugin::deploy { "xen_vm": config => "user root"}
+ munin::plugin::deploy { "xen_vbd": config => "user root"}
+ munin::plugin::deploy { "xen_traffic_all": config => "user root"}
}
diff --git a/manifests/plugins/gentoo.pp b/manifests/plugins/gentoo.pp
index 81d0e6b..6d02a24 100644
--- a/manifests/plugins/gentoo.pp
+++ b/manifests/plugins/gentoo.pp
@@ -1,3 +1,5 @@
class munin::plugins::gentoo inherits munin::plugins::base {
- munin::plugin::deploy { "gentoo_lastupdated": config => "user portage\nenv.logfile /var/log/emerge.log\nenv.tail /usr/bin/tail\nenv.grep /bin/grep"}
+
+ munin::plugin::deploy { "gentoo_lastupdated": config => "user portage\nenv.logfile /var/log/emerge.log\nenv.tail /usr/bin/tail\nenv.grep /bin/grep"}
+
}
diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp
index df0828c..03ed0e7 100644
--- a/manifests/plugins/interfaces.pp
+++ b/manifests/plugins/interfaces.pp
@@ -1,22 +1,22 @@
# handle if_ and if_err_ plugins
class munin::plugins::interfaces inherits munin::plugins::base {
-
- $ifs = gsub(split($interfaces, " |,"), "(.+)", "if_\\1")
- munin::plugin {
- $ifs: ensure => "if_";
+
+ $ifs = gsub(split($interfaces, " |,"), "(.+)", "if_\\1")
+
+ munin::plugin { $ifs: ensure => "if_"; }
+
+ case $operatingsystem {
+ openbsd: {
+ $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1")
+ munin::plugin{
+ $if_errs: ensure => "if_errcoll_";
+ }
}
- case $operatingsystem {
- openbsd: {
- $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1")
- munin::plugin{
- $if_errs: ensure => "if_errcoll_";
- }
- }
- default: {
- $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1")
- munin::plugin{
- $if_errs: ensure => "if_err_";
- }
- }
+ default: {
+ $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1")
+ munin::plugin{
+ $if_errs: ensure => "if_err_";
+ }
}
+ }
}
diff --git a/manifests/plugins/linux.pp b/manifests/plugins/linux.pp
index 86696cc..5c6afe9 100644
--- a/manifests/plugins/linux.pp
+++ b/manifests/plugins/linux.pp
@@ -1,10 +1,12 @@
class munin::plugins::linux inherits munin::plugins::base {
- munin::plugin {
- [ df_abs, forks, df_inode, irqstats, entropy, open_inodes ]:
- ensure => present;
- acpi:
- ensure => $acpi_available;
- }
- include munin::plugins::interfaces
+ munin::plugin {
+ [ df_abs, forks, df_inode, irqstats, entropy, open_inodes ]:
+ ensure => present;
+ acpi:
+ ensure => $acpi_available;
+ }
+
+ include munin::plugins::interfaces
+
}
diff --git a/manifests/plugins/openbsd.pp b/manifests/plugins/openbsd.pp
index 67cf32d..feb71fb 100644
--- a/manifests/plugins/openbsd.pp
+++ b/manifests/plugins/openbsd.pp
@@ -1,13 +1,9 @@
class munin::plugins::openbsd inherits munin::plugins::base {
- munin::plugin {
+
+ munin::plugin {
[ df, cpu, interrupts, load, memory, netstat, open_files,
- processes, swap, users, vmstat
- ]:
- ensure => present,
- }
- munin::plugin {
- [ memory_pools, memory_types ]:
+ processes, swap, users, vmstat, memory_pools, memory_types ]:
ensure => present,
- }
-
+ }
+
}
diff --git a/manifests/plugins/physical.pp b/manifests/plugins/physical.pp
index 6706711..1bf1465 100644
--- a/manifests/plugins/physical.pp
+++ b/manifests/plugins/physical.pp
@@ -1,5 +1,7 @@
class munin::plugins::physical inherits munin::plugins::base {
- case $kernel {
- linux: { munin::plugin { iostat: } }
- }
+
+ case $kernel {
+ linux: { munin::plugin { iostat: } }
+ }
+
}
diff --git a/manifests/plugins/selinux.pp b/manifests/plugins/selinux.pp
index 6affc86..847f0b9 100644
--- a/manifests/plugins/selinux.pp
+++ b/manifests/plugins/selinux.pp
@@ -1,4 +1,6 @@
class munin::plugins::selinux inherits munin::plugins::base {
- munin::plugin::deploy { "selinuxenforced": }
- munin::plugin::deploy { "selinux_avcstats": }
+
+ munin::plugin::deploy { "selinuxenforced": }
+ munin::plugin::deploy { "selinux_avcstats": }
+
}
diff --git a/manifests/plugins/vserver.pp b/manifests/plugins/vserver.pp
index f24af07..42a9bf4 100644
--- a/manifests/plugins/vserver.pp
+++ b/manifests/plugins/vserver.pp
@@ -1,4 +1,5 @@
class munin::plugins::vserver inherits munin::plugins::base {
+
munin::plugin {
[ netstat, processes ]:
ensure => present;