summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/client.pp14
-rw-r--r--manifests/client/base.pp16
-rw-r--r--manifests/client/centos.pp2
-rw-r--r--manifests/client/debian.pp18
-rw-r--r--manifests/client/gentoo.pp4
-rw-r--r--manifests/client/openbsd.pp50
-rw-r--r--manifests/client/package.pp8
-rw-r--r--manifests/host.pp22
-rw-r--r--manifests/init.pp17
-rw-r--r--manifests/plugin.pp54
-rw-r--r--manifests/plugin/scriptpaths.pp13
-rw-r--r--manifests/plugins/apache.pp8
-rw-r--r--manifests/plugins/base.pp64
-rw-r--r--manifests/plugins/debian.pp5
-rw-r--r--manifests/plugins/djbdns.pp2
-rw-r--r--manifests/plugins/dom0.pp14
-rw-r--r--manifests/plugins/gentoo.pp6
-rw-r--r--manifests/plugins/interfaces.pp33
-rw-r--r--manifests/plugins/linux.pp16
-rw-r--r--manifests/plugins/muninhost.pp5
-rw-r--r--manifests/plugins/nagios.pp8
-rw-r--r--manifests/plugins/openbsd.pp17
-rw-r--r--manifests/plugins/physical.pp8
-rw-r--r--manifests/plugins/selinux.pp5
-rw-r--r--manifests/plugins/setup.pp26
-rw-r--r--manifests/plugins/vserver.pp10
-rw-r--r--manifests/remoteplugin.pp26
-rw-r--r--manifests/snmp_collector.pp12
28 files changed, 237 insertions, 246 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index d033c28..273070d 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -3,14 +3,14 @@
# See LICENSE for the full license granted to you.
# Adapted and improved by admin(at)immerda.ch
-class munin::client {
+class munin::client inherits munin {
- $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port }
- $munin_host_real = $munin_host ? {
- '' => '*',
- 'fqdn' => '*',
- default => $munin_host
- }
+ $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port }
+ $munin_host_real = $munin_host ? {
+ '' => '*',
+ 'fqdn' => '*',
+ default => $munin_host
+ }
case $operatingsystem {
openbsd: { include munin::client::openbsd }
diff --git a/manifests/client/base.pp b/manifests/client/base.pp
index 1f72e7e..17387e8 100644
--- a/manifests/client/base.pp
+++ b/manifests/client/base.pp
@@ -1,11 +1,11 @@
class munin::client::base {
service { 'munin-node':
- ensure => running,
+ ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
}
- file {'/etc/munin/':
+ file {'/etc/munin':
ensure => directory,
mode => 0755, owner => root, group => 0;
}
@@ -14,10 +14,12 @@ class munin::client::base {
default => $munin_allow
}
file {'/etc/munin/munin-node.conf':
- content => template("munin/munin-node.conf.$operatingsystem"),
+ content => template("munin/munin-node.conf.$operatingsystem"),
notify => Service['munin-node'],
- mode => 0644, owner => root, group => 0,
- }
- munin::register { $fqdn: }
- include munin::plugins::base
+ mode => 0644, owner => root, group => 0,
+ }
+ munin::register { $fqdn:
+ config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'],
+ }
+ include munin::plugins::base
}
diff --git a/manifests/client/centos.pp b/manifests/client/centos.pp
index 46a7e3f..42e8c59 100644
--- a/manifests/client/centos.pp
+++ b/manifests/client/centos.pp
@@ -1,3 +1,3 @@
class munin::client::centos inherits munin::client::package {
- include munin::plugins::centos
+ include munin::plugins::centos
}
diff --git a/manifests/client/debian.pp b/manifests/client/debian.pp
index a6d677e..97f5fbf 100644
--- a/manifests/client/debian.pp
+++ b/manifests/client/debian.pp
@@ -1,15 +1,15 @@
class munin::client::debian inherits munin::client::package {
# the plugin will need that
- package { "iproute": ensure => installed }
+ package { "iproute": ensure => installed }
- Service["munin-node"]{
- # sarge's munin-node init script has no status
- hasstatus => $lsbdistcodename ? { sarge => false, default => true }
- }
+ Service["munin-node"]{
+ # sarge's munin-node init script has no status
+ hasstatus => $lsbdistcodename ? { sarge => false, default => true }
+ }
File["/etc/munin/munin-node.conf"]{
- content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"),
+ content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"),
}
- # workaround bug in munin_node_configure
- plugin { "postfix_mailvolume": ensure => absent }
- include munin::plugins::debian
+ # workaround bug in munin_node_configure
+ plugin { "postfix_mailvolume": ensure => absent }
+ include munin::plugins::debian
}
diff --git a/manifests/client/gentoo.pp b/manifests/client/gentoo.pp
index 53d472b..c24d317 100644
--- a/manifests/client/gentoo.pp
+++ b/manifests/client/gentoo.pp
@@ -3,6 +3,6 @@ class munin::client::gentoo inherits munin::client::package {
name => 'munin',
category => 'net-analyzer',
}
-
- include munin::plugins::gentoo
+
+ include munin::plugins::gentoo
}
diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp
index 4c2807c..7012c00 100644
--- a/manifests/client/openbsd.pp
+++ b/manifests/client/openbsd.pp
@@ -1,39 +1,55 @@
# 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:///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 84fcf5c..18566b8 100644
--- a/manifests/client/package.pp
+++ b/manifests/client/package.pp
@@ -1,11 +1,11 @@
class munin::client::package inherits munin::client::base {
- package { 'munin-node': ensure => installed }
+ package { 'munin-node': ensure => installed }
Service['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 734eea6..3e4f5ea 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -2,11 +2,11 @@
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
-class munin::host
+class munin::host inherits munin
{
- package {"munin": ensure => installed, }
+ package {"munin": ensure => installed, }
- File <<| tag == 'munin' |>>
+ File <<| tag == 'munin' |>>
file{'/etc/munin/munin.conf.header':
source => [ "puppet:///modules/site-munin/config/host/${fqdn}/munin.conf.header",
@@ -18,21 +18,15 @@ class munin::host
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;
+ concatenated_file { "/etc/munin/munin.conf":
+ dir => '/var/lib/puppet/modules/munin/nodes',
+ header => "/etc/munin/munin.conf.header",
}
include munin::plugins::muninhost
- case $operatingsystem {
- centos: { include munin::host::cgi }
+ if $munin_do_cgi_graphing {
+ include munin::host::cgi
}
# from time to time we cleanup hanging munin-runs
diff --git a/manifests/init.pp b/manifests/init.pp
index e5a92af..bae83a4 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -2,21 +2,20 @@
# munin module
# munin.pp - everything a sitewide munin installation needs
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
-#
+#
# Copyright 2008, Puzzle ITC GmbH
# Marcel Härry haerry+puppet(at)puzzle.ch
# Simon Josi josi+puppet(at)puzzle.ch
#
-# This program is free software; you can redistribute
-# it and/or modify it under the terms of the GNU
-# General Public License version 3 as published by
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of the GNU
+# General Public License version 3 as published by
# the Free Software Foundation.
#
-# the port is a parameter so vservers can share
+# the port is a parameter so vservers can share
# IP addresses and still be happy
-modules_dir { [ "munin", "munin/nodes", "munin/plugins" ]: }
-
-case $operatingsystem {
- debian,ubuntu: { include assert_lsbdistcodename }
+class munin {
+ include common::moduledir
+ module_dir { [ "munin", "munin/nodes", "munin/plugins" ]: }
}
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index e688a39..69b7322 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -14,11 +14,13 @@ define munin::plugin (
$plugin_src = $ensure ? { "present" => $name, default => $ensure }
$plugin = "/etc/munin/plugins/$name"
$plugin_conf = "/etc/munin/plugin-conf.d/$name.conf"
+
+ include munin::plugins::setup
case $ensure {
- "absent": {
- file { $plugin: ensure => absent, }
- }
- default: {
+ "absent": {
+ file { $plugin: ensure => absent, }
+ }
+ default: {
case $kernel {
openbsd: { $basic_require = File['/var/run/munin'] }
default: { $basic_require = Package['munin-node'] }
@@ -28,35 +30,35 @@ define munin::plugin (
} else {
$real_require = $basic_require
}
- file { $plugin:
- ensure => "${real_script_path}/${plugin_src}",
- require => $real_require,
- notify => Service['munin-node'];
- }
+ file { $plugin:
+ ensure => "${real_script_path}/${plugin_src}",
+ require => $real_require,
+ notify => Service['munin-node'];
+ }
- }
+ }
}
case $config {
- '': {
- file { $plugin_conf: ensure => absent }
- }
- default: {
- case $ensure {
- absent: {
- file { $plugin_conf: ensure => absent }
- }
- default: {
- file { $plugin_conf:
- content => "[${name}]\n$config\n",
- mode => 0644, owner => root, group => 0,
- }
+ '': {
+ file { $plugin_conf: ensure => absent }
+ }
+ default: {
+ case $ensure {
+ absent: {
+ file { $plugin_conf: ensure => absent }
+ }
+ default: {
+ file { $plugin_conf:
+ content => "[${name}]\n$config\n",
+ mode => 0644, owner => root, group => 0,
+ }
if $require {
File[$plugin_conf]{
require +> $require,
}
}
- }
- }
- }
+ }
+ }
+ }
}
}
diff --git a/manifests/plugin/scriptpaths.pp b/manifests/plugin/scriptpaths.pp
index ebaa6fa..164a17e 100644
--- a/manifests/plugin/scriptpaths.pp
+++ b/manifests/plugin/scriptpaths.pp
@@ -1,9 +1,12 @@
class munin::plugin::scriptpaths {
case $operatingsystem {
- 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/" }
- default: { $script_path = "/usr/share/munin/plugins" }
+ gentoo: { $script_path = "/usr/libexec/munin/plugins" }
+ debian: { $script_path = "/usr/share/munin/plugins" }
+ centos: { $script_path = "/usr/share/munin/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..dca3cea 100644
--- a/manifests/plugins/apache.pp
+++ b/manifests/plugins/apache.pp
@@ -1,6 +1,4 @@
-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": }
+class munin::plugins::apache {
+ munin::plugin{ [ 'apache_accesses', 'apache_processes', 'apache_volume' ]: }
+ munin::plugin::deploy { 'apache_activity': }
}
diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp
index 80a957e..007579c 100644
--- a/manifests/plugins/base.pp
+++ b/manifests/plugins/base.pp
@@ -1,50 +1,24 @@
class munin::plugins::base {
- file {
- [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]:
- source => "puppet:///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':
+ # setup basic plugins
+ munin::plugin {
+ [ df, cpu, interrupts, load, memory, netstat, open_files,
+ processes, swap, uptime, users, vmstat ]:
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
+ }
+ include munin::plugins::interfaces
- 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'],
- }
- }
- }
- 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 }
+ case $kernel {
+ openbsd: { include munin::plugins::openbsd }
+ 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/debian.pp b/manifests/plugins/debian.pp
index f239989..f756150 100644
--- a/manifests/plugins/debian.pp
+++ b/manifests/plugins/debian.pp
@@ -1,4 +1 @@
-class munin::plugins::debian inherits munin::plugins::base {
- munin::plugin { apt_all: ensure => present; }
-}
-
+class munin::plugins::debian { }
diff --git a/manifests/plugins/djbdns.pp b/manifests/plugins/djbdns.pp
index 37d8ed6..c0a5163 100644
--- a/manifests/plugins/djbdns.pp
+++ b/manifests/plugins/djbdns.pp
@@ -1,3 +1,3 @@
-class munin::plugins::djbdns inherits munin::plugins::base {
+class munin::plugins::djbdns {
munin::plugin::deploy { "tinydns": }
}
diff --git a/manifests/plugins/dom0.pp b/manifests/plugins/dom0.pp
index 8d919c3..ed4f62c 100644
--- a/manifests/plugins/dom0.pp
+++ b/manifests/plugins/dom0.pp
@@ -1,9 +1,7 @@
-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"}
+class munin::plugins::dom0 {
+ munin::plugin::deploy {
+ [ 'xen', 'xen-cpu', 'xen_memory', 'xen_mem',
+ 'xen_vm', 'xen_vbd', 'xen_traffic_all' ]:
+ config => 'user root';
+ }
}
diff --git a/manifests/plugins/gentoo.pp b/manifests/plugins/gentoo.pp
index 81d0e6b..25c1626 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"}
+class munin::plugins::gentoo {
+ 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 35ef648..18a713b 100644
--- a/manifests/plugins/interfaces.pp
+++ b/manifests/plugins/interfaces.pp
@@ -1,23 +1,22 @@
# handle if_ and if_err_ plugins
-class munin::plugins::interfaces inherits munin::plugins::base {
+class munin::plugins::interfaces {
- # replaced gsub with regsubst
- $ifs = regsubst(split($interfaces, " |,"), "(.+)", "if_\\1")
- munin::plugin {
+ $ifs = regsubst(split($interfaces, " |,"), "(.+)", "if_\\1")
+ munin::plugin {
$ifs: ensure => "if_";
+ }
+ case $operatingsystem {
+ openbsd: {
+ $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1")
+ munin::plugin{
+ $if_errs: ensure => "if_errcoll_";
+ }
}
- case $operatingsystem {
- openbsd: {
- $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1")
- munin::plugin{
- $if_errs: ensure => "if_errcoll_";
- }
- }
- default: {
- $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_err_\\1")
- munin::plugin{
- $if_errs: ensure => "if_err_";
- }
- }
+ default: {
+ $if_errs = regsubst(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 c7beb59..30e0af6 100644
--- a/manifests/plugins/linux.pp
+++ b/manifests/plugins/linux.pp
@@ -1,10 +1,8 @@
-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
+class munin::plugins::linux {
+ munin::plugin {
+ [ df_abs, forks, df_inode, irqstats, entropy, open_inodes ]:
+ ensure => present;
+ acpi:
+ ensure => $acpi_available;
+ }
}
diff --git a/manifests/plugins/muninhost.pp b/manifests/plugins/muninhost.pp
index 2af4897..e4fb87d 100644
--- a/manifests/plugins/muninhost.pp
+++ b/manifests/plugins/muninhost.pp
@@ -1,4 +1,3 @@
-class munin::plugins::muninhost inherits munin::plugins::base {
- munin::plugin { munin_update: }
- munin::plugin { munin_graph: }
+class munin::plugins::muninhost {
+ munin::plugin { ['munin_update', 'munin_graph']: }
}
diff --git a/manifests/plugins/nagios.pp b/manifests/plugins/nagios.pp
deleted file mode 100644
index 93a261c..0000000
--- a/manifests/plugins/nagios.pp
+++ /dev/null
@@ -1,8 +0,0 @@
-class munin::plugins::nagios inherits munin::plugins::base {
- munin::plugin::deploy {
- nagios_hosts: config => 'user root';
- nagios_svc: config => 'user root';
- nagios_perf_hosts: ensure => nagios_perf_, config => 'user root';
- nagios_perf_svc: ensure => nagios_perf_, config => 'user root';
- }
-}
diff --git a/manifests/plugins/openbsd.pp b/manifests/plugins/openbsd.pp
index 67cf32d..b549994 100644
--- a/manifests/plugins/openbsd.pp
+++ b/manifests/plugins/openbsd.pp
@@ -1,13 +1,6 @@
-class munin::plugins::openbsd inherits munin::plugins::base {
- munin::plugin {
- [ df, cpu, interrupts, load, memory, netstat, open_files,
- processes, swap, users, vmstat
- ]:
- ensure => present,
- }
- munin::plugin {
- [ memory_pools, memory_types ]:
- ensure => present,
- }
-
+class munin::plugins::openbsd {
+ munin::plugin {
+ [ memory_pools, memory_types ]:
+ ensure => present,
+ }
}
diff --git a/manifests/plugins/physical.pp b/manifests/plugins/physical.pp
index 6706711..ac050a5 100644
--- a/manifests/plugins/physical.pp
+++ b/manifests/plugins/physical.pp
@@ -1,5 +1,5 @@
-class munin::plugins::physical inherits munin::plugins::base {
- case $kernel {
- linux: { munin::plugin { iostat: } }
- }
+class munin::plugins::physical {
+ case $kernel {
+ linux: { munin::plugin { iostat: } }
+ }
}
diff --git a/manifests/plugins/selinux.pp b/manifests/plugins/selinux.pp
index 6affc86..faf610a 100644
--- a/manifests/plugins/selinux.pp
+++ b/manifests/plugins/selinux.pp
@@ -1,4 +1,3 @@
-class munin::plugins::selinux inherits munin::plugins::base {
- munin::plugin::deploy { "selinuxenforced": }
- munin::plugin::deploy { "selinux_avcstats": }
+class munin::plugins::selinux {
+ munin::plugin::deploy { [ 'selinuxenforced', 'selinux_avcstats' ]: }
}
diff --git a/manifests/plugins/setup.pp b/manifests/plugins/setup.pp
new file mode 100644
index 0000000..c88f9e0
--- /dev/null
+++ b/manifests/plugins/setup.pp
@@ -0,0 +1,26 @@
+class munin::plugins::setup {
+ file {
+ [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]:
+ 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'],
+ }
+ 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'],
+ }
+ }
+ }
+}
diff --git a/manifests/plugins/vserver.pp b/manifests/plugins/vserver.pp
index bce28a1..e3eec05 100644
--- a/manifests/plugins/vserver.pp
+++ b/manifests/plugins/vserver.pp
@@ -1,7 +1,7 @@
-class munin::plugins::vserver inherits munin::plugins::base {
- munin::plugin {
- [ netstat, processes ]:
- ensure => present;
- }
+class munin::plugins::vserver {
+ munin::plugin {
+ [ netstat, processes ]:
+ ensure => present;
+ }
}
diff --git a/manifests/remoteplugin.pp b/manifests/remoteplugin.pp
index 4bca235..ce87492 100644
--- a/manifests/remoteplugin.pp
+++ b/manifests/remoteplugin.pp
@@ -1,18 +1,18 @@
define munin::remoteplugin($ensure = "present", $source, $config = '') {
case $ensure {
- "absent": { munin::plugin{ $name: ensure => absent } }
- default: {
- file {
- "/var/lib/puppet/modules/munin/plugins/${name}":
- source => $source,
- mode => 0755, owner => root, group => 0;
- }
- munin::plugin { $name:
- ensure => $ensure,
- config => $config,
- script_path_in => "/var/lib/puppet/modules/munin/plugins",
- }
- }
+ "absent": { munin::plugin{ $name: ensure => absent } }
+ default: {
+ file {
+ "/var/lib/puppet/modules/munin/plugins/${name}":
+ source => $source,
+ mode => 0755, owner => root, group => 0;
+ }
+ munin::plugin { $name:
+ ensure => $ensure,
+ config => $config,
+ script_path_in => "/var/lib/puppet/modules/munin/plugins",
+ }
+ }
}
}
diff --git a/manifests/snmp_collector.pp b/manifests/snmp_collector.pp
index 60fd573..0f8318a 100644
--- a/manifests/snmp_collector.pp
+++ b/manifests/snmp_collector.pp
@@ -5,10 +5,10 @@ class munin::snmp_collector{
mode => 755, owner => root, group => 0;
}
- exec { "create_snmp_links":
- command => "/var/lib/puppet/modules/munin/create_snmp_links /var/lib/puppet/modules/munin/nodes",
- require => File["snmp_links"],
- timeout => "2048",
- schedule => daily
- }
+ exec { "create_snmp_links":
+ command => "/var/lib/puppet/modules/munin/create_snmp_links /var/lib/puppet/modules/munin/nodes",
+ require => File["snmp_links"],
+ timeout => "2048",
+ schedule => daily
+ }
}