From f34ff5e44d61edef9c7a5e243c623b4524012121 Mon Sep 17 00:00:00 2001 From: Simon Josi Date: Wed, 27 Jan 2010 17:07:42 +0100 Subject: upgrade to 0.25 --- manifests/plugins/interfaces.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index 99b85ba..0062678 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -1,19 +1,19 @@ # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { - $ifs = gsub(split($interfaces, " |,"), "(.+)", "if_\\1") + $ifs = regsubst(split($interfaces, " |,"), "(.+)", "if_\\1") munin::plugin { $ifs: ensure => "if_"; } case $operatingsystem { openbsd: { - $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1") + $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1") munin::plugin{ $if_errs: ensure => "if_errcoll_"; } } default: { - $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1") + $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_err_\\1") munin::plugin{ $if_errs: ensure => "if_err_"; } -- cgit v1.2.3 From 87b7e02eaa1ee305d1ea2192873446ba479546b5 Mon Sep 17 00:00:00 2001 From: Matthias Imsand Date: Tue, 2 Feb 2010 11:29:09 +0100 Subject: replaced legace gsub method --- manifests/plugins/interfaces.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugins') diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index 0062678..35ef648 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -1,6 +1,7 @@ # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { + # replaced gsub with regsubst $ifs = regsubst(split($interfaces, " |,"), "(.+)", "if_\\1") munin::plugin { $ifs: ensure => "if_"; -- cgit v1.2.3 From 015b7262e4b0bedad9500e982350197160a4ad1d Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Tue, 21 Sep 2010 17:25:49 +0200 Subject: refactor module to the new standard --- manifests/plugins/base.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp index 1bfed48..80a957e 100644 --- a/manifests/plugins/base.pp +++ b/manifests/plugins/base.pp @@ -1,7 +1,7 @@ class munin::plugins::base { file { [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: - source => "puppet://$server/common/empty", + source => "puppet:///modules/common/empty", ignore => [ '\.ignore', 'snmp_*' ], ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, -- cgit v1.2.3 From 5049ee5adee3642bf1ccae40ade1c79e6e301832 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 15 Jul 2011 17:40:31 +0200 Subject: it is not anymore necessary to add an empty source to purge directories --- manifests/plugins/setup.pp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/setup.pp b/manifests/plugins/setup.pp index c2c5ed3..c88f9e0 100644 --- a/manifests/plugins/setup.pp +++ b/manifests/plugins/setup.pp @@ -1,8 +1,7 @@ class munin::plugins::setup { file { [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: - source => "puppet:///modules/common/empty", - ignore => [ '.ignore', 'snmp_*' ], + ignore => 'snmp_*', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From eb953716cd545f86972e85d983b5862c194f5aed Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 22 Jul 2011 13:04:38 +0200 Subject: fix typo --- manifests/plugins/apache.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/apache.pp b/manifests/plugins/apache.pp index b3e7634..dca3cea 100644 --- a/manifests/plugins/apache.pp +++ b/manifests/plugins/apache.pp @@ -1,4 +1,4 @@ class munin::plugins::apache { - munin::plugin{ [ 'apache_accesses', 'apache_processes',' apache_volume' ]: } - munin::plugin::deploy { "apache_activity": } + munin::plugin{ [ 'apache_accesses', 'apache_processes', 'apache_volume' ]: } + munin::plugin::deploy { 'apache_activity': } } -- cgit v1.2.3 From e2dfae5852ecdf3695a6af8ec48092ea24698390 Mon Sep 17 00:00:00 2001 From: "Christian G. Warden" Date: Thu, 2 Feb 2012 18:10:14 -0800 Subject: Fully qualify facter variables --- manifests/plugins/base.pp | 2 +- manifests/plugins/interfaces.pp | 2 +- manifests/plugins/physical.pp | 2 +- manifests/plugins/setup.pp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp index 007579c..972a674 100644 --- a/manifests/plugins/base.pp +++ b/manifests/plugins/base.pp @@ -7,7 +7,7 @@ class munin::plugins::base { } include munin::plugins::interfaces - case $kernel { + case $::kernel { openbsd: { include munin::plugins::openbsd } linux: { case $vserver { diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index 18a713b..b2c448b 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -5,7 +5,7 @@ class munin::plugins::interfaces { munin::plugin { $ifs: ensure => "if_"; } - case $operatingsystem { + case $::operatingsystem { openbsd: { $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1") munin::plugin{ 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/setup.pp b/manifests/plugins/setup.pp index c88f9e0..caf2e28 100644 --- a/manifests/plugins/setup.pp +++ b/manifests/plugins/setup.pp @@ -11,7 +11,7 @@ class munin::plugins::setup { mode => 0644, owner => root, group => 0, notify => Service['munin-node'], } - case $kernel { + case $::kernel { openbsd: { File['/etc/munin/plugin-conf.d/munin-node']{ before => File['/var/run/munin'], -- cgit v1.2.3 From 9fd1de5acd9064a0d67ca9d2c13a829a3f628f39 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 19:39:49 -0300 Subject: new style for 2.7 --- manifests/plugins/base.pp | 2 +- manifests/plugins/gentoo.pp | 6 +++--- manifests/plugins/interfaces.pp | 6 +++--- manifests/plugins/linux.pp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp index 972a674..d26aaeb 100644 --- a/manifests/plugins/base.pp +++ b/manifests/plugins/base.pp @@ -17,7 +17,7 @@ class munin::plugins::base { } } - case $virtual { + case $::virtual { physical: { include munin::plugins::physical } xen0: { include munin::plugins::dom0 } } 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 b2c448b..cc79259 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -1,19 +1,19 @@ # handle if_ and if_err_ plugins class munin::plugins::interfaces { - $ifs = regsubst(split($interfaces, " |,"), "(.+)", "if_\\1") + $ifs = regsubst(split($::interfaces, " |,"), "(.+)", "if_\\1") munin::plugin { $ifs: ensure => "if_"; } case $::operatingsystem { openbsd: { - $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1") + $if_errs = regsubst(split($::interfaces, " |,"), "(.+)", "if_errcoll_\\1") munin::plugin{ $if_errs: ensure => "if_errcoll_"; } } default: { - $if_errs = regsubst(split($interfaces, " |,"), "(.+)", "if_err_\\1") + $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 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; } } -- cgit v1.2.3 From b4a30b6255ca495b98803317ad691fa1a26a4987 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 10 Jun 2012 19:25:32 -0300 Subject: config for df --- manifests/plugins/base.pp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'manifests/plugins') diff --git a/manifests/plugins/base.pp b/manifests/plugins/base.pp index d26aaeb..c6b88ed 100644 --- a/manifests/plugins/base.pp +++ b/manifests/plugins/base.pp @@ -5,6 +5,11 @@ class munin::plugins::base { 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 { -- cgit v1.2.3 From 405cd4fcc4639e4c9f204bcebf852aeaf6a1b129 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 12 Sep 2012 13:04:33 +0200 Subject: add kvm plugins --- manifests/plugins/kvm.pp | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 manifests/plugins/kvm.pp (limited to 'manifests/plugins') 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'; + } +} -- cgit v1.2.3 From d43c6ae0fcf45411524d093d21f5cb5c01f7c830 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 27 Nov 2012 15:43:21 +0100 Subject: there are now official selinux plugins --- manifests/plugins/selinux.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugins') 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' ]: } } -- cgit v1.2.3 From adbfc508abf5bda607795f7bf02f9581e78b17a5 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 27 Nov 2012 21:54:19 +0100 Subject: filter out many of the useless interfaces that show up --- manifests/plugins/interfaces.pp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index cc79259..33fef33 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -1,21 +1,23 @@ # handle if_ and if_err_ plugins -class munin::plugins::interfaces { +class munin::plugins::interfaces { + + # filter out many of the useless interfaces that show up + $ifs = regsubst(reject(split($::interfaces, ' |,'), 'eth\d+:\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+'), '(.+)', 'if_\\1') - $ifs = regsubst(split($::interfaces, " |,"), "(.+)", "if_\\1") munin::plugin { - $ifs: ensure => "if_"; + $ifs: ensure => 'if_'; } case $::operatingsystem { openbsd: { - $if_errs = regsubst(split($::interfaces, " |,"), "(.+)", "if_errcoll_\\1") + $if_errs = regsubst(split($::interfaces, ' |,'), '(.+)', '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(split($::interfaces, ' |,'), '(.+)', 'if_err_\\1') munin::plugin{ - $if_errs: ensure => "if_err_"; + $if_errs: ensure => 'if_err_'; } } } -- cgit v1.2.3 From bc23eb26287c343358a6bfbb9a776a67db39d02e Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 27 Nov 2012 22:08:14 +0100 Subject: improve regexp --- manifests/plugins/interfaces.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index 33fef33..7e9819c 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -2,20 +2,21 @@ class munin::plugins::interfaces { # filter out many of the useless interfaces that show up - $ifs = regsubst(reject(split($::interfaces, ' |,'), 'eth\d+:\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+'), '(.+)', 'if_\\1') + $real_ifs = reject(split($::interfaces, ' |,'), 'eth\d+:\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+') + $ifs = regsubst($real_ifs, '(.+)', "if_\\1") munin::plugin { $ifs: ensure => 'if_'; } 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_'; } } default: { - $if_errs = regsubst(split($::interfaces, ' |,'), '(.+)', 'if_err_\\1') + $if_errs = regsubst($real_ifs, '(.+)', "if_err_\\1") munin::plugin{ $if_errs: ensure => 'if_err_'; } -- cgit v1.2.3 From 005c89cfbd924e204e87a11248b0efe42d5cc8d6 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 27 Nov 2012 23:36:25 +0100 Subject: exclude more weird interfaces --- manifests/plugins/interfaces.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index 7e9819c..a7e8ce6 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -2,7 +2,7 @@ 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+') + $real_ifs = reject(split($::interfaces, ' |,'), 'eth\d+:\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+|__temp\d+') $ifs = regsubst($real_ifs, '(.+)', "if_\\1") munin::plugin { -- cgit v1.2.3 From 6a440c04ee381ff184a7b7c9f3a98ca61337df92 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 29 Nov 2012 00:24:20 +0100 Subject: filter correct unwanted interfaces --- manifests/plugins/interfaces.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index a7e8ce6..da89ed0 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -2,7 +2,7 @@ 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+|__temp\d+') + $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") munin::plugin { -- cgit v1.2.3 From 630f4d609e1e58a74abb04963ce68c9fc4bab4a1 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 6 Dec 2012 22:11:10 +0100 Subject: replace xen-cpu plugin with a better plugin --- manifests/plugins/dom0.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugins') 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'; } -- cgit v1.2.3 From 68a4cb4ae4dc5aeeece00a1e40e41edcda82a8ff Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 28 Feb 2013 20:29:55 +0100 Subject: move this to the apache module --- manifests/plugins/apache.pp | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 manifests/plugins/apache.pp (limited to 'manifests/plugins') diff --git a/manifests/plugins/apache.pp b/manifests/plugins/apache.pp deleted file mode 100644 index dca3cea..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': } -} -- cgit v1.2.3 From e822d6140b1ffea7d85546062376a7e464a3cb61 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 20 Mar 2013 12:01:14 +0100 Subject: Security: plugin-config should not me world readable as it might contain passwords --- manifests/plugins/setup.pp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'manifests/plugins') diff --git a/manifests/plugins/setup.pp b/manifests/plugins/setup.pp index caf2e28..5c56099 100644 --- a/manifests/plugins/setup.pp +++ b/manifests/plugins/setup.pp @@ -1,15 +1,22 @@ 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']; + 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 { openbsd: { -- cgit v1.2.3