summaryrefslogtreecommitdiff
path: root/manifests/plugins
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-17 16:36:37 -0400
committerMicah Anderson <micah@riseup.net>2013-04-17 16:36:37 -0400
commit8f7c0071eb82591477876eeb3f309067853a3261 (patch)
treeb095f01b960b7ba3699da2dfa4d84cd5bb8a6361 /manifests/plugins
parentea31faee76141646c173d88bd5bec5aa4a773c1c (diff)
parenta5ce0a9317fc5dd5228cff4c5b6d36366c17b6d5 (diff)
Merge branch 'master' into leap
Conflicts: README manifests/host/cgi.pp
Diffstat (limited to 'manifests/plugins')
-rw-r--r--manifests/plugins/apache.pp4
-rw-r--r--manifests/plugins/base.pp10
-rw-r--r--manifests/plugins/dom0.pp2
-rw-r--r--manifests/plugins/gentoo.pp6
-rw-r--r--manifests/plugins/interfaces.pp19
-rw-r--r--manifests/plugins/kvm.pp7
-rw-r--r--manifests/plugins/linux.pp2
-rw-r--r--manifests/plugins/physical.pp2
-rw-r--r--manifests/plugins/selinux.pp2
-rw-r--r--manifests/plugins/setup.pp30
10 files changed, 52 insertions, 32 deletions
diff --git a/manifests/plugins/apache.pp b/manifests/plugins/apache.pp
deleted file mode 100644
index b3e7634..0000000
--- a/manifests/plugins/apache.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-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 bfccae5..c6b88ed 100644
--- a/manifests/plugins/base.pp
+++ b/manifests/plugins/base.pp
@@ -1,14 +1,18 @@
class munin::plugins::base {
-
# setup basic plugins
munin::plugin {
[ df, cpu, interrupts, load, memory, netstat, open_files,
processes, swap, uptime, users, vmstat ]:
ensure => present,
}
+ file{'/etc/munin/plugin-conf.d/df':
+ content => "[df*]\nenv.exclude none unknown iso9660 squashfs udf romfs ramfs debugfs binfmt_misc rpc_pipefs fuse.gvfs-fuse-daemon\n",
+ require => Munin::Plugin[df],
+ owner => root, group => 0, mode => 0644;
+ }
include munin::plugins::interfaces
- case $kernel {
+ case $::kernel {
openbsd: { include munin::plugins::openbsd }
linux: {
case $vserver {
@@ -18,7 +22,7 @@ class munin::plugins::base {
}
}
- case $virtual {
+ case $::virtual {
physical: { include munin::plugins::physical }
xen0: { include munin::plugins::dom0 }
}
diff --git a/manifests/plugins/dom0.pp b/manifests/plugins/dom0.pp
index ed4f62c..44995fc 100644
--- a/manifests/plugins/dom0.pp
+++ b/manifests/plugins/dom0.pp
@@ -1,6 +1,6 @@
class munin::plugins::dom0 {
munin::plugin::deploy {
- [ 'xen', 'xen-cpu', 'xen_memory', 'xen_mem',
+ [ '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 25c1626..27d4689 100644
--- a/manifests/plugins/gentoo.pp
+++ b/manifests/plugins/gentoo.pp
@@ -1,5 +1,5 @@
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"
- }
+ 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 18a713b..da89ed0 100644
--- a/manifests/plugins/interfaces.pp
+++ b/manifests/plugins/interfaces.pp
@@ -1,21 +1,24 @@
# handle if_ and if_err_ plugins
-class munin::plugins::interfaces {
+class munin::plugins::interfaces {
+
+ # filter out many of the useless interfaces that show up
+ $real_ifs = reject(split($::interfaces, ' |,'), 'eth\d+_\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+|__tmp\d+')
+ $ifs = regsubst($real_ifs, '(.+)', "if_\\1")
- $ifs = regsubst(split($interfaces, " |,"), "(.+)", "if_\\1")
munin::plugin {
- $ifs: ensure => "if_";
+ $ifs: ensure => 'if_';
}
- case $operatingsystem {
+ case $::operatingsystem {
openbsd: {
- $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1")
+ $if_errs = regsubst($real_ifs, '(.+)', "if_errcoll_\\1")
munin::plugin{
- $if_errs: ensure => "if_errcoll_";
+ $if_errs: ensure => 'if_errcoll_';
}
}
default: {
- $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_err_\\1")
+ $if_errs = regsubst($real_ifs, '(.+)', "if_err_\\1")
munin::plugin{
- $if_errs: ensure => "if_err_";
+ $if_errs: ensure => 'if_err_';
}
}
}
diff --git a/manifests/plugins/kvm.pp b/manifests/plugins/kvm.pp
new file mode 100644
index 0000000..7a1430f
--- /dev/null
+++ b/manifests/plugins/kvm.pp
@@ -0,0 +1,7 @@
+class munin::plugins::kvm {
+ munin::plugin::deploy {
+ [ 'kvm_cpu', 'kvm_mem', 'kvm_net' ]:;
+ 'kvm_io':
+ config => 'user root';
+ }
+}
diff --git a/manifests/plugins/linux.pp b/manifests/plugins/linux.pp
index 30e0af6..a73de63 100644
--- a/manifests/plugins/linux.pp
+++ b/manifests/plugins/linux.pp
@@ -3,6 +3,6 @@ class munin::plugins::linux {
[ df_abs, forks, df_inode, irqstats, entropy, open_inodes ]:
ensure => present;
acpi:
- ensure => $acpi_available;
+ ensure => $::acpi_available;
}
}
diff --git a/manifests/plugins/physical.pp b/manifests/plugins/physical.pp
index ac050a5..a1c27a7 100644
--- a/manifests/plugins/physical.pp
+++ b/manifests/plugins/physical.pp
@@ -1,5 +1,5 @@
class munin::plugins::physical {
- case $kernel {
+ case $::kernel {
linux: { munin::plugin { iostat: } }
}
}
diff --git a/manifests/plugins/selinux.pp b/manifests/plugins/selinux.pp
index faf610a..d094f35 100644
--- a/manifests/plugins/selinux.pp
+++ b/manifests/plugins/selinux.pp
@@ -1,3 +1,3 @@
class munin::plugins::selinux {
- munin::plugin::deploy { [ 'selinuxenforced', 'selinux_avcstats' ]: }
+ munin::plugin{ [ 'selinux_avcstat' ]: }
}
diff --git a/manifests/plugins/setup.pp b/manifests/plugins/setup.pp
index c2c5ed3..197b657 100644
--- a/manifests/plugins/setup.pp
+++ b/manifests/plugins/setup.pp
@@ -1,18 +1,28 @@
class munin::plugins::setup {
+
+ # This is required for the munin-node service and package requirements below.
+ include munin::client
+
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'];
+ ignore => 'snmp_*',
+ ensure => directory,
+ checksum => mtime,
+ recurse => true,
+ purge => true,
+ force => true,
+ notify => Service['munin-node'],
+ owner => root,
+ group => 0,
+ mode => '0755';
'/etc/munin/plugin-conf.d/munin-node':
- ensure => present,
- mode => 0644, owner => root, group => 0,
- notify => Service['munin-node'],
+ ensure => present,
+ notify => Service['munin-node'],
+ owner => root,
+ group => 0,
+ mode => '0640';
}
- case $kernel {
+ case $::kernel {
openbsd: {
File['/etc/munin/plugin-conf.d/munin-node']{
before => File['/var/run/munin'],