From f07f6a5fab8964acebb0821094597fa4a597dba2 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 30 Nov 2007 15:28:46 +0000 Subject: munin installation (+ test auf immer1-0) git-svn-id: https://svn/ipuppet/trunk/modules/munin@173 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 manifests/plugin.pp (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp new file mode 100644 index 0000000..e7e22d1 --- /dev/null +++ b/manifests/plugin.pp @@ -0,0 +1,127 @@ +# plugin.pp - configure a specific munin plugin +# Copyright (C) 2007 David Schmitt +# See LICENSE for the full license granted to you. + +define munin::plugin ( + $ensure = "present", + $script_path = "/usr/share/munin/plugins", + $config = '') +{ + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) + $plugin = "/etc/munin/plugins/$name" + $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" + case $ensure { + "absent": { + debug ( "munin_plugin: suppressing $plugin" ) + file { $plugin: ensure => absent, } + } + default: { + $plugin_src = $ensure ? { "present" => $name, default => $ensure } + debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package["munin-node"], + notify => Service["munin-node"], + } + } + } + case $config { + '': { + debug("no config for $name") + file { $plugin_conf: ensure => absent } + } + default: { + case $ensure { + absent: { + debug("removing config for $name") + file { $plugin_conf: ensure => absent } + } + default: { + debug("creating $plugin_conf") + file { $plugin_conf: + content => "[${name}]\n$config\n", + mode => 0644, owner => root, group => root, + } + } + } + } + } +} + +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 => root; + } + munin::plugin { $name: + ensure => $ensure, + config => $config, + script_path => "/var/lib/puppet/modules/munin/plugins", + } + } + } +} + +class munin::plugins::base { + + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$servername/munin/empty", + ensure => directory, checksum => mtime, + recurse => true, purge => true, force => true, + mode => 0755, owner => root, group => root, + notify => Service[munin-node]; + "/etc/munin/plugin-conf.d/munin-node": + ensure => present, + mode => 0644, owner => root, group => root, + notify => Service[munin-node]; + } + +} + +# handle if_ and if_err_ plugins +class munin::plugins::interfaces inherits munin::plugins::base { + + $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") + $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") + plugin { + $ifs: ensure => "if_"; + $if_errs: ensure => "if_err_"; + } + + +} + +class munin::plugins::linux inherits munin::plugins::base { + + plugin { + [ df_abs, forks, iostat, memory, processes, cpu, df_inode, irqstats, + netstat, open_files, swap, df, entropy, interrupts, load, open_inodes, + vmstat + ]: + ensure => present; + acpi: + ensure => $acpi_available; + } + + include munin::plugins::interfaces +} + +class munin::plugins::debian inherits munin::plugins::base { + + plugin { apt_all: ensure => present; } + +} + +class munin::plugins::vserver inherits munin::plugins::base { + + plugin { + [ netstat, processes ]: + ensure => present; + } + +} -- cgit v1.2.3 From 6f56649e8795ca0fada0ad078dab5093af5e5eed Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 30 Nov 2007 15:28:46 +0000 Subject: munin installation (+ test auf immer1-0) --- manifests/plugin.pp | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 manifests/plugin.pp (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp new file mode 100644 index 0000000..e7e22d1 --- /dev/null +++ b/manifests/plugin.pp @@ -0,0 +1,127 @@ +# plugin.pp - configure a specific munin plugin +# Copyright (C) 2007 David Schmitt +# See LICENSE for the full license granted to you. + +define munin::plugin ( + $ensure = "present", + $script_path = "/usr/share/munin/plugins", + $config = '') +{ + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) + $plugin = "/etc/munin/plugins/$name" + $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" + case $ensure { + "absent": { + debug ( "munin_plugin: suppressing $plugin" ) + file { $plugin: ensure => absent, } + } + default: { + $plugin_src = $ensure ? { "present" => $name, default => $ensure } + debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package["munin-node"], + notify => Service["munin-node"], + } + } + } + case $config { + '': { + debug("no config for $name") + file { $plugin_conf: ensure => absent } + } + default: { + case $ensure { + absent: { + debug("removing config for $name") + file { $plugin_conf: ensure => absent } + } + default: { + debug("creating $plugin_conf") + file { $plugin_conf: + content => "[${name}]\n$config\n", + mode => 0644, owner => root, group => root, + } + } + } + } + } +} + +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 => root; + } + munin::plugin { $name: + ensure => $ensure, + config => $config, + script_path => "/var/lib/puppet/modules/munin/plugins", + } + } + } +} + +class munin::plugins::base { + + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$servername/munin/empty", + ensure => directory, checksum => mtime, + recurse => true, purge => true, force => true, + mode => 0755, owner => root, group => root, + notify => Service[munin-node]; + "/etc/munin/plugin-conf.d/munin-node": + ensure => present, + mode => 0644, owner => root, group => root, + notify => Service[munin-node]; + } + +} + +# handle if_ and if_err_ plugins +class munin::plugins::interfaces inherits munin::plugins::base { + + $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") + $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") + plugin { + $ifs: ensure => "if_"; + $if_errs: ensure => "if_err_"; + } + + +} + +class munin::plugins::linux inherits munin::plugins::base { + + plugin { + [ df_abs, forks, iostat, memory, processes, cpu, df_inode, irqstats, + netstat, open_files, swap, df, entropy, interrupts, load, open_inodes, + vmstat + ]: + ensure => present; + acpi: + ensure => $acpi_available; + } + + include munin::plugins::interfaces +} + +class munin::plugins::debian inherits munin::plugins::base { + + plugin { apt_all: ensure => present; } + +} + +class munin::plugins::vserver inherits munin::plugins::base { + + plugin { + [ netstat, processes ]: + ensure => present; + } + +} -- cgit v1.2.3 From be9ce325e83e2521628a70a11b644e373c017839 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 09:08:38 +0000 Subject: added gentoo to munin module git-svn-id: https://svn/ipuppet/trunk/modules/munin@182 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e7e22d1..f07b5fa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -125,3 +125,10 @@ class munin::plugins::vserver inherits munin::plugins::base { } } + +class munin::plugins::gentoo inherits munin::plugins::base { + plugin { + [ netstat, processes ]: + ensure => present; + } +} -- cgit v1.2.3 From ce3ceb5f653f6cbd1eca2f7bc08a3103b352214f Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 09:08:38 +0000 Subject: added gentoo to munin module --- manifests/plugin.pp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e7e22d1..f07b5fa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -125,3 +125,10 @@ class munin::plugins::vserver inherits munin::plugins::base { } } + +class munin::plugins::gentoo inherits munin::plugins::base { + plugin { + [ netstat, processes ]: + ensure => present; + } +} -- cgit v1.2.3 From 83262e9f34f805fc02b6e242f6a70aa2965f9f09 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 10:12:27 +0000 Subject: nochmals das lsb problem ... + import munin (test) git-svn-id: https://svn/ipuppet/trunk/modules/munin@184 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f07b5fa..815c3c5 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -127,6 +127,7 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { + plugin { [ netstat, processes ]: ensure => present; -- cgit v1.2.3 From 92b97318a462e1152340c0dad8fadfc6d97c71ac Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 10:12:27 +0000 Subject: nochmals das lsb problem ... + import munin (test) --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f07b5fa..815c3c5 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -127,6 +127,7 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { + plugin { [ netstat, processes ]: ensure => present; -- cgit v1.2.3 From e3980c637e756fda0b8fd1e3f4522efcb270af85 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 13:34:29 +0000 Subject: error 2 mal definiertes processes git-svn-id: https://svn/ipuppet/trunk/modules/munin@185 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 815c3c5..c107f41 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -128,8 +128,4 @@ class munin::plugins::vserver inherits munin::plugins::base { class munin::plugins::gentoo inherits munin::plugins::base { - plugin { - [ netstat, processes ]: - ensure => present; - } } -- cgit v1.2.3 From bae3e1e87d1e2e73bfbaf6684ea89efa67c370d3 Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 13:34:29 +0000 Subject: error 2 mal definiertes processes --- manifests/plugin.pp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 815c3c5..c107f41 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -128,8 +128,4 @@ class munin::plugins::vserver inherits munin::plugins::base { class munin::plugins::gentoo inherits munin::plugins::base { - plugin { - [ netstat, processes ]: - ensure => present; - } } -- cgit v1.2.3 From 3f8bc12721953212d2e3b0d9142a3e45d9c80c70 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 16:51:56 +0000 Subject: munin-node only on debian/etc... git-svn-id: https://svn/ipuppet/trunk/modules/munin@186 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index c107f41..81d8ed4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -16,12 +16,16 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package["munin-node"], - notify => Service["munin-node"], + case $operatingsystem { + debian: { + $plugin_src = $ensure ? { "present" => $name, default => $ensure } + debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package["munin-node"], + notify => Service["munin-node"], + } + } } } } -- cgit v1.2.3 From 5303631ee3cb0c2ee7ddaa6c4471ccdcf886cd7e Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 16:51:56 +0000 Subject: munin-node only on debian/etc... --- manifests/plugin.pp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index c107f41..81d8ed4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -16,12 +16,16 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package["munin-node"], - notify => Service["munin-node"], + case $operatingsystem { + debian: { + $plugin_src = $ensure ? { "present" => $name, default => $ensure } + debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package["munin-node"], + notify => Service["munin-node"], + } + } } } } -- cgit v1.2.3 From 5300e9e26cfa65f0c182719b240a08f79ae76094 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 17:24:33 +0000 Subject: =?UTF-8?q?variable=20f=C3=BCr=20munin-node-service=20(einmal=20mu?= =?UTF-8?q?nin-node,=20das=20andere=20mal=20munin)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@189 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 54 ++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 81d8ed4..1420260 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -7,6 +7,15 @@ define munin::plugin ( $script_path = "/usr/share/munin/plugins", $config = '') { + case $operatingsystem { + debian: { + $munin-node-service = "munin-node"; + } + gentoo: { + $munin-node-service = "munin"; + } + } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" @@ -16,16 +25,12 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - case $operatingsystem { - debian: { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package["munin-node"], - notify => Service["munin-node"], - } - } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } + debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package[$munin-node-service], + notify => Service[$munin-node-service], } } } @@ -70,21 +75,20 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } -class munin::plugins::base { - - file { - [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$servername/munin/empty", - ensure => directory, checksum => mtime, - recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root, - notify => Service[munin-node]; - "/etc/munin/plugin-conf.d/munin-node": - ensure => present, - mode => 0644, owner => root, group => root, - notify => Service[munin-node]; - } - +class munin::plugins::base-debian { + + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$servername/munin/empty", + ensure => directory, checksum => mtime, + recurse => true, purge => true, force => true, + mode => 0755, owner => root, group => root, + notify => Service[$munin-node-service]; + "/etc/munin/plugin-conf.d/munin-node": + ensure => present, + mode => 0644, owner => root, group => root, + notify => Service[$munin-node-service]; + } } # handle if_ and if_err_ plugins -- cgit v1.2.3 From 2511215df9ef3c68b274a49cb05f1e93772d3861 Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 17:24:33 +0000 Subject: =?UTF-8?q?variable=20f=C3=BCr=20munin-node-service=20(einmal=20mu?= =?UTF-8?q?nin-node,=20das=20andere=20mal=20munin)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 54 ++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 81d8ed4..1420260 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -7,6 +7,15 @@ define munin::plugin ( $script_path = "/usr/share/munin/plugins", $config = '') { + case $operatingsystem { + debian: { + $munin-node-service = "munin-node"; + } + gentoo: { + $munin-node-service = "munin"; + } + } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" @@ -16,16 +25,12 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - case $operatingsystem { - debian: { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package["munin-node"], - notify => Service["munin-node"], - } - } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } + debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package[$munin-node-service], + notify => Service[$munin-node-service], } } } @@ -70,21 +75,20 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } -class munin::plugins::base { - - file { - [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$servername/munin/empty", - ensure => directory, checksum => mtime, - recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root, - notify => Service[munin-node]; - "/etc/munin/plugin-conf.d/munin-node": - ensure => present, - mode => 0644, owner => root, group => root, - notify => Service[munin-node]; - } - +class munin::plugins::base-debian { + + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$servername/munin/empty", + ensure => directory, checksum => mtime, + recurse => true, purge => true, force => true, + mode => 0755, owner => root, group => root, + notify => Service[$munin-node-service]; + "/etc/munin/plugin-conf.d/munin-node": + ensure => present, + mode => 0644, owner => root, group => root, + notify => Service[$munin-node-service]; + } } # handle if_ and if_err_ plugins -- cgit v1.2.3 From 26e0ec6e73487fa6ab6f0000ee19906ad27caeaf Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 17:26:28 +0000 Subject: test git-svn-id: https://svn/ipuppet/trunk/modules/munin@190 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 1420260..e7a6b2a 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,10 +9,10 @@ define munin::plugin ( { case $operatingsystem { debian: { - $munin-node-service = "munin-node"; + $munin-node-service = "$operatingsystem/munin-node"; } gentoo: { - $munin-node-service = "munin"; + $munin-node-service = "$operatingsystem/munin"; } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } -- cgit v1.2.3 From d5b769c448fa2d2c3b107c08898f43ed3f17555f Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 17:26:28 +0000 Subject: test --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 1420260..e7a6b2a 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,10 +9,10 @@ define munin::plugin ( { case $operatingsystem { debian: { - $munin-node-service = "munin-node"; + $munin-node-service = "$operatingsystem/munin-node"; } gentoo: { - $munin-node-service = "munin"; + $munin-node-service = "$operatingsystem/munin"; } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } -- cgit v1.2.3 From d362c7c3f555d620b35e0021781b6f0e894105fc Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 17:29:17 +0000 Subject: an beide orte ... git-svn-id: https://svn/ipuppet/trunk/modules/munin@191 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e7a6b2a..6a84bc6 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,14 +8,10 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { - $munin-node-service = "$operatingsystem/munin-node"; - } - gentoo: { - $munin-node-service = "$operatingsystem/munin"; - } + debian: { $munin-node-service = "munin-node"; } + gentoo: { $munin-node-service = "munin"; } } - $plugin_src = $ensure ? { "present" => $name, default => $ensure } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" @@ -77,6 +73,10 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { + case $operatingsystem { + debian: { $munin-node-service = "munin-node"; } + gentoo: { $munin-node-service = "munin"; } + } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$servername/munin/empty", -- cgit v1.2.3 From 23299fbb8ad10633d17aae964709f17cf1b5d758 Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 17:29:17 +0000 Subject: an beide orte ... --- manifests/plugin.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e7a6b2a..6a84bc6 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,14 +8,10 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { - $munin-node-service = "$operatingsystem/munin-node"; - } - gentoo: { - $munin-node-service = "$operatingsystem/munin"; - } + debian: { $munin-node-service = "munin-node"; } + gentoo: { $munin-node-service = "munin"; } } - $plugin_src = $ensure ? { "present" => $name, default => $ensure } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" @@ -77,6 +73,10 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { + case $operatingsystem { + debian: { $munin-node-service = "munin-node"; } + gentoo: { $munin-node-service = "munin"; } + } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$servername/munin/empty", -- cgit v1.2.3 From 34e693dab7cb5193cc9661c05e7e13b92814cedf Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 17:32:18 +0000 Subject: test git-svn-id: https://svn/ipuppet/trunk/modules/munin@192 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 6a84bc6..f72875b 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -74,8 +74,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { case $operatingsystem { - debian: { $munin-node-service = "munin-node"; } gentoo: { $munin-node-service = "munin"; } + debian: { $munin-node-service = "munin-node"; } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -83,11 +83,13 @@ class munin::plugins::base-debian { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root, - notify => Service[$munin-node-service]; + #notify => Service[$munin-node-service]; + notify => Service[munin]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root, - notify => Service[$munin-node-service]; + # notify => Service[$munin-node-service]; + notify => Service[munin]; } } -- cgit v1.2.3 From c1c855c88dde8d24a2de36c0cab997cb4a58011b Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 17:32:18 +0000 Subject: test --- manifests/plugin.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 6a84bc6..f72875b 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -74,8 +74,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { case $operatingsystem { - debian: { $munin-node-service = "munin-node"; } gentoo: { $munin-node-service = "munin"; } + debian: { $munin-node-service = "munin-node"; } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -83,11 +83,13 @@ class munin::plugins::base-debian { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root, - notify => Service[$munin-node-service]; + #notify => Service[$munin-node-service]; + notify => Service[munin]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root, - notify => Service[$munin-node-service]; + # notify => Service[$munin-node-service]; + notify => Service[munin]; } } -- cgit v1.2.3 From 3e232c2c8387fb5531796994d748fe1e99bac065 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 18:49:37 +0000 Subject: strange... git-svn-id: https://svn/ipuppet/trunk/modules/munin@193 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f72875b..5b1bfc3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -26,7 +26,7 @@ define munin::plugin ( file { $plugin: ensure => "$script_path/${plugin_src}", require => Package[$munin-node-service], - notify => Service[$munin-node-service], + #notify => Service[$munin-node-service], } } } @@ -82,14 +82,14 @@ class munin::plugins::base-debian { source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root, + mode => 0755, owner => root, group => root; #notify => Service[$munin-node-service]; - notify => Service[munin]; + #notify => Service[munin]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => root; # notify => Service[$munin-node-service]; - notify => Service[munin]; + # notify => Service[munin]; } } @@ -102,8 +102,6 @@ class munin::plugins::interfaces inherits munin::plugins::base { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; } - - } class munin::plugins::linux inherits munin::plugins::base { -- cgit v1.2.3 From 49cfd72187458b35bec123b0e98a203ba01cd647 Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 18:49:37 +0000 Subject: strange... --- manifests/plugin.pp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f72875b..5b1bfc3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -26,7 +26,7 @@ define munin::plugin ( file { $plugin: ensure => "$script_path/${plugin_src}", require => Package[$munin-node-service], - notify => Service[$munin-node-service], + #notify => Service[$munin-node-service], } } } @@ -82,14 +82,14 @@ class munin::plugins::base-debian { source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root, + mode => 0755, owner => root, group => root; #notify => Service[$munin-node-service]; - notify => Service[munin]; + #notify => Service[munin]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => root; # notify => Service[$munin-node-service]; - notify => Service[munin]; + # notify => Service[munin]; } } @@ -102,8 +102,6 @@ class munin::plugins::interfaces inherits munin::plugins::base { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; } - - } class munin::plugins::linux inherits munin::plugins::base { -- cgit v1.2.3 From dcdadb9a99917ab7214fcb57c64cab2047cd8fe3 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 18:55:43 +0000 Subject: war ein anderer fehler ... shit git-svn-id: https://svn/ipuppet/trunk/modules/munin@194 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5b1bfc3..e361d69 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,8 +8,8 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { $munin-node-service = "munin-node"; } - gentoo: { $munin-node-service = "munin"; } + debian: { $munin_node_service = "munin-node"; } + gentoo: { $munin-node_service = "munin"; } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -25,8 +25,8 @@ define munin::plugin ( debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: ensure => "$script_path/${plugin_src}", - require => Package[$munin-node-service], - #notify => Service[$munin-node-service], + require => Package[$munin_node_service], + notify => Service[$munin_node_service], } } } @@ -74,8 +74,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { case $operatingsystem { - gentoo: { $munin-node-service = "munin"; } - debian: { $munin-node-service = "munin-node"; } + gentoo: { $munin_node_service = "munin"; } + debian: { $munin_node_service = "munin-node"; } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -83,13 +83,11 @@ class munin::plugins::base-debian { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root; - #notify => Service[$munin-node-service]; - #notify => Service[munin]; + notify => Service[$munin_node_service]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root; - # notify => Service[$munin-node-service]; - # notify => Service[munin]; + notify => Service[$munin_node_service]; } } -- cgit v1.2.3 From e3a2c2d16260bb939d22e5a3ed022c2d8d7c615b Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 18:55:43 +0000 Subject: war ein anderer fehler ... shit --- manifests/plugin.pp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5b1bfc3..e361d69 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,8 +8,8 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { $munin-node-service = "munin-node"; } - gentoo: { $munin-node-service = "munin"; } + debian: { $munin_node_service = "munin-node"; } + gentoo: { $munin-node_service = "munin"; } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -25,8 +25,8 @@ define munin::plugin ( debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: ensure => "$script_path/${plugin_src}", - require => Package[$munin-node-service], - #notify => Service[$munin-node-service], + require => Package[$munin_node_service], + notify => Service[$munin_node_service], } } } @@ -74,8 +74,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { case $operatingsystem { - gentoo: { $munin-node-service = "munin"; } - debian: { $munin-node-service = "munin-node"; } + gentoo: { $munin_node_service = "munin"; } + debian: { $munin_node_service = "munin-node"; } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -83,13 +83,11 @@ class munin::plugins::base-debian { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root; - #notify => Service[$munin-node-service]; - #notify => Service[munin]; + notify => Service[$munin_node_service]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root; - # notify => Service[$munin-node-service]; - # notify => Service[munin]; + notify => Service[$munin_node_service]; } } -- cgit v1.2.3 From a39eec70917c79ad36101390cac03c111235a454 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 19:41:28 +0000 Subject: lokale installtion des puppetmasters, korrektur der probleme git-svn-id: https://svn/ipuppet/trunk/modules/munin@195 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e361d69..ea31b32 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,8 +8,8 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { $munin_node_service = "munin-node"; } - gentoo: { $munin-node_service = "munin"; } + debian: { $munin_node_service = "munin-node" } + gentoo: { $munin_node_service = "munin" } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -74,19 +74,19 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { case $operatingsystem { - gentoo: { $munin_node_service = "munin"; } - debian: { $munin_node_service = "munin-node"; } + gentoo: { $munin_node_service = "munin" } + debian: { $munin_node_service = "munin-node" } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => root, notify => Service[$munin_node_service]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root; + mode => 0644, owner => root, group => root, notify => Service[$munin_node_service]; } } -- cgit v1.2.3 From 93744a7414ae71b6fd987c19162c183371b85179 Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 19:41:28 +0000 Subject: lokale installtion des puppetmasters, korrektur der probleme --- manifests/plugin.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e361d69..ea31b32 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,8 +8,8 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { $munin_node_service = "munin-node"; } - gentoo: { $munin-node_service = "munin"; } + debian: { $munin_node_service = "munin-node" } + gentoo: { $munin_node_service = "munin" } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -74,19 +74,19 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base-debian { case $operatingsystem { - gentoo: { $munin_node_service = "munin"; } - debian: { $munin_node_service = "munin-node"; } + gentoo: { $munin_node_service = "munin" } + debian: { $munin_node_service = "munin-node" } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => root, notify => Service[$munin_node_service]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root; + mode => 0644, owner => root, group => root, notify => Service[$munin_node_service]; } } -- cgit v1.2.3 From fbc577ecabbd034ec615744208eb8a27859503c4 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 19:50:40 +0000 Subject: falscher name git-svn-id: https://svn/ipuppet/trunk/modules/munin@196 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ea31b32..8aee8ad 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -71,7 +71,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } -class munin::plugins::base-debian { +class munin::plugins::base { case $operatingsystem { gentoo: { $munin_node_service = "munin" } -- cgit v1.2.3 From 0f26f9a8570a510601fac4ba8fd8505a88247ffc Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 19:50:40 +0000 Subject: falscher name --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ea31b32..8aee8ad 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -71,7 +71,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } -class munin::plugins::base-debian { +class munin::plugins::base { case $operatingsystem { gentoo: { $munin_node_service = "munin" } -- cgit v1.2.3 From f69907de9be312048d2dc74e010bda410a5b3d37 Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 13:51:54 +0000 Subject: test git-svn-id: https://svn/ipuppet/trunk/modules/munin@197 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8aee8ad..40591b8 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -83,7 +83,7 @@ class munin::plugins::base { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root, - notify => Service[$munin_node_service]; + notify => Service["$munin_node_service-$operatingsystem"]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root, -- cgit v1.2.3 From 4f49518d3737375fa1015a01049531a6ae6e2be5 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 13:51:54 +0000 Subject: test --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8aee8ad..40591b8 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -83,7 +83,7 @@ class munin::plugins::base { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root, - notify => Service[$munin_node_service]; + notify => Service["$munin_node_service-$operatingsystem"]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root, -- cgit v1.2.3 From 6d7f8ca83b1f7ca06f56a012b340a7e42f37c1b1 Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 13:56:23 +0000 Subject: uebersehener error git-svn-id: https://svn/ipuppet/trunk/modules/munin@198 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 40591b8..81a17b9 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -21,7 +21,7 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } + #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: ensure => "$script_path/${plugin_src}", -- cgit v1.2.3 From 156f5f392dd5e917a251cdeaf340649ce5f91827 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 13:56:23 +0000 Subject: uebersehener error --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 40591b8..81a17b9 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -21,7 +21,7 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } + #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: ensure => "$script_path/${plugin_src}", -- cgit v1.2.3 From cbd5da982afdd44558f4f8b6fbf3e9ae45c324ae Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 14:01:12 +0000 Subject: test erfolgreich ... rueckgaengig machen.. git-svn-id: https://svn/ipuppet/trunk/modules/munin@199 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 81a17b9..8b03765 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -83,7 +83,7 @@ class munin::plugins::base { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root, - notify => Service["$munin_node_service-$operatingsystem"]; + notify => Service["$munin_node_service"]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root, -- cgit v1.2.3 From 4b3fc27af6fb2c3f1b1dee33d800bb50fa589b13 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 14:01:12 +0000 Subject: test erfolgreich ... rueckgaengig machen.. --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 81a17b9..8b03765 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -83,7 +83,7 @@ class munin::plugins::base { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => root, - notify => Service["$munin_node_service-$operatingsystem"]; + notify => Service["$munin_node_service"]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => root, -- cgit v1.2.3 From 1fe2c5e4ec21ae9d49bc24a3583b55cda8f216be Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 14:12:29 +0000 Subject: gentoo has another script path git-svn-id: https://svn/ipuppet/trunk/modules/munin@200 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8b03765..f97abf0 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,7 +9,10 @@ define munin::plugin ( { case $operatingsystem { debian: { $munin_node_service = "munin-node" } - gentoo: { $munin_node_service = "munin" } + Gentoo: { + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins", + } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) -- cgit v1.2.3 From ee8026feb3afbbacee19aaac7e71c388581d7f43 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 14:12:29 +0000 Subject: gentoo has another script path --- manifests/plugin.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8b03765..f97abf0 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,7 +9,10 @@ define munin::plugin ( { case $operatingsystem { debian: { $munin_node_service = "munin-node" } - gentoo: { $munin_node_service = "munin" } + Gentoo: { + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins", + } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) -- cgit v1.2.3 From e2b8485b231352cecc15d094a36360cf7b7f9eb4 Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 14:14:06 +0000 Subject: , fehler git-svn-id: https://svn/ipuppet/trunk/modules/munin@201 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f97abf0..2494203 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,10 +8,12 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { $munin_node_service = "munin-node" } + debian: { + $munin_node_service = "munin-node"; + } Gentoo: { - $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins", + $munin_node_service = "munin", + $script_path = "/usr/libexec/munin/plugins"; } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } -- cgit v1.2.3 From c49d4f3a6a39c42e0031e840de209d0c5d0e3e22 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 14:14:06 +0000 Subject: , fehler --- manifests/plugin.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f97abf0..2494203 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,10 +8,12 @@ define munin::plugin ( $config = '') { case $operatingsystem { - debian: { $munin_node_service = "munin-node" } + debian: { + $munin_node_service = "munin-node"; + } Gentoo: { - $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins", + $munin_node_service = "munin", + $script_path = "/usr/libexec/munin/plugins"; } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } -- cgit v1.2.3 From 8c99a8604ca0e1fe0cbb0d94317064f45d1b41ab Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 14:18:15 +0000 Subject: in case gibts keine kommas ... git-svn-id: https://svn/ipuppet/trunk/modules/munin@202 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2494203..09489dd 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,11 +9,11 @@ define munin::plugin ( { case $operatingsystem { debian: { - $munin_node_service = "munin-node"; + $munin_node_service = "munin-node" } Gentoo: { - $munin_node_service = "munin", - $script_path = "/usr/libexec/munin/plugins"; + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins" } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } -- cgit v1.2.3 From 42c5a781be940a47f60d8a25d0c8f1c2248069cd Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 14:18:15 +0000 Subject: in case gibts keine kommas ... --- manifests/plugin.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2494203..09489dd 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,11 +9,11 @@ define munin::plugin ( { case $operatingsystem { debian: { - $munin_node_service = "munin-node"; + $munin_node_service = "munin-node" } Gentoo: { - $munin_node_service = "munin", - $script_path = "/usr/libexec/munin/plugins"; + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins" } } $plugin_src = $ensure ? { "present" => $name, default => $ensure } -- cgit v1.2.3 From 98ef8807b7ade3162c4ca2e14450641a29b1b4a1 Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 14:29:03 +0000 Subject: added script path differently test.. git-svn-id: https://svn/ipuppet/trunk/modules/munin@203 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 09489dd..2b14857 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -11,7 +11,7 @@ define munin::plugin ( debian: { $munin_node_service = "munin-node" } - Gentoo: { + gentoo: { $munin_node_service = "munin" $script_path = "/usr/libexec/munin/plugins" } -- cgit v1.2.3 From e6d50c7d3eb1795ae1e285985f0799549095d520 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 14:29:03 +0000 Subject: added script path differently test.. --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 09489dd..2b14857 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -11,7 +11,7 @@ define munin::plugin ( debian: { $munin_node_service = "munin-node" } - Gentoo: { + gentoo: { $munin_node_service = "munin" $script_path = "/usr/libexec/munin/plugins" } -- cgit v1.2.3 From 748e8d68a5f1624f9f41bfd870476fcf4e51d6dc Mon Sep 17 00:00:00 2001 From: am Date: Wed, 5 Dec 2007 14:38:01 +0000 Subject: script path correction git-svn-id: https://svn/ipuppet/trunk/modules/munin@204 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2b14857..b9a1456 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,20 +4,24 @@ define munin::plugin ( $ensure = "present", - $script_path = "/usr/share/munin/plugins", + $script_path, $config = '') { + $script_path_default = "/usr/share/munin/plugins" case $operatingsystem { debian: { $munin_node_service = "munin-node" + $script_path_default = "/usr/share/munin/plugins" } gentoo: { $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins" + $script_path_default = "/usr/libexec/munin/plugins" } } + $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path_correct" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -29,7 +33,7 @@ define munin::plugin ( #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: - ensure => "$script_path/${plugin_src}", + ensure => "$script_path_correct/${plugin_src}", require => Package[$munin_node_service], notify => Service[$munin_node_service], } -- cgit v1.2.3 From 4d6bc8018c0edb91964ecd6f7fd1bfc713f9a646 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 5 Dec 2007 14:38:01 +0000 Subject: script path correction --- manifests/plugin.pp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2b14857..b9a1456 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,20 +4,24 @@ define munin::plugin ( $ensure = "present", - $script_path = "/usr/share/munin/plugins", + $script_path, $config = '') { + $script_path_default = "/usr/share/munin/plugins" case $operatingsystem { debian: { $munin_node_service = "munin-node" + $script_path_default = "/usr/share/munin/plugins" } gentoo: { $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins" + $script_path_default = "/usr/libexec/munin/plugins" } } + $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path_correct" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -29,7 +33,7 @@ define munin::plugin ( #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: - ensure => "$script_path/${plugin_src}", + ensure => "$script_path_correct/${plugin_src}", require => Package[$munin_node_service], notify => Service[$munin_node_service], } -- cgit v1.2.3 From 58c7e6d506030bc3dcdaf4e4aaaf931c7b40a341 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 6 Dec 2007 09:03:57 +0000 Subject: * lsb_ ... immer noch unzufrieden * script path test git-svn-id: https://svn/ipuppet/trunk/modules/munin@206 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b9a1456..7a6e6af 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,7 +4,7 @@ define munin::plugin ( $ensure = "present", - $script_path, + $script_path = '', $config = '') { $script_path_default = "/usr/share/munin/plugins" -- cgit v1.2.3 From 85a0fbe78632307e3ca580d4477a02973fc40752 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 6 Dec 2007 09:03:57 +0000 Subject: * lsb_ ... immer noch unzufrieden * script path test --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b9a1456..7a6e6af 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,7 +4,7 @@ define munin::plugin ( $ensure = "present", - $script_path, + $script_path = '', $config = '') { $script_path_default = "/usr/share/munin/plugins" -- cgit v1.2.3 From 01caf8e855c93161bef56ab1da3455bf936dc7b1 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 6 Dec 2007 09:14:08 +0000 Subject: cannot reassign ... correction git-svn-id: https://svn/ipuppet/trunk/modules/munin@207 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 7a6e6af..f35bf8f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -7,7 +7,7 @@ define munin::plugin ( $script_path = '', $config = '') { - $script_path_default = "/usr/share/munin/plugins" + #$script_path_default = "/usr/share/munin/plugins" case $operatingsystem { debian: { $munin_node_service = "munin-node" @@ -17,6 +17,10 @@ define munin::plugin ( $munin_node_service = "munin" $script_path_default = "/usr/libexec/munin/plugins" } + default: { + $munin_node_service = "munin" + $script_path_default = "/usr/libexec/munin/plugins" + } } $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path } -- cgit v1.2.3 From 515b8d2ad32199cf622ef761a3c5759b7e064e93 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 6 Dec 2007 09:14:08 +0000 Subject: cannot reassign ... correction --- manifests/plugin.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 7a6e6af..f35bf8f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -7,7 +7,7 @@ define munin::plugin ( $script_path = '', $config = '') { - $script_path_default = "/usr/share/munin/plugins" + #$script_path_default = "/usr/share/munin/plugins" case $operatingsystem { debian: { $munin_node_service = "munin-node" @@ -17,6 +17,10 @@ define munin::plugin ( $munin_node_service = "munin" $script_path_default = "/usr/libexec/munin/plugins" } + default: { + $munin_node_service = "munin" + $script_path_default = "/usr/libexec/munin/plugins" + } } $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path } -- cgit v1.2.3 From ab7b943e792cbea075c10c118c81144ebb21b5f4 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 6 Dec 2007 09:53:51 +0000 Subject: strange, warum setzt er die variable nicht ... git-svn-id: https://svn/ipuppet/trunk/modules/munin@208 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f35bf8f..de8f0a3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -22,7 +22,7 @@ define munin::plugin ( $script_path_default = "/usr/libexec/munin/plugins" } } - $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path } + $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path_correct" ) -- cgit v1.2.3 From 7f0ef5985e7803878b2ef37193215d88685cf276 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 6 Dec 2007 09:53:51 +0000 Subject: strange, warum setzt er die variable nicht ... --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f35bf8f..de8f0a3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -22,7 +22,7 @@ define munin::plugin ( $script_path_default = "/usr/libexec/munin/plugins" } } - $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path } + $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path_correct" ) -- cgit v1.2.3 From fa3b0c563327deb29405eeacdf6ba7dd14d01869 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 6 Dec 2007 10:07:42 +0000 Subject: haette ich schon lange an nen anderen ort tun sollen ... korrektur Service bei gentoo heisst munin-node git-svn-id: https://svn/ipuppet/trunk/modules/munin@209 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index de8f0a3..724e9a4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,28 +4,30 @@ define munin::plugin ( $ensure = "present", - $script_path = '', + $script_path = $script_path_default, $config = '') { - #$script_path_default = "/usr/share/munin/plugins" case $operatingsystem { debian: { $munin_node_service = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $munin_node_package = "munin-node" + #$script_path_default = "/usr/share/munin/plugins" } gentoo: { - $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" + $munin_node_service = "munin-node" + $munin_node_package = "munin" + #$script_path_default = "/usr/libexec/munin/plugins" } default: { - $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" + $munin_node_service = "munin-node" + $munin_node_package = "munin" + #$script_path_default = "/usr/libexec/munin/plugins" } } - $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } + #$script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path_correct" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -37,8 +39,8 @@ define munin::plugin ( #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: - ensure => "$script_path_correct/${plugin_src}", - require => Package[$munin_node_service], + ensure => "$script_path/${plugin_src}", + require => Package[$munin_node_package], notify => Service[$munin_node_service], } } @@ -87,8 +89,14 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base { case $operatingsystem { - gentoo: { $munin_node_service = "munin" } - debian: { $munin_node_service = "munin-node" } + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin-node" + } + debian: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: -- cgit v1.2.3 From 027c0f237fa355500d2430b8bf49561998c0aaa1 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 6 Dec 2007 10:07:42 +0000 Subject: haette ich schon lange an nen anderen ort tun sollen ... korrektur Service bei gentoo heisst munin-node --- manifests/plugin.pp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index de8f0a3..724e9a4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,28 +4,30 @@ define munin::plugin ( $ensure = "present", - $script_path = '', + $script_path = $script_path_default, $config = '') { - #$script_path_default = "/usr/share/munin/plugins" case $operatingsystem { debian: { $munin_node_service = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $munin_node_package = "munin-node" + #$script_path_default = "/usr/share/munin/plugins" } gentoo: { - $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" + $munin_node_service = "munin-node" + $munin_node_package = "munin" + #$script_path_default = "/usr/libexec/munin/plugins" } default: { - $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" + $munin_node_service = "munin-node" + $munin_node_package = "munin" + #$script_path_default = "/usr/libexec/munin/plugins" } } - $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } + #$script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path_correct" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -37,8 +39,8 @@ define munin::plugin ( #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: - ensure => "$script_path_correct/${plugin_src}", - require => Package[$munin_node_service], + ensure => "$script_path/${plugin_src}", + require => Package[$munin_node_package], notify => Service[$munin_node_service], } } @@ -87,8 +89,14 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { class munin::plugins::base { case $operatingsystem { - gentoo: { $munin_node_service = "munin" } - debian: { $munin_node_service = "munin-node" } + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin-node" + } + debian: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: -- cgit v1.2.3 From bf7c4c00e8ba853c217a4cd6cea39a44d6f231c3 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 7 Dec 2007 08:47:20 +0000 Subject: * Could not retrieve dependency 'Service[munin-node]' at /var/lib/puppet/modules/munin/manifests/plugin.pp:45 git-svn-id: https://svn/ipuppet/trunk/modules/munin@211 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 724e9a4..2ae20d2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -14,12 +14,13 @@ define munin::plugin ( #$script_path_default = "/usr/share/munin/plugins" } gentoo: { - $munin_node_service = "munin-node" + #$munin_node_service = "munin-node" + $munin_node_service = "munin" $munin_node_package = "munin" #$script_path_default = "/usr/libexec/munin/plugins" } default: { - $munin_node_service = "munin-node" + $munin_node_service = "munin" $munin_node_package = "munin" #$script_path_default = "/usr/libexec/munin/plugins" } @@ -91,7 +92,7 @@ class munin::plugins::base { case $operatingsystem { gentoo: { $munin_node_package = "munin" - $munin_node_service = "munin-node" + $munin_node_service = "munin" } debian: { $munin_node_service = "munin-node" -- cgit v1.2.3 From c9b142e7c171b6823d017d7c801b11d9076ce4f1 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 7 Dec 2007 08:47:20 +0000 Subject: * Could not retrieve dependency 'Service[munin-node]' at /var/lib/puppet/modules/munin/manifests/plugin.pp:45 --- manifests/plugin.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 724e9a4..2ae20d2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -14,12 +14,13 @@ define munin::plugin ( #$script_path_default = "/usr/share/munin/plugins" } gentoo: { - $munin_node_service = "munin-node" + #$munin_node_service = "munin-node" + $munin_node_service = "munin" $munin_node_package = "munin" #$script_path_default = "/usr/libexec/munin/plugins" } default: { - $munin_node_service = "munin-node" + $munin_node_service = "munin" $munin_node_package = "munin" #$script_path_default = "/usr/libexec/munin/plugins" } @@ -91,7 +92,7 @@ class munin::plugins::base { case $operatingsystem { gentoo: { $munin_node_package = "munin" - $munin_node_service = "munin-node" + $munin_node_service = "munin" } debian: { $munin_node_service = "munin-node" -- cgit v1.2.3 From 01273ad5699ff5791416892fb25f84b1ba227d05 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 7 Dec 2007 11:07:31 +0000 Subject: * added centos to the munin module * little corrections in shorewall-local stuff git-svn-id: https://svn/ipuppet/trunk/modules/munin@214 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2ae20d2..579e2f9 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -11,21 +11,21 @@ define munin::plugin ( debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - #$script_path_default = "/usr/share/munin/plugins" + } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" } gentoo: { #$munin_node_service = "munin-node" $munin_node_service = "munin" $munin_node_package = "munin" - #$script_path_default = "/usr/libexec/munin/plugins" } default: { - $munin_node_service = "munin" - $munin_node_package = "munin" - #$script_path_default = "/usr/libexec/munin/plugins" + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" } } - #$script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -37,7 +37,6 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: ensure => "$script_path/${plugin_src}", @@ -98,6 +97,14 @@ class munin::plugins::base { $munin_node_service = "munin-node" $munin_node_package = "munin-node" } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + } + default: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -155,5 +162,8 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { +} +class munin::plugins::centos inherits munin::plugins::base { } + -- cgit v1.2.3 From 4527d6f81e4da2ec2dcbd00ea04f6a0ba6c680c5 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 7 Dec 2007 11:07:31 +0000 Subject: * added centos to the munin module * little corrections in shorewall-local stuff --- manifests/plugin.pp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2ae20d2..579e2f9 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -11,21 +11,21 @@ define munin::plugin ( debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - #$script_path_default = "/usr/share/munin/plugins" + } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" } gentoo: { #$munin_node_service = "munin-node" $munin_node_service = "munin" $munin_node_package = "munin" - #$script_path_default = "/usr/libexec/munin/plugins" } default: { - $munin_node_service = "munin" - $munin_node_package = "munin" - #$script_path_default = "/usr/libexec/munin/plugins" + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" } } - #$script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -37,7 +37,6 @@ define munin::plugin ( file { $plugin: ensure => absent, } } default: { - #$plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: ensure => "$script_path/${plugin_src}", @@ -98,6 +97,14 @@ class munin::plugins::base { $munin_node_service = "munin-node" $munin_node_package = "munin-node" } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + } + default: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + } } file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -155,5 +162,8 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { +} +class munin::plugins::centos inherits munin::plugins::base { } + -- cgit v1.2.3 From e88e44ca8b8732abdd922562f7ed87aaa5ee860c Mon Sep 17 00:00:00 2001 From: am Date: Fri, 7 Dec 2007 12:15:55 +0000 Subject: =?UTF-8?q?f=C3=BCr=20centos=20nicht=20...=20f=C3=BCr=20den=20mome?= =?UTF-8?q?nt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@215 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 579e2f9..5649b29 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -41,7 +41,14 @@ define munin::plugin ( file { $plugin: ensure => "$script_path/${plugin_src}", require => Package[$munin_node_package], - notify => Service[$munin_node_service], + case $operatingsystem { + centos: { + # do nothing + } + default: { + notify => Service[$munin_node_service], + } + } } } } -- cgit v1.2.3 From 3d06fbf56e3f1acff944363b2e2b052fe3d4b9e5 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 7 Dec 2007 12:15:55 +0000 Subject: =?UTF-8?q?f=C3=BCr=20centos=20nicht=20...=20f=C3=BCr=20den=20mome?= =?UTF-8?q?nt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 579e2f9..5649b29 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -41,7 +41,14 @@ define munin::plugin ( file { $plugin: ensure => "$script_path/${plugin_src}", require => Package[$munin_node_package], - notify => Service[$munin_node_service], + case $operatingsystem { + centos: { + # do nothing + } + default: { + notify => Service[$munin_node_service], + } + } } } } -- cgit v1.2.3 From 6b05503cb59df561423995787a8f31b3ea75b5e8 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 7 Dec 2007 12:19:20 +0000 Subject: case durfte dort nicht stehen git-svn-id: https://svn/ipuppet/trunk/modules/munin@216 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5649b29..971f076 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -38,15 +38,18 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package[$munin_node_package], - case $operatingsystem { - centos: { - # do nothing + case $operatingsystem { + centos: { + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package[$munin_node_package]; } - default: { - notify => Service[$munin_node_service], + } + default: { + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package[$munin_node_package], + notify => Service[$munin_node_service]; } } } -- cgit v1.2.3 From 5f56be8e3cbab53f8ee71bbb7b16d6127006b049 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 7 Dec 2007 12:19:20 +0000 Subject: case durfte dort nicht stehen --- manifests/plugin.pp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5649b29..971f076 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -38,15 +38,18 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package[$munin_node_package], - case $operatingsystem { - centos: { - # do nothing + case $operatingsystem { + centos: { + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package[$munin_node_package]; } - default: { - notify => Service[$munin_node_service], + } + default: { + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package[$munin_node_package], + notify => Service[$munin_node_service]; } } } -- cgit v1.2.3 From 1b30f55f5ae7ea19d80e59672b95b63ba647de62 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 7 Dec 2007 12:27:50 +0000 Subject: =?UTF-8?q?scheint=20einigermassen=20ne=20l=C3=B6sung=20zu=20sein?= =?UTF-8?q?=20...=20ausser=20dem=20was=20er=20dann=20nicht=20macht=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@217 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 971f076..1e5a78f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -116,7 +116,21 @@ class munin::plugins::base { $munin_node_package = "munin-node" } } - file { + case $operatingsystem { + centos: { + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$servername/munin/empty", + ensure => directory, checksum => mtime, + recurse => true, purge => true, force => true, + mode => 0755, owner => root, group => root; + "/etc/munin/plugin-conf.d/munin-node": + ensure => present, + mode => 0644, owner => root, group => root; + } + } + default: { + file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, @@ -127,6 +141,7 @@ class munin::plugins::base { ensure => present, mode => 0644, owner => root, group => root, notify => Service[$munin_node_service]; + } } } -- cgit v1.2.3 From f313146495b104442d1c60333e9f7dfd326d58da Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 7 Dec 2007 12:27:50 +0000 Subject: =?UTF-8?q?scheint=20einigermassen=20ne=20l=C3=B6sung=20zu=20sein?= =?UTF-8?q?=20...=20ausser=20dem=20was=20er=20dann=20nicht=20macht=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 971f076..1e5a78f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -116,7 +116,21 @@ class munin::plugins::base { $munin_node_package = "munin-node" } } - file { + case $operatingsystem { + centos: { + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$servername/munin/empty", + ensure => directory, checksum => mtime, + recurse => true, purge => true, force => true, + mode => 0755, owner => root, group => root; + "/etc/munin/plugin-conf.d/munin-node": + ensure => present, + mode => 0644, owner => root, group => root; + } + } + default: { + file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, @@ -127,6 +141,7 @@ class munin::plugins::base { ensure => present, mode => 0644, owner => root, group => root, notify => Service[$munin_node_service]; + } } } -- cgit v1.2.3 From 907173d99e26513fd280b7e0a137afa825d855d7 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 7 Dec 2007 12:29:40 +0000 Subject: tippfehler git-svn-id: https://svn/ipuppet/trunk/modules/munin@218 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 1e5a78f..15049f2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -128,7 +128,8 @@ class munin::plugins::base { ensure => present, mode => 0644, owner => root, group => root; } - } + } + default: { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -143,6 +144,7 @@ class munin::plugins::base { notify => Service[$munin_node_service]; } } + } } # handle if_ and if_err_ plugins -- cgit v1.2.3 From cab60409102705d0f013f7a2e28d2ff75b0a29dd Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 7 Dec 2007 12:29:40 +0000 Subject: tippfehler --- manifests/plugin.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 1e5a78f..15049f2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -128,7 +128,8 @@ class munin::plugins::base { ensure => present, mode => 0644, owner => root, group => root; } - } + } + default: { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: @@ -143,6 +144,7 @@ class munin::plugins::base { notify => Service[$munin_node_service]; } } + } } # handle if_ and if_err_ plugins -- cgit v1.2.3 From aad7d1cb8c499af0ebe5f8a1ab0c55b9017b7ea2 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 2 Jan 2008 20:16:12 +0000 Subject: fixed group stuff git-svn-id: https://svn/ipuppet/trunk/modules/munin@350 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 15049f2..f21098e 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -70,7 +70,7 @@ define munin::plugin ( debug("creating $plugin_conf") file { $plugin_conf: content => "[${name}]\n$config\n", - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, } } } @@ -85,7 +85,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { file { "/var/lib/puppet/modules/munin/plugins/${name}": source => $source, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; } munin::plugin { $name: ensure => $ensure, @@ -123,10 +123,10 @@ class munin::plugins::base { source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root; + mode => 0644, owner => root, group => 0; } } @@ -136,11 +136,11 @@ class munin::plugins::base { source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root, + mode => 0755, owner => root, group => 0, notify => Service["$munin_node_service"]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, notify => Service[$munin_node_service]; } } -- cgit v1.2.3 From 67c51ff64235a6e4df9acdd9d7aa7c28fa547354 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 2 Jan 2008 20:16:12 +0000 Subject: fixed group stuff --- manifests/plugin.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 15049f2..f21098e 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -70,7 +70,7 @@ define munin::plugin ( debug("creating $plugin_conf") file { $plugin_conf: content => "[${name}]\n$config\n", - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, } } } @@ -85,7 +85,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { file { "/var/lib/puppet/modules/munin/plugins/${name}": source => $source, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; } munin::plugin { $name: ensure => $ensure, @@ -123,10 +123,10 @@ class munin::plugins::base { source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root; + mode => 0644, owner => root, group => 0; } } @@ -136,11 +136,11 @@ class munin::plugins::base { source => "puppet://$servername/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => root, + mode => 0755, owner => root, group => 0, notify => Service["$munin_node_service"]; "/etc/munin/plugin-conf.d/munin-node": ensure => present, - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, notify => Service[$munin_node_service]; } } -- cgit v1.2.3 From f637dc37d96a1715634734c5ef9d7d5ecd13a447 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 30 Jan 2008 21:37:34 +0000 Subject: rearranged some stuff git-svn-id: https://svn/ipuppet/trunk/modules/munin@607 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f21098e..f5919e1 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -145,6 +145,11 @@ class munin::plugins::base { } } } + + case $operatingsystem { + gentoo: { $script_path_default = "/usr/libexec/munin/plugins" } + default: { $script_path_default = "/usr/share/munin/plugins" } + } } # handle if_ and if_err_ plugins @@ -189,8 +194,51 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { + file { "$script_path_default/gentoo_lastupdated": + source => "puppet://$servername/munin/plugins/gentoo_lastupdated", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin{"gentoo_lastupdated": ensure => present;} } class munin::plugins::centos inherits munin::plugins::base { } +class munin::plugins::selinux inherits munin::plugins::base { + file { "$script_path_default/selinuxenforced": + source => "puppet://$servername/munin/plugins/selinuxenforced", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin{"selinuxenforced": ensure => present;} +} + +class munin::plugins::dom0 inherits munin::plugins::base { + file { + [ "$script_path_default/xen" ]: + source => "puppet://$servername/munin/plugins/xen", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/xen-cpu" ]: + source => "puppet://$servername/munin/plugins/xen-cpu", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/xen_memory" ]: + source => "puppet://$servername/munin/plugins/xen_memory", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/xen_vbd" ]: + source => "puppet://$servername/munin/plugins/xen_vbd", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin { + [ xen, xen-cpu, xen_memory, xen_vbd ]: + ensure => present; + } +} + -- cgit v1.2.3 From 9082862f719e3fe9eac5192114893e4281a6d1fb Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 30 Jan 2008 21:37:34 +0000 Subject: rearranged some stuff --- manifests/plugin.pp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f21098e..f5919e1 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -145,6 +145,11 @@ class munin::plugins::base { } } } + + case $operatingsystem { + gentoo: { $script_path_default = "/usr/libexec/munin/plugins" } + default: { $script_path_default = "/usr/share/munin/plugins" } + } } # handle if_ and if_err_ plugins @@ -189,8 +194,51 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { + file { "$script_path_default/gentoo_lastupdated": + source => "puppet://$servername/munin/plugins/gentoo_lastupdated", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin{"gentoo_lastupdated": ensure => present;} } class munin::plugins::centos inherits munin::plugins::base { } +class munin::plugins::selinux inherits munin::plugins::base { + file { "$script_path_default/selinuxenforced": + source => "puppet://$servername/munin/plugins/selinuxenforced", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin{"selinuxenforced": ensure => present;} +} + +class munin::plugins::dom0 inherits munin::plugins::base { + file { + [ "$script_path_default/xen" ]: + source => "puppet://$servername/munin/plugins/xen", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/xen-cpu" ]: + source => "puppet://$servername/munin/plugins/xen-cpu", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/xen_memory" ]: + source => "puppet://$servername/munin/plugins/xen_memory", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/xen_vbd" ]: + source => "puppet://$servername/munin/plugins/xen_vbd", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin { + [ xen, xen-cpu, xen_memory, xen_vbd ]: + ensure => present; + } +} + -- cgit v1.2.3 From 62f6d972b6ca769bf7b75e78615bc0f3ffbbb081 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 16:18:21 +0000 Subject: =?UTF-8?q?tinydns=20munin=20modul=20f=C3=BCr=20immer1-4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@635 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f5919e1..b8a28aa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -242,3 +242,16 @@ class munin::plugins::dom0 inherits munin::plugins::base { } } +class munin::plugins::djbdns inherits munin::plugins::base { + file { + [ "$script_path_default/tinydns" ]: + source => "puppet://$servername/munin/plugins/tinydns", + ensure => file, + mode => 0755, owner => root, group => 0; + } + plugin { + [ tinydns ]: + ensure => present; + } +} + -- cgit v1.2.3 From 08e80baa5fa793c9f712edd7d0eb7e760a3e5e5a Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 16:18:21 +0000 Subject: =?UTF-8?q?tinydns=20munin=20modul=20f=C3=BCr=20immer1-4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f5919e1..b8a28aa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -242,3 +242,16 @@ class munin::plugins::dom0 inherits munin::plugins::base { } } +class munin::plugins::djbdns inherits munin::plugins::base { + file { + [ "$script_path_default/tinydns" ]: + source => "puppet://$servername/munin/plugins/tinydns", + ensure => file, + mode => 0755, owner => root, group => 0; + } + plugin { + [ tinydns ]: + ensure => present; + } +} + -- cgit v1.2.3 From 4bc3b1a7a481a382bd61b284b2ab3888904630bf Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 16:49:42 +0000 Subject: =?UTF-8?q?if=5Feth0=20f=C3=BCr=20domU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@639 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b8a28aa..535d76d 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -242,6 +242,10 @@ class munin::plugins::dom0 inherits munin::plugins::base { } } +class munin::plugins::domU inherits munin::plugins::base { + plugin { if_eth0: ensure => "if_" } +} + class munin::plugins::djbdns inherits munin::plugins::base { file { [ "$script_path_default/tinydns" ]: -- cgit v1.2.3 From c2c7dce070856a2ab6da93b023088ba29062e869 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 16:49:42 +0000 Subject: =?UTF-8?q?if=5Feth0=20f=C3=BCr=20domU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b8a28aa..535d76d 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -242,6 +242,10 @@ class munin::plugins::dom0 inherits munin::plugins::base { } } +class munin::plugins::domU inherits munin::plugins::base { + plugin { if_eth0: ensure => "if_" } +} + class munin::plugins::djbdns inherits munin::plugins::base { file { [ "$script_path_default/tinydns" ]: -- cgit v1.2.3 From 132098aa8fa7c6ffb7630a1005e2c734b6069c76 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 17:15:30 +0000 Subject: facter class with new name, to debug git-svn-id: https://svn/ipuppet/trunk/modules/munin@640 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 535d76d..61cf4e2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -155,8 +155,8 @@ class munin::plugins::base { # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { - $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") - $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") + $ifs = gsub(split($facterinterfaces, " "), "(.+)", "if_\\1") + $if_errs = gsub(split($facterinterfaces, " "), "(.+)", "if_err_\\1") plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; -- cgit v1.2.3 From 2363e5e52fe26ecd55a74629cfa10ce6bf95f271 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 17:15:30 +0000 Subject: facter class with new name, to debug --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 535d76d..61cf4e2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -155,8 +155,8 @@ class munin::plugins::base { # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { - $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") - $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") + $ifs = gsub(split($facterinterfaces, " "), "(.+)", "if_\\1") + $if_errs = gsub(split($facterinterfaces, " "), "(.+)", "if_err_\\1") plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; -- cgit v1.2.3 From 9e6ea5e5bb0033d7fd9647f76eaf2e206c384fb9 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 19:50:58 +0000 Subject: =?UTF-8?q?falsche=20umbenennung=20r=C3=BCckg=C3=A4ngig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@646 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 61cf4e2..535d76d 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -155,8 +155,8 @@ class munin::plugins::base { # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { - $ifs = gsub(split($facterinterfaces, " "), "(.+)", "if_\\1") - $if_errs = gsub(split($facterinterfaces, " "), "(.+)", "if_err_\\1") + $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") + $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; -- cgit v1.2.3 From b39e61aebc45a1419785c9b3d8a6e10306313a3d Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 19:50:58 +0000 Subject: =?UTF-8?q?falsche=20umbenennung=20r=C3=BCckg=C3=A4ngig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 61cf4e2..535d76d 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -155,8 +155,8 @@ class munin::plugins::base { # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { - $ifs = gsub(split($facterinterfaces, " "), "(.+)", "if_\\1") - $if_errs = gsub(split($facterinterfaces, " "), "(.+)", "if_err_\\1") + $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") + $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; -- cgit v1.2.3 From d5c7b0ba7a8f3e7bdac373f58e077fa9e4a9a26b Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 20:48:53 +0000 Subject: fixed service git-svn-id: https://svn/ipuppet/trunk/modules/munin@654 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 535d76d..69d4624 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -17,8 +17,8 @@ define munin::plugin ( $munin_node_package = "munin-node" } gentoo: { - #$munin_node_service = "munin-node" - $munin_node_service = "munin" + $munin_node_service = "munin-node" + #$munin_node_service = "munin" $munin_node_package = "munin" } default: { -- cgit v1.2.3 From 87503595260b3329b953a78f1d8f56bf3295fcb0 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 20:48:53 +0000 Subject: fixed service --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 535d76d..69d4624 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -17,8 +17,8 @@ define munin::plugin ( $munin_node_package = "munin-node" } gentoo: { - #$munin_node_service = "munin-node" - $munin_node_service = "munin" + $munin_node_service = "munin-node" + #$munin_node_service = "munin" $munin_node_package = "munin" } default: { -- cgit v1.2.3 From 91776eeb6e976f0063581dbb558f60ebfa13d63a Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 22:28:48 +0000 Subject: noch mehr auf munin stellen, nicht munin-node git-svn-id: https://svn/ipuppet/trunk/modules/munin@657 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 69d4624..535d76d 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -17,8 +17,8 @@ define munin::plugin ( $munin_node_package = "munin-node" } gentoo: { - $munin_node_service = "munin-node" - #$munin_node_service = "munin" + #$munin_node_service = "munin-node" + $munin_node_service = "munin" $munin_node_package = "munin" } default: { -- cgit v1.2.3 From 7f259713d996929155d3c8bcf7d1411eba86e0e8 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 22:28:48 +0000 Subject: noch mehr auf munin stellen, nicht munin-node --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 69d4624..535d76d 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -17,8 +17,8 @@ define munin::plugin ( $munin_node_package = "munin-node" } gentoo: { - $munin_node_service = "munin-node" - #$munin_node_service = "munin" + #$munin_node_service = "munin-node" + $munin_node_service = "munin" $munin_node_package = "munin" } default: { -- cgit v1.2.3 From bad976aee83677afeccdd9750fe791e7665fbfbd Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 11:46:02 +0000 Subject: =?UTF-8?q?neuer=20versuch=20mit=20munin=20f=C3=BCr=20immer1-5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@662 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 535d76d..df31fe2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -259,3 +259,19 @@ class munin::plugins::djbdns inherits munin::plugins::base { } } +class munin::plugins::postgres inherits munin::plugins::base { + file { + [ "$script_path_default/pg_conn" ]: + source => "puppet://$servername/munin/plugins/pg_conn", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/pg__connections" ]: + source => "puppet://$servername/munin/plugins/pg__connections", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/pg__locks" ]: + source => "puppet://$servername/munin/plugins/pg__locks", + ensure => file, + mode => 0755, owner => root, group => 0; + } +} -- cgit v1.2.3 From b4fd40ac48b7a67dd35e3a1e079c1ad38ddcb105 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 11:46:02 +0000 Subject: =?UTF-8?q?neuer=20versuch=20mit=20munin=20f=C3=BCr=20immer1-5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 535d76d..df31fe2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -259,3 +259,19 @@ class munin::plugins::djbdns inherits munin::plugins::base { } } +class munin::plugins::postgres inherits munin::plugins::base { + file { + [ "$script_path_default/pg_conn" ]: + source => "puppet://$servername/munin/plugins/pg_conn", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/pg__connections" ]: + source => "puppet://$servername/munin/plugins/pg__connections", + ensure => file, + mode => 0755, owner => root, group => 0; + [ "$script_path_default/pg__locks" ]: + source => "puppet://$servername/munin/plugins/pg__locks", + ensure => file, + mode => 0755, owner => root, group => 0; + } +} -- cgit v1.2.3 From 315495b18f4c5e1a2ced06e603a1617e5867b41a Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:15:24 +0000 Subject: munin script_path nur in plugins-gebraucht git-svn-id: https://svn/ipuppet/trunk/modules/munin@684 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index df31fe2..d9b944c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,7 +4,7 @@ define munin::plugin ( $ensure = "present", - $script_path = $script_path_default, + $script_path = '/usr/libexec/munin/plugins', $config = '') { case $operatingsystem { @@ -20,6 +20,7 @@ define munin::plugin ( #$munin_node_service = "munin-node" $munin_node_service = "munin" $munin_node_package = "munin" + $script_path = $script_path_default, } default: { $munin_node_service = "munin-node" @@ -102,18 +103,22 @@ class munin::plugins::base { gentoo: { $munin_node_package = "munin" $munin_node_service = "munin" + $script_path_default = "/usr/libexec/munin/plugins" } debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/libexec/munin/plugins" } centos: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/libexec/munin/plugins" } default: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/libexec/munin/plugins" } } case $operatingsystem { @@ -145,11 +150,6 @@ class munin::plugins::base { } } } - - case $operatingsystem { - gentoo: { $script_path_default = "/usr/libexec/munin/plugins" } - default: { $script_path_default = "/usr/share/munin/plugins" } - } } # handle if_ and if_err_ plugins -- cgit v1.2.3 From e644c426af63a4c490192ff567108f4aa8d3d628 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:15:24 +0000 Subject: munin script_path nur in plugins-gebraucht --- manifests/plugin.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index df31fe2..d9b944c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -4,7 +4,7 @@ define munin::plugin ( $ensure = "present", - $script_path = $script_path_default, + $script_path = '/usr/libexec/munin/plugins', $config = '') { case $operatingsystem { @@ -20,6 +20,7 @@ define munin::plugin ( #$munin_node_service = "munin-node" $munin_node_service = "munin" $munin_node_package = "munin" + $script_path = $script_path_default, } default: { $munin_node_service = "munin-node" @@ -102,18 +103,22 @@ class munin::plugins::base { gentoo: { $munin_node_package = "munin" $munin_node_service = "munin" + $script_path_default = "/usr/libexec/munin/plugins" } debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/libexec/munin/plugins" } centos: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/libexec/munin/plugins" } default: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/libexec/munin/plugins" } } case $operatingsystem { @@ -145,11 +150,6 @@ class munin::plugins::base { } } } - - case $operatingsystem { - gentoo: { $script_path_default = "/usr/libexec/munin/plugins" } - default: { $script_path_default = "/usr/share/munin/plugins" } - } } # handle if_ and if_err_ plugins -- cgit v1.2.3 From d28a2979f038b6b48322584a43932f66c488fb03 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:24:28 +0000 Subject: path als class inlcude git-svn-id: https://svn/ipuppet/trunk/modules/munin@685 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 59 +++++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index d9b944c..572f79b 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -2,31 +2,39 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -define munin::plugin ( - $ensure = "present", - $script_path = '/usr/libexec/munin/plugins', - $config = '') +class munin::plugin::paths { case $operatingsystem { - debian: { + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin" + $script_path_default = "/usr/libexec/munin/plugins" + } + debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - } - centos: { + $script_path_default = "/usr/share/munin/plugins" + } + centos: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - } - gentoo: { - #$munin_node_service = "munin-node" - $munin_node_service = "munin" - $munin_node_package = "munin" - $script_path = $script_path_default, - } + $script_path_default = "/usr/share/munin/plugins" + } default: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/share/munin/plugins" } } + +{ + +define munin::plugin ( + $ensure = "present", + $script_path = '/usr/libexec/munin/plugins', + $config = '') +{ + include munin::plugin::paths $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -98,29 +106,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { + include munin::plugin::paths - case $operatingsystem { - gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" - } - debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path_default = "/usr/libexec/munin/plugins" - } - centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path_default = "/usr/libexec/munin/plugins" - } - default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path_default = "/usr/libexec/munin/plugins" - } - } case $operatingsystem { centos: { file { -- cgit v1.2.3 From 0ed246de50b9da2a1623e278fd581a378e1fc0e0 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:24:28 +0000 Subject: path als class inlcude --- manifests/plugin.pp | 59 +++++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index d9b944c..572f79b 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -2,31 +2,39 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -define munin::plugin ( - $ensure = "present", - $script_path = '/usr/libexec/munin/plugins', - $config = '') +class munin::plugin::paths { case $operatingsystem { - debian: { + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin" + $script_path_default = "/usr/libexec/munin/plugins" + } + debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - } - centos: { + $script_path_default = "/usr/share/munin/plugins" + } + centos: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - } - gentoo: { - #$munin_node_service = "munin-node" - $munin_node_service = "munin" - $munin_node_package = "munin" - $script_path = $script_path_default, - } + $script_path_default = "/usr/share/munin/plugins" + } default: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" + $script_path_default = "/usr/share/munin/plugins" } } + +{ + +define munin::plugin ( + $ensure = "present", + $script_path = '/usr/libexec/munin/plugins', + $config = '') +{ + include munin::plugin::paths $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) @@ -98,29 +106,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { + include munin::plugin::paths - case $operatingsystem { - gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" - } - debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path_default = "/usr/libexec/munin/plugins" - } - centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path_default = "/usr/libexec/munin/plugins" - } - default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path_default = "/usr/libexec/munin/plugins" - } - } case $operatingsystem { centos: { file { -- cgit v1.2.3 From f866b953289eab2b50cba45411ced3b25820884c Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:28:00 +0000 Subject: script path ... git-svn-id: https://svn/ipuppet/trunk/modules/munin@686 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 572f79b..0d11c01 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,22 +8,22 @@ class munin::plugin::paths gentoo: { $munin_node_package = "munin" $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" + $script_path = "/usr/libexec/munin/plugins" } debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $script_path = "/usr/share/munin/plugins" } centos: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $script_path = "/usr/share/munin/plugins" } default: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $script_path = "/usr/share/munin/plugins" } } @@ -181,7 +181,7 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { - file { "$script_path_default/gentoo_lastupdated": + file { "$script_path/gentoo_lastupdated": source => "puppet://$servername/munin/plugins/gentoo_lastupdated", ensure => file, mode => 0755, owner => root, group => 0; @@ -194,7 +194,7 @@ class munin::plugins::centos inherits munin::plugins::base { } class munin::plugins::selinux inherits munin::plugins::base { - file { "$script_path_default/selinuxenforced": + file { "$script_path/selinuxenforced": source => "puppet://$servername/munin/plugins/selinuxenforced", ensure => file, mode => 0755, owner => root, group => 0; @@ -205,19 +205,19 @@ class munin::plugins::selinux inherits munin::plugins::base { class munin::plugins::dom0 inherits munin::plugins::base { file { - [ "$script_path_default/xen" ]: + [ "$script_path/xen" ]: source => "puppet://$servername/munin/plugins/xen", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/xen-cpu" ]: + [ "$script_path/xen-cpu" ]: source => "puppet://$servername/munin/plugins/xen-cpu", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/xen_memory" ]: + [ "$script_path/xen_memory" ]: source => "puppet://$servername/munin/plugins/xen_memory", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/xen_vbd" ]: + [ "$script_path/xen_vbd" ]: source => "puppet://$servername/munin/plugins/xen_vbd", ensure => file, mode => 0755, owner => root, group => 0; @@ -235,7 +235,7 @@ class munin::plugins::domU inherits munin::plugins::base { class munin::plugins::djbdns inherits munin::plugins::base { file { - [ "$script_path_default/tinydns" ]: + [ "$script_path/tinydns" ]: source => "puppet://$servername/munin/plugins/tinydns", ensure => file, mode => 0755, owner => root, group => 0; @@ -248,15 +248,15 @@ class munin::plugins::djbdns inherits munin::plugins::base { class munin::plugins::postgres inherits munin::plugins::base { file { - [ "$script_path_default/pg_conn" ]: + [ "$script_path/pg_conn" ]: source => "puppet://$servername/munin/plugins/pg_conn", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/pg__connections" ]: + [ "$script_path/pg__connections" ]: source => "puppet://$servername/munin/plugins/pg__connections", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/pg__locks" ]: + [ "$script_path/pg__locks" ]: source => "puppet://$servername/munin/plugins/pg__locks", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From 3d6ecf7a34a91b6149710bf4eadcf06834cc2ed3 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:28:00 +0000 Subject: script path ... --- manifests/plugin.pp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 572f79b..0d11c01 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,22 +8,22 @@ class munin::plugin::paths gentoo: { $munin_node_package = "munin" $munin_node_service = "munin" - $script_path_default = "/usr/libexec/munin/plugins" + $script_path = "/usr/libexec/munin/plugins" } debian: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $script_path = "/usr/share/munin/plugins" } centos: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $script_path = "/usr/share/munin/plugins" } default: { $munin_node_service = "munin-node" $munin_node_package = "munin-node" - $script_path_default = "/usr/share/munin/plugins" + $script_path = "/usr/share/munin/plugins" } } @@ -181,7 +181,7 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { - file { "$script_path_default/gentoo_lastupdated": + file { "$script_path/gentoo_lastupdated": source => "puppet://$servername/munin/plugins/gentoo_lastupdated", ensure => file, mode => 0755, owner => root, group => 0; @@ -194,7 +194,7 @@ class munin::plugins::centos inherits munin::plugins::base { } class munin::plugins::selinux inherits munin::plugins::base { - file { "$script_path_default/selinuxenforced": + file { "$script_path/selinuxenforced": source => "puppet://$servername/munin/plugins/selinuxenforced", ensure => file, mode => 0755, owner => root, group => 0; @@ -205,19 +205,19 @@ class munin::plugins::selinux inherits munin::plugins::base { class munin::plugins::dom0 inherits munin::plugins::base { file { - [ "$script_path_default/xen" ]: + [ "$script_path/xen" ]: source => "puppet://$servername/munin/plugins/xen", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/xen-cpu" ]: + [ "$script_path/xen-cpu" ]: source => "puppet://$servername/munin/plugins/xen-cpu", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/xen_memory" ]: + [ "$script_path/xen_memory" ]: source => "puppet://$servername/munin/plugins/xen_memory", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/xen_vbd" ]: + [ "$script_path/xen_vbd" ]: source => "puppet://$servername/munin/plugins/xen_vbd", ensure => file, mode => 0755, owner => root, group => 0; @@ -235,7 +235,7 @@ class munin::plugins::domU inherits munin::plugins::base { class munin::plugins::djbdns inherits munin::plugins::base { file { - [ "$script_path_default/tinydns" ]: + [ "$script_path/tinydns" ]: source => "puppet://$servername/munin/plugins/tinydns", ensure => file, mode => 0755, owner => root, group => 0; @@ -248,15 +248,15 @@ class munin::plugins::djbdns inherits munin::plugins::base { class munin::plugins::postgres inherits munin::plugins::base { file { - [ "$script_path_default/pg_conn" ]: + [ "$script_path/pg_conn" ]: source => "puppet://$servername/munin/plugins/pg_conn", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/pg__connections" ]: + [ "$script_path/pg__connections" ]: source => "puppet://$servername/munin/plugins/pg__connections", ensure => file, mode => 0755, owner => root, group => 0; - [ "$script_path_default/pg__locks" ]: + [ "$script_path/pg__locks" ]: source => "puppet://$servername/munin/plugins/pg__locks", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From 6661f91c54049defe2aa8f4d587d34d7e7b15dee Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:35:18 +0000 Subject: script path git-svn-id: https://svn/ipuppet/trunk/modules/munin@687 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 0d11c01..2b12896 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -31,11 +31,13 @@ class munin::plugin::paths define munin::plugin ( $ensure = "present", - $script_path = '/usr/libexec/munin/plugins', + $script_path_in = '', $config = '') { include munin::plugin::paths + $script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" -- cgit v1.2.3 From d4448bd2b5ed8fdc0a967ace62c83f07210007ff Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:35:18 +0000 Subject: script path --- manifests/plugin.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 0d11c01..2b12896 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -31,11 +31,13 @@ class munin::plugin::paths define munin::plugin ( $ensure = "present", - $script_path = '/usr/libexec/munin/plugins', + $script_path_in = '', $config = '') { include munin::plugin::paths + $script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } + $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) $plugin = "/etc/munin/plugins/$name" -- cgit v1.2.3 From d2f00103d81de8d0483997b98bf879a98d9134e3 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:40:39 +0000 Subject: div git-svn-id: https://svn/ipuppet/trunk/modules/munin@688 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2b12896..b33260e 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -36,7 +36,7 @@ define munin::plugin ( { include munin::plugin::paths - $script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } + #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) -- cgit v1.2.3 From c08e63bd126694d8f8e7b2449c2d382cd3920aa4 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:40:39 +0000 Subject: div --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2b12896..b33260e 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -36,7 +36,7 @@ define munin::plugin ( { include munin::plugin::paths - $script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } + #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) -- cgit v1.2.3 From 2e59b0457541b624057f9b60eb6aa99d0d827521 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:47:52 +0000 Subject: test git-svn-id: https://svn/ipuppet/trunk/modules/munin@689 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b33260e..8869383 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -34,7 +34,28 @@ define munin::plugin ( $script_path_in = '', $config = '') { - include munin::plugin::paths + case $operatingsystem { + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins" + } + debian: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + default: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + } #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } -- cgit v1.2.3 From d9e65b358ad4dae5670b7dd366f170807d330d69 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:47:52 +0000 Subject: test --- manifests/plugin.pp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b33260e..8869383 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -34,7 +34,28 @@ define munin::plugin ( $script_path_in = '', $config = '') { - include munin::plugin::paths + case $operatingsystem { + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins" + } + debian: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + default: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + } #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } -- cgit v1.2.3 From bfea715ace59348bf12e881bdb8898333fe54ede Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:55:40 +0000 Subject: klammerfehler git-svn-id: https://svn/ipuppet/trunk/modules/munin@690 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8869383..cdfca80 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -27,7 +27,7 @@ class munin::plugin::paths } } -{ +} define munin::plugin ( $ensure = "present", -- cgit v1.2.3 From 1791c117f9bf8e4ef8842dc33523c98c678e5586 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:55:40 +0000 Subject: klammerfehler --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8869383..cdfca80 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -27,7 +27,7 @@ class munin::plugin::paths } } -{ +} define munin::plugin ( $ensure = "present", -- cgit v1.2.3 From fdd40a1954998128e024321cf3e55a900b336a68 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:58:04 +0000 Subject: =?UTF-8?q?kein=20service=20f=C3=BCr=20gentoo,=20f=C3=BCr=20den=20?= =?UTF-8?q?mom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@691 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index cdfca80..b28b918 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -71,7 +71,7 @@ define munin::plugin ( default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) case $operatingsystem { - centos: { + centos, gentoo: { file { $plugin: ensure => "$script_path/${plugin_src}", require => Package[$munin_node_package]; -- cgit v1.2.3 From 3eee1a476d408d0d7836fa10b8cd728e65a77b9d Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:58:04 +0000 Subject: =?UTF-8?q?kein=20service=20f=C3=BCr=20gentoo,=20f=C3=BCr=20den=20?= =?UTF-8?q?mom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index cdfca80..b28b918 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -71,7 +71,7 @@ define munin::plugin ( default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) case $operatingsystem { - centos: { + centos, gentoo: { file { $plugin: ensure => "$script_path/${plugin_src}", require => Package[$munin_node_package]; -- cgit v1.2.3 From 68021a7334465225066ee24958dde7675f31dcdd Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 15:59:59 +0000 Subject: path git-svn-id: https://svn/ipuppet/trunk/modules/munin@692 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b28b918..426e30f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -129,7 +129,29 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { - include munin::plugin::paths + + case $operatingsystem { + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins" + } + debian: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + default: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + } case $operatingsystem { centos: { -- cgit v1.2.3 From cb1dec1b3514162b4f761edb8068c703693c0f90 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 15:59:59 +0000 Subject: path --- manifests/plugin.pp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b28b918..426e30f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -129,7 +129,29 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { - include munin::plugin::paths + + case $operatingsystem { + gentoo: { + $munin_node_package = "munin" + $munin_node_service = "munin" + $script_path = "/usr/libexec/munin/plugins" + } + debian: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + centos: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + default: { + $munin_node_service = "munin-node" + $munin_node_package = "munin-node" + $script_path = "/usr/share/munin/plugins" + } + } case $operatingsystem { centos: { -- cgit v1.2.3 From 77ed58048b3652e5c7c15cd04f82313374b4cf61 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 16:26:17 +0000 Subject: munin entflochten ... git-svn-id: https://svn/ipuppet/trunk/modules/munin@693 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 426e30f..a66ccb8 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -2,33 +2,6 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -class munin::plugin::paths -{ - case $operatingsystem { - gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins" - } - debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - } - -} - define munin::plugin ( $ensure = "present", $script_path_in = '', -- cgit v1.2.3 From 11dc1992fcda8eba39f5362394e165d44c8b9912 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 16:26:17 +0000 Subject: munin entflochten ... --- manifests/plugin.pp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 426e30f..a66ccb8 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -2,33 +2,6 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -class munin::plugin::paths -{ - case $operatingsystem { - gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins" - } - debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - } - -} - define munin::plugin ( $ensure = "present", $script_path_in = '', -- cgit v1.2.3 From 74f2bb9154dec374abba9ff9f268155cbf00e470 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:14:33 +0000 Subject: fixed some service issues git-svn-id: https://svn/ipuppet/trunk/modules/munin@705 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index a66ccb8..8c6fa15 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -10,7 +10,7 @@ define munin::plugin ( case $operatingsystem { gentoo: { $munin_node_package = "munin" - $munin_node_service = "munin" + $munin_node_service = "munin-munin" $script_path = "/usr/libexec/munin/plugins" } debian: { -- cgit v1.2.3 From 2e67040248f020caaab383d443d245075db47fd4 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:14:33 +0000 Subject: fixed some service issues --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index a66ccb8..8c6fa15 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -10,7 +10,7 @@ define munin::plugin ( case $operatingsystem { gentoo: { $munin_node_package = "munin" - $munin_node_service = "munin" + $munin_node_service = "munin-munin" $script_path = "/usr/libexec/munin/plugins" } debian: { -- cgit v1.2.3 From 25484de8fd6c7908b21cb0fcfde08f95f9244c46 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:17:35 +0000 Subject: fixed some service issues git-svn-id: https://svn/ipuppet/trunk/modules/munin@706 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8c6fa15..bc706ab 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -10,7 +10,7 @@ define munin::plugin ( case $operatingsystem { gentoo: { $munin_node_package = "munin" - $munin_node_service = "munin-munin" + $munin_node_service = "munin-node" $script_path = "/usr/libexec/munin/plugins" } debian: { -- cgit v1.2.3 From 6656354fc298a8911d128cab1c6daac8112e5394 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:17:35 +0000 Subject: fixed some service issues --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8c6fa15..bc706ab 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -10,7 +10,7 @@ define munin::plugin ( case $operatingsystem { gentoo: { $munin_node_package = "munin" - $munin_node_service = "munin-munin" + $munin_node_service = "munin-node" $script_path = "/usr/libexec/munin/plugins" } debian: { -- cgit v1.2.3 From 47e1e2322ed93842146d251ece06856f603d5403 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Feb 2008 20:03:47 +0000 Subject: removed unneeded definition git-svn-id: https://svn/ipuppet/trunk/modules/munin@763 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index bc706ab..5fd4190 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -102,30 +102,6 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { - - case $operatingsystem { - gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins" - } - debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - } - case $operatingsystem { centos: { file { -- cgit v1.2.3 From bd54bb182afef2fd13e0159c67dcbc7375bfd577 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Feb 2008 20:03:47 +0000 Subject: removed unneeded definition --- manifests/plugin.pp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index bc706ab..5fd4190 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -102,30 +102,6 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { - - case $operatingsystem { - gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin" - $script_path = "/usr/libexec/munin/plugins" - } - debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" - $script_path = "/usr/share/munin/plugins" - } - } - case $operatingsystem { centos: { file { -- cgit v1.2.3 From 1115e76a91b398ccb45f2cd5ea2195cb3351bc22 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Feb 2008 20:31:50 +0000 Subject: fixed? munin plugin problems git-svn-id: https://svn/ipuppet/trunk/modules/munin@764 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5fd4190..97c89b2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,23 +9,15 @@ define munin::plugin ( { case $operatingsystem { gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin-node" $script_path = "/usr/libexec/munin/plugins" } debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" $script_path = "/usr/share/munin/plugins" } centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" $script_path = "/usr/share/munin/plugins" } default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" $script_path = "/usr/share/munin/plugins" } } @@ -47,14 +39,14 @@ define munin::plugin ( centos, gentoo: { file { $plugin: ensure => "$script_path/${plugin_src}", - require => Package[$munin_node_package]; + require => Package['munin-node']; } } default: { file { $plugin: ensure => "$script_path/${plugin_src}", - require => Package[$munin_node_package], - notify => Service[$munin_node_service]; + require => Package['munin-node'], + notify => Service['munin-node']; } } } @@ -123,11 +115,12 @@ class munin::plugins::base { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, - notify => Service["$munin_node_service"]; + notify => Service['munin-node']; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => 0, - notify => Service[$munin_node_service]; + notify => Service['munin-node'], + before => Package['munin-node']; } } } -- cgit v1.2.3 From 6f3d5ae95495d024f69c8ab29ca42558a796aa0c Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Feb 2008 20:31:50 +0000 Subject: fixed? munin plugin problems --- manifests/plugin.pp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5fd4190..97c89b2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,23 +9,15 @@ define munin::plugin ( { case $operatingsystem { gentoo: { - $munin_node_package = "munin" - $munin_node_service = "munin-node" $script_path = "/usr/libexec/munin/plugins" } debian: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" $script_path = "/usr/share/munin/plugins" } centos: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" $script_path = "/usr/share/munin/plugins" } default: { - $munin_node_service = "munin-node" - $munin_node_package = "munin-node" $script_path = "/usr/share/munin/plugins" } } @@ -47,14 +39,14 @@ define munin::plugin ( centos, gentoo: { file { $plugin: ensure => "$script_path/${plugin_src}", - require => Package[$munin_node_package]; + require => Package['munin-node']; } } default: { file { $plugin: ensure => "$script_path/${plugin_src}", - require => Package[$munin_node_package], - notify => Service[$munin_node_service]; + require => Package['munin-node'], + notify => Service['munin-node']; } } } @@ -123,11 +115,12 @@ class munin::plugins::base { ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, - notify => Service["$munin_node_service"]; + notify => Service['munin-node']; "/etc/munin/plugin-conf.d/munin-node": ensure => present, mode => 0644, owner => root, group => 0, - notify => Service[$munin_node_service]; + notify => Service['munin-node'], + before => Package['munin-node']; } } } -- cgit v1.2.3 From 8f58fe2d444587451c0e042574f2931a4162ee08 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 10:20:38 +0000 Subject: pfad nicht richtig def git-svn-id: https://svn/ipuppet/trunk/modules/munin@776 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 97c89b2..0363317 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -2,11 +2,7 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -define munin::plugin ( - $ensure = "present", - $script_path_in = '', - $config = '') -{ +class munin::plugin::scriptpaths { case $operatingsystem { gentoo: { $script_path = "/usr/libexec/munin/plugins" @@ -21,7 +17,16 @@ define munin::plugin ( $script_path = "/usr/share/munin/plugins" } } +} + +define munin::plugin ( + $ensure = "present", + $script_path_in = '', + $config = '') +{ + + include munin::plugin::scriptpaths #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } @@ -94,6 +99,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { + include munin::plugin::scriptpaths + case $operatingsystem { centos: { file { -- cgit v1.2.3 From f2d6994a63d6ad1fcbd9e18dd32423e34e9e1a3d Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 10:20:38 +0000 Subject: pfad nicht richtig def --- manifests/plugin.pp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 97c89b2..0363317 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -2,11 +2,7 @@ # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. -define munin::plugin ( - $ensure = "present", - $script_path_in = '', - $config = '') -{ +class munin::plugin::scriptpaths { case $operatingsystem { gentoo: { $script_path = "/usr/libexec/munin/plugins" @@ -21,7 +17,16 @@ define munin::plugin ( $script_path = "/usr/share/munin/plugins" } } +} + +define munin::plugin ( + $ensure = "present", + $script_path_in = '', + $config = '') +{ + + include munin::plugin::scriptpaths #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } @@ -94,6 +99,8 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { + include munin::plugin::scriptpaths + case $operatingsystem { centos: { file { -- cgit v1.2.3 From a883c099328cce1c9805c153cc8b7f589a203601 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 10:37:32 +0000 Subject: deploy function git-svn-id: https://svn/ipuppet/trunk/modules/munin@778 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 0363317..ae57378 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -40,20 +40,10 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - case $operatingsystem { - centos, gentoo: { - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package['munin-node']; - } - } - default: { - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package['munin-node'], - notify => Service['munin-node']; - } - } + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package['munin-node'], + notify => Service['munin-node']; } } } @@ -197,6 +187,23 @@ class munin::plugins::selinux inherits munin::plugins::base { plugin{"selinuxenforced": ensure => present;} } +define munin::plugins::deploy ($source = '') { + $real_source = $source ? { + '' => "munin/plugins/$name", + default => $source + } + include munin::plugins::scriptpaths + file { "munin_plugin_${name}: + path => "$script_path/$name", + source => "puppet://$servername/$real_source", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin{$name: ensure => present } + +} + class munin::plugins::dom0 inherits munin::plugins::base { file { [ "$script_path/xen" ]: -- cgit v1.2.3 From f13bb0f6bb9a6f067bda5d4380891c492924586f Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 10:37:32 +0000 Subject: deploy function --- manifests/plugin.pp | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 0363317..ae57378 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -40,20 +40,10 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) - case $operatingsystem { - centos, gentoo: { - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package['munin-node']; - } - } - default: { - file { $plugin: - ensure => "$script_path/${plugin_src}", - require => Package['munin-node'], - notify => Service['munin-node']; - } - } + file { $plugin: + ensure => "$script_path/${plugin_src}", + require => Package['munin-node'], + notify => Service['munin-node']; } } } @@ -197,6 +187,23 @@ class munin::plugins::selinux inherits munin::plugins::base { plugin{"selinuxenforced": ensure => present;} } +define munin::plugins::deploy ($source = '') { + $real_source = $source ? { + '' => "munin/plugins/$name", + default => $source + } + include munin::plugins::scriptpaths + file { "munin_plugin_${name}: + path => "$script_path/$name", + source => "puppet://$servername/$real_source", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + plugin{$name: ensure => present } + +} + class munin::plugins::dom0 inherits munin::plugins::base { file { [ "$script_path/xen" ]: -- cgit v1.2.3 From da9dc6cfaccebe21bef99211d7bb5b653dbda9a9 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 10:44:46 +0000 Subject: deploy aktiv git-svn-id: https://svn/ipuppet/trunk/modules/munin@779 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 64 +++++++++++------------------------------------------ 1 file changed, 13 insertions(+), 51 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ae57378..bbb3cc4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -187,7 +187,7 @@ class munin::plugins::selinux inherits munin::plugins::base { plugin{"selinuxenforced": ensure => present;} } -define munin::plugins::deploy ($source = '') { +define munin::plugins::deploy ($source = '', $enabled = 'true') { $real_source = $source ? { '' => "munin/plugins/$name", default => $source @@ -198,36 +198,18 @@ define munin::plugins::deploy ($source = '') { source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; - } - - plugin{$name: ensure => present } + } + if $enabled { + plugin{$name: ensure => present } + } } class munin::plugins::dom0 inherits munin::plugins::base { - file { - [ "$script_path/xen" ]: - source => "puppet://$servername/munin/plugins/xen", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/xen-cpu" ]: - source => "puppet://$servername/munin/plugins/xen-cpu", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/xen_memory" ]: - source => "puppet://$servername/munin/plugins/xen_memory", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/xen_vbd" ]: - source => "puppet://$servername/munin/plugins/xen_vbd", - ensure => file, - mode => 0755, owner => root, group => 0; - } - - plugin { - [ xen, xen-cpu, xen_memory, xen_vbd ]: - ensure => present; - } + munin::plugins::deploy { "xen": } + munin::plugins::deploy { "xen-cpu": } + munin::plugins::deploy { "xen_memory": } + munin::plugins::deploy { "xen_vbd": } } class munin::plugins::domU inherits munin::plugins::base { @@ -235,31 +217,11 @@ class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { - file { - [ "$script_path/tinydns" ]: - source => "puppet://$servername/munin/plugins/tinydns", - ensure => file, - mode => 0755, owner => root, group => 0; - } - plugin { - [ tinydns ]: - ensure => present; - } + munin::plugins::deploy { "tinydns": } } class munin::plugins::postgres inherits munin::plugins::base { - file { - [ "$script_path/pg_conn" ]: - source => "puppet://$servername/munin/plugins/pg_conn", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/pg__connections" ]: - source => "puppet://$servername/munin/plugins/pg__connections", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/pg__locks" ]: - source => "puppet://$servername/munin/plugins/pg__locks", - ensure => file, - mode => 0755, owner => root, group => 0; - } + munin::plugins::deploy { "pg_conn": } + munin::plugins::deploy { "pg__connections": enabled => false } + munin::plugins::deploy { "pg__locks": enabled => false } } -- cgit v1.2.3 From af825fb60b3c29f491b4e459b309de493a7ede6b Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 10:44:46 +0000 Subject: deploy aktiv --- manifests/plugin.pp | 64 +++++++++++------------------------------------------ 1 file changed, 13 insertions(+), 51 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ae57378..bbb3cc4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -187,7 +187,7 @@ class munin::plugins::selinux inherits munin::plugins::base { plugin{"selinuxenforced": ensure => present;} } -define munin::plugins::deploy ($source = '') { +define munin::plugins::deploy ($source = '', $enabled = 'true') { $real_source = $source ? { '' => "munin/plugins/$name", default => $source @@ -198,36 +198,18 @@ define munin::plugins::deploy ($source = '') { source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; - } - - plugin{$name: ensure => present } + } + if $enabled { + plugin{$name: ensure => present } + } } class munin::plugins::dom0 inherits munin::plugins::base { - file { - [ "$script_path/xen" ]: - source => "puppet://$servername/munin/plugins/xen", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/xen-cpu" ]: - source => "puppet://$servername/munin/plugins/xen-cpu", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/xen_memory" ]: - source => "puppet://$servername/munin/plugins/xen_memory", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/xen_vbd" ]: - source => "puppet://$servername/munin/plugins/xen_vbd", - ensure => file, - mode => 0755, owner => root, group => 0; - } - - plugin { - [ xen, xen-cpu, xen_memory, xen_vbd ]: - ensure => present; - } + munin::plugins::deploy { "xen": } + munin::plugins::deploy { "xen-cpu": } + munin::plugins::deploy { "xen_memory": } + munin::plugins::deploy { "xen_vbd": } } class munin::plugins::domU inherits munin::plugins::base { @@ -235,31 +217,11 @@ class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { - file { - [ "$script_path/tinydns" ]: - source => "puppet://$servername/munin/plugins/tinydns", - ensure => file, - mode => 0755, owner => root, group => 0; - } - plugin { - [ tinydns ]: - ensure => present; - } + munin::plugins::deploy { "tinydns": } } class munin::plugins::postgres inherits munin::plugins::base { - file { - [ "$script_path/pg_conn" ]: - source => "puppet://$servername/munin/plugins/pg_conn", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/pg__connections" ]: - source => "puppet://$servername/munin/plugins/pg__connections", - ensure => file, - mode => 0755, owner => root, group => 0; - [ "$script_path/pg__locks" ]: - source => "puppet://$servername/munin/plugins/pg__locks", - ensure => file, - mode => 0755, owner => root, group => 0; - } + munin::plugins::deploy { "pg_conn": } + munin::plugins::deploy { "pg__connections": enabled => false } + munin::plugins::deploy { "pg__locks": enabled => false } } -- cgit v1.2.3 From 114b676cec4908441a8cab417f4fb5801994447c Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 10:49:39 +0000 Subject: typo git-svn-id: https://svn/ipuppet/trunk/modules/munin@781 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index bbb3cc4..a939b19 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -193,8 +193,8 @@ define munin::plugins::deploy ($source = '', $enabled = 'true') { default => $source } include munin::plugins::scriptpaths - file { "munin_plugin_${name}: - path => "$script_path/$name", + file { "munin_plugin_${name}": + path => "${script_path}/${name}", source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From 413ee12b603c0af24e990495eb4ec4785b593948 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 10:49:39 +0000 Subject: typo --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index bbb3cc4..a939b19 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -193,8 +193,8 @@ define munin::plugins::deploy ($source = '', $enabled = 'true') { default => $source } include munin::plugins::scriptpaths - file { "munin_plugin_${name}: - path => "$script_path/$name", + file { "munin_plugin_${name}": + path => "${script_path}/${name}", source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From de8f419c512b5403ac5d4027a849f76e35124146 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 10:54:02 +0000 Subject: plugin(s) git-svn-id: https://svn/ipuppet/trunk/modules/munin@782 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index a939b19..a36eeaa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -187,12 +187,12 @@ class munin::plugins::selinux inherits munin::plugins::base { plugin{"selinuxenforced": ensure => present;} } -define munin::plugins::deploy ($source = '', $enabled = 'true') { +define munin::plugin::deploy ($source = '', $enabled = 'true') { $real_source = $source ? { '' => "munin/plugins/$name", default => $source } - include munin::plugins::scriptpaths + include munin::plugin::scriptpaths file { "munin_plugin_${name}": path => "${script_path}/${name}", source => "puppet://$servername/$real_source", @@ -206,10 +206,10 @@ define munin::plugins::deploy ($source = '', $enabled = 'true') { } class munin::plugins::dom0 inherits munin::plugins::base { - munin::plugins::deploy { "xen": } - munin::plugins::deploy { "xen-cpu": } - munin::plugins::deploy { "xen_memory": } - munin::plugins::deploy { "xen_vbd": } + munin::plugin::deploy { "xen": } + munin::plugin::deploy { "xen-cpu": } + munin::plugin::deploy { "xen_memory": } + munin::plugin::deploy { "xen_vbd": } } class munin::plugins::domU inherits munin::plugins::base { @@ -217,11 +217,11 @@ class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { - munin::plugins::deploy { "tinydns": } + munin::plugin::deploy { "tinydns": } } class munin::plugins::postgres inherits munin::plugins::base { - munin::plugins::deploy { "pg_conn": } - munin::plugins::deploy { "pg__connections": enabled => false } - munin::plugins::deploy { "pg__locks": enabled => false } + munin::plugin::deploy { "pg_conn": } + munin::plugin::deploy { "pg__connections": enabled => false } + munin::plugin::deploy { "pg__locks": enabled => false } } -- cgit v1.2.3 From 48b4e1e0f2005cff9a1d2a0d0236f99018827ac0 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 10:54:02 +0000 Subject: plugin(s) --- manifests/plugin.pp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index a939b19..a36eeaa 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -187,12 +187,12 @@ class munin::plugins::selinux inherits munin::plugins::base { plugin{"selinuxenforced": ensure => present;} } -define munin::plugins::deploy ($source = '', $enabled = 'true') { +define munin::plugin::deploy ($source = '', $enabled = 'true') { $real_source = $source ? { '' => "munin/plugins/$name", default => $source } - include munin::plugins::scriptpaths + include munin::plugin::scriptpaths file { "munin_plugin_${name}": path => "${script_path}/${name}", source => "puppet://$servername/$real_source", @@ -206,10 +206,10 @@ define munin::plugins::deploy ($source = '', $enabled = 'true') { } class munin::plugins::dom0 inherits munin::plugins::base { - munin::plugins::deploy { "xen": } - munin::plugins::deploy { "xen-cpu": } - munin::plugins::deploy { "xen_memory": } - munin::plugins::deploy { "xen_vbd": } + munin::plugin::deploy { "xen": } + munin::plugin::deploy { "xen-cpu": } + munin::plugin::deploy { "xen_memory": } + munin::plugin::deploy { "xen_vbd": } } class munin::plugins::domU inherits munin::plugins::base { @@ -217,11 +217,11 @@ class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { - munin::plugins::deploy { "tinydns": } + munin::plugin::deploy { "tinydns": } } class munin::plugins::postgres inherits munin::plugins::base { - munin::plugins::deploy { "pg_conn": } - munin::plugins::deploy { "pg__connections": enabled => false } - munin::plugins::deploy { "pg__locks": enabled => false } + munin::plugin::deploy { "pg_conn": } + munin::plugin::deploy { "pg__connections": enabled => false } + munin::plugin::deploy { "pg__locks": enabled => false } } -- cgit v1.2.3 From 98c15e46bb325d2f18616c5e080f94c47126b113 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 11:12:45 +0000 Subject: bla git-svn-id: https://svn/ipuppet/trunk/modules/munin@783 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index a36eeaa..c1a9cb8 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -27,10 +27,10 @@ define munin::plugin ( { include munin::plugin::scriptpaths - #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } + $real_script_path = $script_path_in ? { '' => ${munin::plugin::scriptpaths::script_path}, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=${munin::plugin::scriptpaths::script_path}" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -41,7 +41,7 @@ define munin::plugin ( default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: - ensure => "$script_path/${plugin_src}", + ensure => "${real_script_path}/${plugin_src}", require => Package['munin-node'], notify => Service['munin-node']; } @@ -82,7 +82,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { munin::plugin { $name: ensure => $ensure, config => $config, - script_path => "/var/lib/puppet/modules/munin/plugins", + script_path_in => "/var/lib/puppet/modules/munin/plugins", } } } @@ -192,9 +192,8 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } - include munin::plugin::scriptpaths file { "munin_plugin_${name}": - path => "${script_path}/${name}", + path => "${munin::plugin::scriptpaths::script_path}/${name}", source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From a871a342b8cdc7f8ee4ae2cf75f19ac34f2830d3 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 11:12:45 +0000 Subject: bla --- manifests/plugin.pp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index a36eeaa..c1a9cb8 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -27,10 +27,10 @@ define munin::plugin ( { include munin::plugin::scriptpaths - #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in } + $real_script_path = $script_path_in ? { '' => ${munin::plugin::scriptpaths::script_path}, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=${munin::plugin::scriptpaths::script_path}" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -41,7 +41,7 @@ define munin::plugin ( default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) file { $plugin: - ensure => "$script_path/${plugin_src}", + ensure => "${real_script_path}/${plugin_src}", require => Package['munin-node'], notify => Service['munin-node']; } @@ -82,7 +82,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { munin::plugin { $name: ensure => $ensure, config => $config, - script_path => "/var/lib/puppet/modules/munin/plugins", + script_path_in => "/var/lib/puppet/modules/munin/plugins", } } } @@ -192,9 +192,8 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } - include munin::plugin::scriptpaths file { "munin_plugin_${name}": - path => "${script_path}/${name}", + path => "${munin::plugin::scriptpaths::script_path}/${name}", source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From 1159cbfcb43ef81a72d7c029e8b25b75cfea4c1b Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 11:16:46 +0000 Subject: debug msgs git-svn-id: https://svn/ipuppet/trunk/modules/munin@784 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index c1a9cb8..ced6795 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -192,6 +192,7 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } + debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=${munin::plugin::scriptpaths::script_path}" ) file { "munin_plugin_${name}": path => "${munin::plugin::scriptpaths::script_path}/${name}", source => "puppet://$servername/$real_source", -- cgit v1.2.3 From 1989191e36ce15adce36a79a074193e10592e627 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 11:16:46 +0000 Subject: debug msgs --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index c1a9cb8..ced6795 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -192,6 +192,7 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } + debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=${munin::plugin::scriptpaths::script_path}" ) file { "munin_plugin_${name}": path => "${munin::plugin::scriptpaths::script_path}/${name}", source => "puppet://$servername/$real_source", -- cgit v1.2.3 From 9b983369ce90029a31a06f82b1ec59569ff66bd5 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 8 Feb 2008 11:26:08 +0000 Subject: new try git-svn-id: https://svn/ipuppet/trunk/modules/munin@785 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ced6795..5e0db81 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -26,11 +26,10 @@ define munin::plugin ( $config = '') { - include munin::plugin::scriptpaths - $real_script_path = $script_path_in ? { '' => ${munin::plugin::scriptpaths::script_path}, default => $script_path_in } + $real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=${munin::plugin::scriptpaths::script_path}" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$munin::plugin::scriptpaths::script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -89,8 +88,6 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { - include munin::plugin::scriptpaths - case $operatingsystem { centos: { file { @@ -192,9 +189,9 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } - debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=${munin::plugin::scriptpaths::script_path}" ) + debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) file { "munin_plugin_${name}": - path => "${munin::plugin::scriptpaths::script_path}/${name}", + path => "$munin::plugin::scriptpaths::script_path/${name}", source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From cb805d53d162187edd03dcb2de8bfe0122d8fafe Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 8 Feb 2008 11:26:08 +0000 Subject: new try --- manifests/plugin.pp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ced6795..5e0db81 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -26,11 +26,10 @@ define munin::plugin ( $config = '') { - include munin::plugin::scriptpaths - $real_script_path = $script_path_in ? { '' => ${munin::plugin::scriptpaths::script_path}, default => $script_path_in } + $real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=${munin::plugin::scriptpaths::script_path}" ) + debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$munin::plugin::scriptpaths::script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { @@ -89,8 +88,6 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } class munin::plugins::base { - include munin::plugin::scriptpaths - case $operatingsystem { centos: { file { @@ -192,9 +189,9 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } - debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=${munin::plugin::scriptpaths::script_path}" ) + debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) file { "munin_plugin_${name}": - path => "${munin::plugin::scriptpaths::script_path}/${name}", + path => "$munin::plugin::scriptpaths::script_path/${name}", source => "puppet://$servername/$real_source", ensure => file, mode => 0755, owner => root, group => 0; -- cgit v1.2.3 From d7db3dc055814e340bffe27592730299ce5cd198 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 11:31:56 +0000 Subject: include brauchts git-svn-id: https://svn/ipuppet/trunk/modules/munin@787 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5e0db81..dfd506f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -26,6 +26,7 @@ define munin::plugin ( $config = '') { + include munin::plugin::scriptpaths $real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } @@ -189,6 +190,7 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } + include munin::plugin::scriptpaths debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", -- cgit v1.2.3 From 147a647235d39442255f04fbcc654dc1a1b4530d Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 11:31:56 +0000 Subject: include brauchts --- manifests/plugin.pp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5e0db81..dfd506f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -26,6 +26,7 @@ define munin::plugin ( $config = '') { + include munin::plugin::scriptpaths $real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } @@ -189,6 +190,7 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { '' => "munin/plugins/$name", default => $source } + include munin::plugin::scriptpaths debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", -- cgit v1.2.3 From 55054d004c779531512da86db4c9040eaa76cf3c Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 11:38:14 +0000 Subject: restliche plugins git-svn-id: https://svn/ipuppet/trunk/modules/munin@788 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index dfd506f..0cd1cb5 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -163,26 +163,14 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { - file { "$script_path/gentoo_lastupdated": - source => "puppet://$servername/munin/plugins/gentoo_lastupdated", - ensure => file, - mode => 0755, owner => root, group => 0; - } - - plugin{"gentoo_lastupdated": ensure => present;} + munin::plugin::deploy { "gentoo_lastupdated": } } class munin::plugins::centos inherits munin::plugins::base { } class munin::plugins::selinux inherits munin::plugins::base { - file { "$script_path/selinuxenforced": - source => "puppet://$servername/munin/plugins/selinuxenforced", - ensure => file, - mode => 0755, owner => root, group => 0; - } - - plugin{"selinuxenforced": ensure => present;} + munin::plugin::deploy { "selinuxenforced": } } define munin::plugin::deploy ($source = '', $enabled = 'true') { -- cgit v1.2.3 From 0fa11c90e81828c962483d530bbdf1996f7eb1b8 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 11:38:14 +0000 Subject: restliche plugins --- manifests/plugin.pp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index dfd506f..0cd1cb5 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -163,26 +163,14 @@ class munin::plugins::vserver inherits munin::plugins::base { } class munin::plugins::gentoo inherits munin::plugins::base { - file { "$script_path/gentoo_lastupdated": - source => "puppet://$servername/munin/plugins/gentoo_lastupdated", - ensure => file, - mode => 0755, owner => root, group => 0; - } - - plugin{"gentoo_lastupdated": ensure => present;} + munin::plugin::deploy { "gentoo_lastupdated": } } class munin::plugins::centos inherits munin::plugins::base { } class munin::plugins::selinux inherits munin::plugins::base { - file { "$script_path/selinuxenforced": - source => "puppet://$servername/munin/plugins/selinuxenforced", - ensure => file, - mode => 0755, owner => root, group => 0; - } - - plugin{"selinuxenforced": ensure => present;} + munin::plugin::deploy { "selinuxenforced": } } define munin::plugin::deploy ($source = '', $enabled = 'true') { -- cgit v1.2.3 From 2ec5c3d5940384a008a3053e4f59454df7b114d4 Mon Sep 17 00:00:00 2001 From: am Date: Mon, 10 Mar 2008 13:59:07 +0000 Subject: =?UTF-8?q?*=20iostat=20nur=20f=C3=BCr=20dom0=20*=20firewall=20auf?= =?UTF-8?q?=20shorewall=20war=20deaktiviert=20..=20warum=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn/ipuppet/trunk/modules/munin@1059 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 0cd1cb5..e4702c2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -135,7 +135,7 @@ class munin::plugins::interfaces inherits munin::plugins::base { class munin::plugins::linux inherits munin::plugins::base { plugin { - [ df_abs, forks, iostat, memory, processes, cpu, df_inode, irqstats, + [ df_abs, forks, memory, processes, cpu, df_inode, irqstats, netstat, open_files, swap, df, entropy, interrupts, load, open_inodes, vmstat ]: -- cgit v1.2.3 From 8d3a49260d6dbf22346697e2b8d070c3449e7edb Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 10 Mar 2008 13:59:07 +0000 Subject: =?UTF-8?q?*=20iostat=20nur=20f=C3=BCr=20dom0=20*=20firewall=20auf?= =?UTF-8?q?=20shorewall=20war=20deaktiviert=20..=20warum=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 0cd1cb5..e4702c2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -135,7 +135,7 @@ class munin::plugins::interfaces inherits munin::plugins::base { class munin::plugins::linux inherits munin::plugins::base { plugin { - [ df_abs, forks, iostat, memory, processes, cpu, df_inode, irqstats, + [ df_abs, forks, memory, processes, cpu, df_inode, irqstats, netstat, open_files, swap, df, entropy, interrupts, load, open_inodes, vmstat ]: -- cgit v1.2.3 From 89ef873f7b1f26e670fb4abc8cadea8e87e76de0 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 21 Mar 2008 15:54:48 +0000 Subject: rearranged some munin stuff git-svn-id: https://svn/ipuppet/trunk/modules/munin@1081 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e4702c2..81bab27 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -169,10 +169,6 @@ class munin::plugins::gentoo inherits munin::plugins::base { class munin::plugins::centos inherits munin::plugins::base { } -class munin::plugins::selinux inherits munin::plugins::base { - munin::plugin::deploy { "selinuxenforced": } -} - define munin::plugin::deploy ($source = '', $enabled = 'true') { $real_source = $source ? { '' => "munin/plugins/$name", @@ -192,13 +188,17 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { } } -class munin::plugins::dom0 inherits munin::plugins::base { +class munin::plugins::dom0 inherits munin::plugins::physical { munin::plugin::deploy { "xen": } munin::plugin::deploy { "xen-cpu": } munin::plugin::deploy { "xen_memory": } munin::plugin::deploy { "xen_vbd": } } +class munin::plugins::physical inherits munin::plugins::base { + munin::plugin { iostat: } +} + class munin::plugins::domU inherits munin::plugins::base { plugin { if_eth0: ensure => "if_" } } -- cgit v1.2.3 From e3fd671690685c5ebd198c5fd643030290d142d6 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 21 Mar 2008 15:54:48 +0000 Subject: rearranged some munin stuff --- manifests/plugin.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e4702c2..81bab27 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -169,10 +169,6 @@ class munin::plugins::gentoo inherits munin::plugins::base { class munin::plugins::centos inherits munin::plugins::base { } -class munin::plugins::selinux inherits munin::plugins::base { - munin::plugin::deploy { "selinuxenforced": } -} - define munin::plugin::deploy ($source = '', $enabled = 'true') { $real_source = $source ? { '' => "munin/plugins/$name", @@ -192,13 +188,17 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { } } -class munin::plugins::dom0 inherits munin::plugins::base { +class munin::plugins::dom0 inherits munin::plugins::physical { munin::plugin::deploy { "xen": } munin::plugin::deploy { "xen-cpu": } munin::plugin::deploy { "xen_memory": } munin::plugin::deploy { "xen_vbd": } } +class munin::plugins::physical inherits munin::plugins::base { + munin::plugin { iostat: } +} + class munin::plugins::domU inherits munin::plugins::base { plugin { if_eth0: ensure => "if_" } } -- cgit v1.2.3 From 82dc3da0817f5709d6bbc96043c90db4b55b4deb Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 21 Mar 2008 15:58:48 +0000 Subject: removed unnedded definition git-svn-id: https://svn/ipuppet/trunk/modules/munin@1083 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 81bab27..ebf1cd4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -199,9 +199,7 @@ class munin::plugins::physical inherits munin::plugins::base { munin::plugin { iostat: } } -class munin::plugins::domU inherits munin::plugins::base { - plugin { if_eth0: ensure => "if_" } -} +class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { munin::plugin::deploy { "tinydns": } -- cgit v1.2.3 From b362db6a83161169145b3fac76de75b2f58c7594 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 21 Mar 2008 15:58:48 +0000 Subject: removed unnedded definition --- manifests/plugin.pp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 81bab27..ebf1cd4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -199,9 +199,7 @@ class munin::plugins::physical inherits munin::plugins::base { munin::plugin { iostat: } } -class munin::plugins::domU inherits munin::plugins::base { - plugin { if_eth0: ensure => "if_" } -} +class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { munin::plugin::deploy { "tinydns": } -- cgit v1.2.3 From bb8699288512aa2d1de7ad12b0420146f8daabfd Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 30 Mar 2008 17:34:40 +0000 Subject: added default apache modules git-svn-id: https://svn/ipuppet/trunk/modules/munin@1152 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ebf1cd4..8a76df4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -199,12 +199,24 @@ class munin::plugins::physical inherits munin::plugins::base { munin::plugin { iostat: } } +class munin::plugins::muninhost inherits munin::plugins::base { + munin::plugin { munin_update: } + munin::plugin { munin_graph: } +} + class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { munin::plugin::deploy { "tinydns": } } +class munin::plugins::apache inherits munin::plugins::base { + munin::plugin::deploy { "apache_accesses": } + munin::plugin::deploy { "apache_processes": } + munin::plugin::deploy { "apache_volume": } + munin::plugin::deploy { "apache_activity": } +} + class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": enabled => false } -- cgit v1.2.3 From d6783519aae52160c3e5448728c443e24ad7f45c Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 30 Mar 2008 17:34:40 +0000 Subject: added default apache modules --- manifests/plugin.pp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ebf1cd4..8a76df4 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -199,12 +199,24 @@ class munin::plugins::physical inherits munin::plugins::base { munin::plugin { iostat: } } +class munin::plugins::muninhost inherits munin::plugins::base { + munin::plugin { munin_update: } + munin::plugin { munin_graph: } +} + class munin::plugins::domU inherits munin::plugins::base { } class munin::plugins::djbdns inherits munin::plugins::base { munin::plugin::deploy { "tinydns": } } +class munin::plugins::apache inherits munin::plugins::base { + munin::plugin::deploy { "apache_accesses": } + munin::plugin::deploy { "apache_processes": } + munin::plugin::deploy { "apache_volume": } + munin::plugin::deploy { "apache_activity": } +} + class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": enabled => false } -- cgit v1.2.3 From 060befb2e08b5419d7cb90ad9ff80d72ef3b1889 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 30 Mar 2008 17:49:13 +0000 Subject: added selinux plugins git-svn-id: https://svn/ipuppet/trunk/modules/munin@1153 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8a76df4..39e9742 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -148,18 +148,14 @@ class munin::plugins::linux inherits munin::plugins::base { } class munin::plugins::debian inherits munin::plugins::base { - plugin { apt_all: ensure => present; } - } class munin::plugins::vserver inherits munin::plugins::base { - plugin { [ netstat, processes ]: ensure => present; } - } class munin::plugins::gentoo inherits munin::plugins::base { @@ -217,6 +213,11 @@ class munin::plugins::apache inherits munin::plugins::base { munin::plugin::deploy { "apache_activity": } } +class munin::plugins::selinux inherits munin::plugins::base { + munin::plugin::deploy { "selinuxenforced": } + munin::plugin::deploy { "selinux_avcstats": } +} + class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": enabled => false } -- cgit v1.2.3 From ead83e0c99b06c3f0f05a1e9adb587b79b817212 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 30 Mar 2008 17:49:13 +0000 Subject: added selinux plugins --- manifests/plugin.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8a76df4..39e9742 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -148,18 +148,14 @@ class munin::plugins::linux inherits munin::plugins::base { } class munin::plugins::debian inherits munin::plugins::base { - plugin { apt_all: ensure => present; } - } class munin::plugins::vserver inherits munin::plugins::base { - plugin { [ netstat, processes ]: ensure => present; } - } class munin::plugins::gentoo inherits munin::plugins::base { @@ -217,6 +213,11 @@ class munin::plugins::apache inherits munin::plugins::base { munin::plugin::deploy { "apache_activity": } } +class munin::plugins::selinux inherits munin::plugins::base { + munin::plugin::deploy { "selinuxenforced": } + munin::plugin::deploy { "selinux_avcstats": } +} + class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": enabled => false } -- cgit v1.2.3 From 13574dc22d09138b40433ff906efc2ab4895553e Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 12 Apr 2008 14:12:53 +0000 Subject: extending apache to centos usage, vhost and crypto stuff on immer8 and class to enable server-status for munin-plugins, where not yet done git-svn-id: https://svn/ipuppet/trunk/modules/munin@1212 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 39e9742..bc9f00c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -207,6 +207,7 @@ class munin::plugins::djbdns inherits munin::plugins::base { } class munin::plugins::apache inherits munin::plugins::base { + include apache::status munin::plugin::deploy { "apache_accesses": } munin::plugin::deploy { "apache_processes": } munin::plugin::deploy { "apache_volume": } -- cgit v1.2.3 From b3ec072deaadf33b19b2ddbf22b1448fdf4532fe Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 12 Apr 2008 14:12:53 +0000 Subject: extending apache to centos usage, vhost and crypto stuff on immer8 and class to enable server-status for munin-plugins, where not yet done --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 39e9742..bc9f00c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -207,6 +207,7 @@ class munin::plugins::djbdns inherits munin::plugins::base { } class munin::plugins::apache inherits munin::plugins::base { + include apache::status munin::plugin::deploy { "apache_accesses": } munin::plugin::deploy { "apache_processes": } munin::plugin::deploy { "apache_volume": } -- cgit v1.2.3 From 6ae8a3c99f66f63c51eb76fc9b3e4b49273c5b2c Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 12 Apr 2008 15:02:34 +0000 Subject: fixed uneeded deployment and directories git-svn-id: https://svn/ipuppet/trunk/modules/munin@1217 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index bc9f00c..dbf8eb1 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -208,9 +208,9 @@ class munin::plugins::djbdns inherits munin::plugins::base { class munin::plugins::apache inherits munin::plugins::base { include apache::status - munin::plugin::deploy { "apache_accesses": } - munin::plugin::deploy { "apache_processes": } - munin::plugin::deploy { "apache_volume": } + munin::plugin{ "apache_accesses": } + munin::plugin{ "apache_processes": } + munin::plugin{ "apache_volume": } munin::plugin::deploy { "apache_activity": } } -- cgit v1.2.3 From 6783f2aa339ab707f533b5c048ea2abb7a105806 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 12 Apr 2008 15:02:34 +0000 Subject: fixed uneeded deployment and directories --- manifests/plugin.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index bc9f00c..dbf8eb1 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -208,9 +208,9 @@ class munin::plugins::djbdns inherits munin::plugins::base { class munin::plugins::apache inherits munin::plugins::base { include apache::status - munin::plugin::deploy { "apache_accesses": } - munin::plugin::deploy { "apache_processes": } - munin::plugin::deploy { "apache_volume": } + munin::plugin{ "apache_accesses": } + munin::plugin{ "apache_processes": } + munin::plugin{ "apache_volume": } munin::plugin::deploy { "apache_activity": } } -- cgit v1.2.3 From 8b017ab9ff19f9a3773603fc33cc3820ec730c9e Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 18 Apr 2008 11:47:24 +0000 Subject: rearranged some definitions, fixed config issues git-svn-id: https://svn/ipuppet/trunk/modules/munin@1229 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 56 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 24 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index dbf8eb1..782f9f2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -1,6 +1,10 @@ # plugin.pp - configure a specific munin plugin # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. +# adapted and improved by admin(at)immerda.ch + + +### configpaths class munin::plugin::scriptpaths { case $operatingsystem { @@ -19,6 +23,7 @@ class munin::plugin::scriptpaths { } } +### defines define munin::plugin ( $ensure = "present", @@ -87,6 +92,26 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } } +define munin::plugin::deploy ($source = '', $enabled = 'true') { + $real_source = $source ? { + '' => "munin/plugins/$name", + default => $source + } + include munin::plugin::scriptpaths + debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) + file { "munin_plugin_${name}": + path => "$munin::plugin::scriptpaths::script_path/${name}", + source => "puppet://$servername/$real_source", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + if $enabled { + plugin{$name: ensure => present } + } +} + +### clases for plugins class munin::plugins::base { case $operatingsystem { @@ -148,47 +173,30 @@ class munin::plugins::linux inherits munin::plugins::base { } class munin::plugins::debian inherits munin::plugins::base { - plugin { apt_all: ensure => present; } + munin::plugin { apt_all: ensure => present; } } class munin::plugins::vserver inherits munin::plugins::base { - plugin { + munin::plugin { [ netstat, processes ]: ensure => present; } } class munin::plugins::gentoo inherits munin::plugins::base { - munin::plugin::deploy { "gentoo_lastupdated": } + 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::centos inherits munin::plugins::base { } -define munin::plugin::deploy ($source = '', $enabled = 'true') { - $real_source = $source ? { - '' => "munin/plugins/$name", - default => $source - } - include munin::plugin::scriptpaths - debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) - file { "munin_plugin_${name}": - path => "$munin::plugin::scriptpaths::script_path/${name}", - source => "puppet://$servername/$real_source", - ensure => file, - mode => 0755, owner => root, group => 0; - } - if $enabled { - plugin{$name: ensure => present } - } -} class munin::plugins::dom0 inherits munin::plugins::physical { - munin::plugin::deploy { "xen": } - munin::plugin::deploy { "xen-cpu": } - munin::plugin::deploy { "xen_memory": } - munin::plugin::deploy { "xen_vbd": } + 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_vbd": config => "user root"} } class munin::plugins::physical inherits munin::plugins::base { -- cgit v1.2.3 From 01ec99817ecf48a813a90de36443dc8a9fd45932 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 18 Apr 2008 11:47:24 +0000 Subject: rearranged some definitions, fixed config issues --- manifests/plugin.pp | 56 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 24 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index dbf8eb1..782f9f2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -1,6 +1,10 @@ # plugin.pp - configure a specific munin plugin # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. +# adapted and improved by admin(at)immerda.ch + + +### configpaths class munin::plugin::scriptpaths { case $operatingsystem { @@ -19,6 +23,7 @@ class munin::plugin::scriptpaths { } } +### defines define munin::plugin ( $ensure = "present", @@ -87,6 +92,26 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } } +define munin::plugin::deploy ($source = '', $enabled = 'true') { + $real_source = $source ? { + '' => "munin/plugins/$name", + default => $source + } + include munin::plugin::scriptpaths + debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) + file { "munin_plugin_${name}": + path => "$munin::plugin::scriptpaths::script_path/${name}", + source => "puppet://$servername/$real_source", + ensure => file, + mode => 0755, owner => root, group => 0; + } + + if $enabled { + plugin{$name: ensure => present } + } +} + +### clases for plugins class munin::plugins::base { case $operatingsystem { @@ -148,47 +173,30 @@ class munin::plugins::linux inherits munin::plugins::base { } class munin::plugins::debian inherits munin::plugins::base { - plugin { apt_all: ensure => present; } + munin::plugin { apt_all: ensure => present; } } class munin::plugins::vserver inherits munin::plugins::base { - plugin { + munin::plugin { [ netstat, processes ]: ensure => present; } } class munin::plugins::gentoo inherits munin::plugins::base { - munin::plugin::deploy { "gentoo_lastupdated": } + 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::centos inherits munin::plugins::base { } -define munin::plugin::deploy ($source = '', $enabled = 'true') { - $real_source = $source ? { - '' => "munin/plugins/$name", - default => $source - } - include munin::plugin::scriptpaths - debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) - file { "munin_plugin_${name}": - path => "$munin::plugin::scriptpaths::script_path/${name}", - source => "puppet://$servername/$real_source", - ensure => file, - mode => 0755, owner => root, group => 0; - } - if $enabled { - plugin{$name: ensure => present } - } -} class munin::plugins::dom0 inherits munin::plugins::physical { - munin::plugin::deploy { "xen": } - munin::plugin::deploy { "xen-cpu": } - munin::plugin::deploy { "xen_memory": } - munin::plugin::deploy { "xen_vbd": } + 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_vbd": config => "user root"} } class munin::plugins::physical inherits munin::plugins::base { -- cgit v1.2.3 From 4b66892e98b993264e396b95a641c744a95c83c3 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 18 Apr 2008 12:04:59 +0000 Subject: fixed params and made it more all the same way git-svn-id: https://svn/ipuppet/trunk/modules/munin@1231 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 782f9f2..97bcbf3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -92,7 +92,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } } -define munin::plugin::deploy ($source = '', $enabled = 'true') { +define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { $real_source = $source ? { '' => "munin/plugins/$name", default => $source @@ -106,9 +106,7 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { mode => 0755, owner => root, group => 0; } - if $enabled { - plugin{$name: ensure => present } - } + munin::plugin{$name: ensure => $ensure, config => $config } } ### clases for plugins -- cgit v1.2.3 From 74463978e6be2d3e15d30358f40bf102851f5745 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 18 Apr 2008 12:04:59 +0000 Subject: fixed params and made it more all the same way --- manifests/plugin.pp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 782f9f2..97bcbf3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -92,7 +92,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } } -define munin::plugin::deploy ($source = '', $enabled = 'true') { +define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { $real_source = $source ? { '' => "munin/plugins/$name", default => $source @@ -106,9 +106,7 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') { mode => 0755, owner => root, group => 0; } - if $enabled { - plugin{$name: ensure => present } - } + munin::plugin{$name: ensure => $ensure, config => $config } } ### clases for plugins -- cgit v1.2.3 From ebe1a5fdc83e550529fb11f6dd136bda38a0c689 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 18 Apr 2008 14:51:32 +0000 Subject: fixed renaming git-svn-id: https://svn/ipuppet/trunk/modules/munin@1236 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 97bcbf3..2b66ce2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -227,6 +227,6 @@ class munin::plugins::selinux inherits munin::plugins::base { class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } - munin::plugin::deploy { "pg__connections": enabled => false } - munin::plugin::deploy { "pg__locks": enabled => false } + munin::plugin::deploy { "pg__connections": ensure => false } + munin::plugin::deploy { "pg__locks": ensure => false } } -- cgit v1.2.3 From 3edac04b0cdb7b94c439a6224b25028651285aa5 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 18 Apr 2008 14:51:32 +0000 Subject: fixed renaming --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 97bcbf3..2b66ce2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -227,6 +227,6 @@ class munin::plugins::selinux inherits munin::plugins::base { class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } - munin::plugin::deploy { "pg__connections": enabled => false } - munin::plugin::deploy { "pg__locks": enabled => false } + munin::plugin::deploy { "pg__connections": ensure => false } + munin::plugin::deploy { "pg__locks": ensure => false } } -- cgit v1.2.3 From 4ade531347d2cfef7945f2521fb9e1ae3730098c Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 09:48:23 +0000 Subject: rearranged plugin ordering, fixed some yum stuff git-svn-id: https://svn/ipuppet/trunk/modules/munin@1247 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2b66ce2..6eaa518 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -213,7 +213,6 @@ class munin::plugins::djbdns inherits munin::plugins::base { } class munin::plugins::apache inherits munin::plugins::base { - include apache::status munin::plugin{ "apache_accesses": } munin::plugin{ "apache_processes": } munin::plugin{ "apache_volume": } -- cgit v1.2.3 From b543e7dfd5482555cf035ce28c3ceaccd22e7bde Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 09:48:23 +0000 Subject: rearranged plugin ordering, fixed some yum stuff --- manifests/plugin.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2b66ce2..6eaa518 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -213,7 +213,6 @@ class munin::plugins::djbdns inherits munin::plugins::base { } class munin::plugins::apache inherits munin::plugins::base { - include apache::status munin::plugin{ "apache_accesses": } munin::plugin{ "apache_processes": } munin::plugin{ "apache_volume": } -- cgit v1.2.3 From a3ac1c067e22f25b6fa5643873a4a935358561f1 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 11:05:25 +0000 Subject: fixed munin stuff git-svn-id: https://svn/ipuppet/trunk/modules/munin@1248 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 6eaa518..161bf88 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -149,7 +149,7 @@ class munin::plugins::interfaces inherits munin::plugins::base { $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") - plugin { + munin::plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; } @@ -157,7 +157,7 @@ class munin::plugins::interfaces inherits munin::plugins::base { class munin::plugins::linux inherits munin::plugins::base { - plugin { + munin::plugin { [ df_abs, forks, memory, processes, cpu, df_inode, irqstats, netstat, open_files, swap, df, entropy, interrupts, load, open_inodes, vmstat -- cgit v1.2.3 From eeb818d8d3d16bda743dd007fedcb4de25ba2027 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 11:05:25 +0000 Subject: fixed munin stuff --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 6eaa518..161bf88 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -149,7 +149,7 @@ class munin::plugins::interfaces inherits munin::plugins::base { $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") - plugin { + munin::plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; } @@ -157,7 +157,7 @@ class munin::plugins::interfaces inherits munin::plugins::base { class munin::plugins::linux inherits munin::plugins::base { - plugin { + munin::plugin { [ df_abs, forks, memory, processes, cpu, df_inode, irqstats, netstat, open_files, swap, df, entropy, interrupts, load, open_inodes, vmstat -- cgit v1.2.3 From b1381333f577b0b4c6ff17a2cfff1abfa58c00e3 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 12:26:34 +0000 Subject: unified fileserver location, in the future the fileserver should only be accessed by $server git-svn-id: https://svn/ipuppet/trunk/modules/munin@1251 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 161bf88..ac25abf 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -101,7 +101,7 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", - source => "puppet://$servername/$real_source", + source => "puppet://$server/$real_source", ensure => file, mode => 0755, owner => root, group => 0; } @@ -116,7 +116,7 @@ class munin::plugins::base { centos: { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$servername/munin/empty", + source => "puppet://$server/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0; @@ -129,7 +129,7 @@ class munin::plugins::base { default: { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$servername/munin/empty", + source => "puppet://$server/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 470e23c19625c8aa6e9e68085d284fa8be01bc3e Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 12:26:34 +0000 Subject: unified fileserver location, in the future the fileserver should only be accessed by $server --- manifests/plugin.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 161bf88..ac25abf 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -101,7 +101,7 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", - source => "puppet://$servername/$real_source", + source => "puppet://$server/$real_source", ensure => file, mode => 0755, owner => root, group => 0; } @@ -116,7 +116,7 @@ class munin::plugins::base { centos: { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$servername/munin/empty", + source => "puppet://$server/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0; @@ -129,7 +129,7 @@ class munin::plugins::base { default: { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$servername/munin/empty", + source => "puppet://$server/munin/empty", ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 9dca19736cd11ed42cfdb8aed30c8628b22231cb Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 13:26:14 +0000 Subject: merged with puzzle upstream git-svn-id: https://svn/ipuppet/trunk/modules/munin@1254 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ac25abf..6a92c56 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -93,8 +93,9 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { + $plugin_src = $ensure ? { "present" => $name, default => $ensure } $real_source = $source ? { - '' => "munin/plugins/$name", + '' => "munin/plugins/$plugin_src", default => $source } include munin::plugin::scriptpaths @@ -142,6 +143,21 @@ class munin::plugins::base { } } } + 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 } + xenu: { include munin::plugins::domU } + } } # handle if_ and if_err_ plugins @@ -195,6 +211,7 @@ class munin::plugins::dom0 inherits munin::plugins::physical { munin::plugin::deploy { "xen-cpu": config => "user root"} munin::plugin::deploy { "xen_memory": config => "user root"} munin::plugin::deploy { "xen_vbd": config => "user root"} + munin::plugin::deploy { "xen_traffic_all": config => "user root"} } class munin::plugins::physical inherits munin::plugins::base { @@ -229,3 +246,11 @@ class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg__connections": ensure => false } munin::plugin::deploy { "pg__locks": ensure => false } } +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'; + } +} -- cgit v1.2.3 From 20f5f7d8c26c9272ef302606a6d71ef1b943919a Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 13:26:14 +0000 Subject: merged with puzzle upstream --- manifests/plugin.pp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ac25abf..6a92c56 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -93,8 +93,9 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { + $plugin_src = $ensure ? { "present" => $name, default => $ensure } $real_source = $source ? { - '' => "munin/plugins/$name", + '' => "munin/plugins/$plugin_src", default => $source } include munin::plugin::scriptpaths @@ -142,6 +143,21 @@ class munin::plugins::base { } } } + 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 } + xenu: { include munin::plugins::domU } + } } # handle if_ and if_err_ plugins @@ -195,6 +211,7 @@ class munin::plugins::dom0 inherits munin::plugins::physical { munin::plugin::deploy { "xen-cpu": config => "user root"} munin::plugin::deploy { "xen_memory": config => "user root"} munin::plugin::deploy { "xen_vbd": config => "user root"} + munin::plugin::deploy { "xen_traffic_all": config => "user root"} } class munin::plugins::physical inherits munin::plugins::base { @@ -229,3 +246,11 @@ class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg__connections": ensure => false } munin::plugin::deploy { "pg__locks": ensure => false } } +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'; + } +} -- cgit v1.2.3 From c2565e972ccd7159001984e6cb351bc30a81eb51 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 11 May 2008 13:22:49 +0000 Subject: fixed absent pluginsource git-svn-id: https://svn/ipuppet/trunk/modules/munin@1426 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 6a92c56..91b0178 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -93,7 +93,11 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } + $plugin_src = $ensure ? { + 'present' => $name, + 'absent' => $name, + default => $ensure + } $real_source = $source ? { '' => "munin/plugins/$plugin_src", default => $source -- cgit v1.2.3 From aaef921ce2aae19356104872482219117288043f Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 11 May 2008 13:22:49 +0000 Subject: fixed absent pluginsource --- manifests/plugin.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 6a92c56..91b0178 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -93,7 +93,11 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') { } } define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { - $plugin_src = $ensure ? { "present" => $name, default => $ensure } + $plugin_src = $ensure ? { + 'present' => $name, + 'absent' => $name, + default => $ensure + } $real_source = $source ? { '' => "munin/plugins/$plugin_src", default => $source -- cgit v1.2.3 From d7048f01be3cfdb8e588361c6987283de45a57ef Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 11 May 2008 13:33:08 +0000 Subject: ensure is present, absent or source git-svn-id: https://svn/ipuppet/trunk/modules/munin@1427 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 91b0178..e2827cd 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -247,8 +247,8 @@ class munin::plugins::selinux inherits munin::plugins::base { class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } - munin::plugin::deploy { "pg__connections": ensure => false } - munin::plugin::deploy { "pg__locks": ensure => false } + munin::plugin::deploy { "pg__connections": ensure => 'absent' } + munin::plugin::deploy { "pg__locks": ensure => 'absent' } } class munin::plugins::nagios inherits munin::plugins::base { munin::plugin::deploy { -- cgit v1.2.3 From e66f9177885ea9b5ce8e9c779b68b6f495c28362 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 11 May 2008 13:33:08 +0000 Subject: ensure is present, absent or source --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 91b0178..e2827cd 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -247,8 +247,8 @@ class munin::plugins::selinux inherits munin::plugins::base { class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } - munin::plugin::deploy { "pg__connections": ensure => false } - munin::plugin::deploy { "pg__locks": ensure => false } + munin::plugin::deploy { "pg__connections": ensure => 'absent' } + munin::plugin::deploy { "pg__locks": ensure => 'absent' } } class munin::plugins::nagios inherits munin::plugins::base { munin::plugin::deploy { -- cgit v1.2.3 From 0449faea92a65380646c5591ee0509fcdc67ab0b Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 11 May 2008 14:02:11 +0000 Subject: added squid plugins git-svn-id: https://svn/ipuppet/trunk/modules/munin@1428 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e2827cd..d24b580 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -245,6 +245,13 @@ class munin::plugins::selinux inherits munin::plugins::base { munin::plugin::deploy { "selinux_avcstats": } } +class munin::plugins::squid inherits munin::plugins::base { + munin::plugin{ 'squid_cache': config => "user root\nenv.squidhost localhost\nenv.squidport 80"} + munin::plugin{ 'squid_icp': } + munin::plugin{ 'squid_requests': } + munin::plugin{ 'squid_traffic': } +} + class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": ensure => 'absent' } -- cgit v1.2.3 From 0044b6581d837760c8d8bf2d1a95214a20f400c9 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 11 May 2008 14:02:11 +0000 Subject: added squid plugins --- manifests/plugin.pp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e2827cd..d24b580 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -245,6 +245,13 @@ class munin::plugins::selinux inherits munin::plugins::base { munin::plugin::deploy { "selinux_avcstats": } } +class munin::plugins::squid inherits munin::plugins::base { + munin::plugin{ 'squid_cache': config => "user root\nenv.squidhost localhost\nenv.squidport 80"} + munin::plugin{ 'squid_icp': } + munin::plugin{ 'squid_requests': } + munin::plugin{ 'squid_traffic': } +} + class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": ensure => 'absent' } -- cgit v1.2.3 From 4f8fbfcc736d02ec0528b0df571d5d4a458c261e Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 13 Jun 2008 20:02:35 +0000 Subject: Merge commit 'puzzle/development' git-svn-id: https://svn/ipuppet/trunk/modules/munin@1600 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index d24b580..76d12a0 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -45,11 +45,17 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + if $require { + $real_require = [ $require, Package['munin-node'] ] + } else { + $real_require = Package['munin-node'] + } file { $plugin: ensure => "${real_script_path}/${plugin_src}", - require => Package['munin-node'], + require => $real_require, notify => Service['munin-node']; } + } } case $config { @@ -69,6 +75,11 @@ define munin::plugin ( content => "[${name}]\n$config\n", mode => 0644, owner => root, group => 0, } + if $require { + File[$plugin_conf]{ + require +> $require, + } + } } } } @@ -107,11 +118,17 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", source => "puppet://$server/$real_source", - ensure => file, + require => Package['munin-node'], mode => 0755, owner => root, group => 0; } - - munin::plugin{$name: ensure => $ensure, config => $config } + if $require { + File["munin_plugin_${name}"]{ + require +> $require, + } + munin::plugin{$name: ensure => $ensure, config => $config, require => $require } + } else { + munin::plugin{$name: ensure => $ensure, config => $config } + } } ### clases for plugins -- cgit v1.2.3 From 805d56cac760f6d047b83c470c080bee3342165f Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 13 Jun 2008 20:02:35 +0000 Subject: Merge commit 'puzzle/development' --- manifests/plugin.pp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index d24b580..76d12a0 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -45,11 +45,17 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + if $require { + $real_require = [ $require, Package['munin-node'] ] + } else { + $real_require = Package['munin-node'] + } file { $plugin: ensure => "${real_script_path}/${plugin_src}", - require => Package['munin-node'], + require => $real_require, notify => Service['munin-node']; } + } } case $config { @@ -69,6 +75,11 @@ define munin::plugin ( content => "[${name}]\n$config\n", mode => 0644, owner => root, group => 0, } + if $require { + File[$plugin_conf]{ + require +> $require, + } + } } } } @@ -107,11 +118,17 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", source => "puppet://$server/$real_source", - ensure => file, + require => Package['munin-node'], mode => 0755, owner => root, group => 0; } - - munin::plugin{$name: ensure => $ensure, config => $config } + if $require { + File["munin_plugin_${name}"]{ + require +> $require, + } + munin::plugin{$name: ensure => $ensure, config => $config, require => $require } + } else { + munin::plugin{$name: ensure => $ensure, config => $config } + } } ### clases for plugins -- cgit v1.2.3 From 9da545785dca34eb9e76321bf3a2396521e3ac45 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 8 Jul 2008 18:41:55 +0000 Subject: merged with davids and removed a case statement, which made no sense git-svn-id: https://svn/ipuppet/trunk/modules/munin@1778 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 76d12a0..2c64482 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -134,35 +134,18 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { ### clases for plugins class munin::plugins::base { - case $operatingsystem { - centos: { - file { - [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$server/munin/empty", - ensure => directory, checksum => mtime, - recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => 0; - "/etc/munin/plugin-conf.d/munin-node": - ensure => present, - mode => 0644, owner => root, group => 0; - } - } - - default: { - file { - [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$server/munin/empty", - 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'], - before => Package['munin-node']; - } - } + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$server/common/empty", + 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'], + before => Package['munin-node']; } case $kernel { linux: { -- cgit v1.2.3 From d1da2f1bc572a889534623910a86bbf3334ae615 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 8 Jul 2008 18:41:55 +0000 Subject: merged with davids and removed a case statement, which made no sense --- manifests/plugin.pp | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 76d12a0..2c64482 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -134,35 +134,18 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { ### clases for plugins class munin::plugins::base { - case $operatingsystem { - centos: { - file { - [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$server/munin/empty", - ensure => directory, checksum => mtime, - recurse => true, purge => true, force => true, - mode => 0755, owner => root, group => 0; - "/etc/munin/plugin-conf.d/munin-node": - ensure => present, - mode => 0644, owner => root, group => 0; - } - } - - default: { - file { - [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: - source => "puppet://$server/munin/empty", - 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'], - before => Package['munin-node']; - } - } + file { + [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + source => "puppet://$server/common/empty", + 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'], + before => Package['munin-node']; } case $kernel { linux: { -- cgit v1.2.3 From f15a82d411de4fa50262efa7d16e8b1d7f2b7886 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 8 Jul 2008 21:36:57 +0000 Subject: added ignore for empty git-svn-id: https://svn/ipuppet/trunk/modules/munin@1785 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2c64482..9111aec 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -137,6 +137,7 @@ class munin::plugins::base { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$server/common/empty", + ignore => '.ignore', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From b262e458a21377540d4cbfa3af402878a1bea457 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 8 Jul 2008 21:36:57 +0000 Subject: added ignore for empty --- manifests/plugin.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2c64482..9111aec 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -137,6 +137,7 @@ class munin::plugins::base { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$server/common/empty", + ignore => '.ignore', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From a0eba1c444207b6fad449e3de61d60fcdd6994d9 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 19 Jul 2008 15:12:10 +0000 Subject: factored out squid munin plugin, cleaned up some whitespaces in xen plugin git-svn-id: https://svn/ipuppet/trunk/modules/munin@1909 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 9111aec..2065c79 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -246,13 +246,6 @@ class munin::plugins::selinux inherits munin::plugins::base { munin::plugin::deploy { "selinux_avcstats": } } -class munin::plugins::squid inherits munin::plugins::base { - munin::plugin{ 'squid_cache': config => "user root\nenv.squidhost localhost\nenv.squidport 80"} - munin::plugin{ 'squid_icp': } - munin::plugin{ 'squid_requests': } - munin::plugin{ 'squid_traffic': } -} - class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": ensure => 'absent' } -- cgit v1.2.3 From edf55dda28e3642fd9fc849bcfd91f09e3844161 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 19 Jul 2008 15:12:10 +0000 Subject: factored out squid munin plugin, cleaned up some whitespaces in xen plugin --- manifests/plugin.pp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 9111aec..2065c79 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -246,13 +246,6 @@ class munin::plugins::selinux inherits munin::plugins::base { munin::plugin::deploy { "selinux_avcstats": } } -class munin::plugins::squid inherits munin::plugins::base { - munin::plugin{ 'squid_cache': config => "user root\nenv.squidhost localhost\nenv.squidport 80"} - munin::plugin{ 'squid_icp': } - munin::plugin{ 'squid_requests': } - munin::plugin{ 'squid_traffic': } -} - class munin::plugins::postgres inherits munin::plugins::base { munin::plugin::deploy { "pg_conn": } munin::plugin::deploy { "pg__connections": ensure => 'absent' } -- cgit v1.2.3 From cdecebc6cb9720e50e3a5be91ce7c38814a330bc Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Tue, 22 Jul 2008 11:51:39 +0200 Subject: regexp tryout --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2065c79..4940eaf 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -137,7 +137,7 @@ class munin::plugins::base { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$server/common/empty", - ignore => '.ignore', + ignore => '\.ignore', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From f333f2ab43ea1c4d8abae333cff1a4f3471d90e7 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 22 Jul 2008 21:14:46 +0000 Subject: merged with immerda --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 2065c79..4940eaf 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -137,7 +137,7 @@ class munin::plugins::base { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$server/common/empty", - ignore => '.ignore', + ignore => '\.ignore', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 2e0061641a88eb54eba316c47a4caa24ecbd9ce2 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Mon, 4 Aug 2008 11:35:02 +0200 Subject: adding , as a seperator, as facter 1.5 seems to seperate liket that --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 4940eaf..741de30 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -168,8 +168,8 @@ class munin::plugins::base { # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { - $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") - $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") + $ifs = gsub(split($interfaces, " |,"), "(.+)", "if_\\1") + $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1") munin::plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; -- cgit v1.2.3 From b0c793fefc5f1fcfc3f4ac646803bb8aedfbc5d9 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 4 Aug 2008 09:38:17 +0000 Subject: adding , as a seperator, as facter 1.5 seems to seperate liket that --- manifests/plugin.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 4940eaf..741de30 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -168,8 +168,8 @@ class munin::plugins::base { # handle if_ and if_err_ plugins class munin::plugins::interfaces inherits munin::plugins::base { - $ifs = gsub(split($interfaces, " "), "(.+)", "if_\\1") - $if_errs = gsub(split($interfaces, " "), "(.+)", "if_err_\\1") + $ifs = gsub(split($interfaces, " |,"), "(.+)", "if_\\1") + $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1") munin::plugin { $ifs: ensure => "if_"; $if_errs: ensure => "if_err_"; -- cgit v1.2.3 From 17fd283a948527e37f1d76937cbeb655953d40dc Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Tue, 5 Aug 2008 17:38:46 +0200 Subject: factored postgres plugins into the postgres module --- manifests/plugin.pp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 741de30..45fde08 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -246,11 +246,6 @@ class munin::plugins::selinux inherits munin::plugins::base { munin::plugin::deploy { "selinux_avcstats": } } -class munin::plugins::postgres inherits munin::plugins::base { - munin::plugin::deploy { "pg_conn": } - munin::plugin::deploy { "pg__connections": ensure => 'absent' } - munin::plugin::deploy { "pg__locks": ensure => 'absent' } -} class munin::plugins::nagios inherits munin::plugins::base { munin::plugin::deploy { nagios_hosts: config => 'user root'; -- cgit v1.2.3 From 93be07edbcea844e2efe56191cda62bf44b6654c Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 10 Sep 2008 15:44:25 +0200 Subject: added uptime plugin for all --- manifests/plugin.pp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 45fde08..ee2cbbe 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -148,6 +148,9 @@ class munin::plugins::base { notify => Service['munin-node'], before => Package['munin-node']; } + + munin::plugin {'uptime': ensure => present, } + case $kernel { linux: { case $vserver { -- cgit v1.2.3 From 14c511f7f6791f56952bc312e5ff8cf4826bb14e Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 19:54:20 +0000 Subject: tried to make munin-node installable and runable on openbsd --- manifests/plugin.pp | 57 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 19 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 741de30..4395cef 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,18 +8,11 @@ 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" - } - 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 = "/opt/munin/lib/plugins/" } + default: { $script_path = "/usr/share/munin/plugins" } } } @@ -45,10 +38,14 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + case $kernel { + openbsd: { $basic_require = File['/var/run/munin'] } + default: { $basic_require = Package['munin-node'] } + } if $require { - $real_require = [ $require, Package['munin-node'] ] + $real_require = [ $require, $basic_require ] } else { - $real_require = Package['munin-node'] + $real_require = $basic_require } file { $plugin: ensure => "${real_script_path}/${plugin_src}", @@ -118,13 +115,24 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", source => "puppet://$server/$real_source", - require => Package['munin-node'], 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 +> $require, + 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 } @@ -135,19 +143,30 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { class munin::plugins::base { file { - [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: + [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: source => "puppet://$server/common/empty", ignore => '\.ignore', 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": + '/etc/munin/plugin-conf.d/munin-node': ensure => present, mode => 0644, owner => root, group => 0, notify => Service['munin-node'], - before => Package['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'], + } + } + } case $kernel { linux: { case $vserver { -- cgit v1.2.3 From 9e11da55d499b9b01fd1776a969aeef21e6def87 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 21:02:55 +0000 Subject: merged with puzzle --- manifests/plugin.pp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 4395cef..4e922ed 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -155,6 +155,9 @@ class munin::plugins::base { mode => 0644, owner => root, group => 0, notify => Service['munin-node'], } + + munin::plugin {'uptime': ensure => present, } + case $kernel { openbsd: { File['/etc/munin/plugin-conf.d/munin-node']{ @@ -265,11 +268,6 @@ class munin::plugins::selinux inherits munin::plugins::base { munin::plugin::deploy { "selinux_avcstats": } } -class munin::plugins::postgres inherits munin::plugins::base { - munin::plugin::deploy { "pg_conn": } - munin::plugin::deploy { "pg__connections": ensure => 'absent' } - munin::plugin::deploy { "pg__locks": ensure => 'absent' } -} class munin::plugins::nagios inherits munin::plugins::base { munin::plugin::deploy { nagios_hosts: config => 'user root'; -- cgit v1.2.3 From f4f092398a1104ed223d94f7022671a9deccfa96 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 21:28:10 +0000 Subject: adding default plugins for openbsd, refactor the same plugins together in the base class --- manifests/plugin.pp | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 4e922ed..27221bc 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -156,7 +156,13 @@ class munin::plugins::base { notify => Service['munin-node'], } - munin::plugin {'uptime': ensure => present, } + munin::plugin { + [ df, cpu, interrupts, load, memory, netstat, open_files, + processes, swap, uptime, users, vmstat + ]: + ensure => present, + } + include munin::plugins::interfaces case $kernel { openbsd: { @@ -201,22 +207,31 @@ class munin::plugins::interfaces inherits munin::plugins::base { class munin::plugins::linux inherits munin::plugins::base { munin::plugin { - [ df_abs, forks, memory, processes, cpu, df_inode, irqstats, - netstat, open_files, swap, df, entropy, interrupts, load, open_inodes, - vmstat - ]: + [ df_abs, forks, df_inode, irqstats, entropy, open_inodes ]: ensure => present; acpi: ensure => $acpi_available; } - - include munin::plugins::interfaces } class munin::plugins::debian inherits munin::plugins::base { munin::plugin { apt_all: ensure => present; } } +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::vserver inherits munin::plugins::base { munin::plugin { [ netstat, processes ]: @@ -242,7 +257,9 @@ class munin::plugins::dom0 inherits munin::plugins::physical { } class munin::plugins::physical inherits munin::plugins::base { - munin::plugin { iostat: } + case $kernel { + linux: { munin::plugin { iostat: } } + } } class munin::plugins::muninhost inherits munin::plugins::base { -- cgit v1.2.3 From fb9b04497cee36428066c2e6f14b4473270a7b99 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 10 Oct 2008 18:48:10 +0000 Subject: openbsd uses if_errcoll: plugin --- manifests/plugin.pp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 27221bc..878221f 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -197,11 +197,23 @@ class munin::plugins::base { class munin::plugins::interfaces inherits munin::plugins::base { $ifs = gsub(split($interfaces, " |,"), "(.+)", "if_\\1") - $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1") munin::plugin { $ifs: ensure => "if_"; - $if_errs: ensure => "if_err_"; } + 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_"; + } + } + } } class munin::plugins::linux inherits munin::plugins::base { -- cgit v1.2.3 From 50af1520524eed3ae6cba43bf9aec0e2256954a4 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 21 Feb 2009 15:49:26 +0000 Subject: removed debug code --- manifests/plugin.pp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 878221f..82d2d27 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -28,16 +28,13 @@ define munin::plugin ( $real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in } $plugin_src = $ensure ? { "present" => $name, default => $ensure } - debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$munin::plugin::scriptpaths::script_path" ) $plugin = "/etc/munin/plugins/$name" $plugin_conf = "/etc/munin/plugin-conf.d/$name.conf" case $ensure { "absent": { - debug ( "munin_plugin: suppressing $plugin" ) file { $plugin: ensure => absent, } } default: { - debug ( "munin_plugin: making $plugin using src: $plugin_src" ) case $kernel { openbsd: { $basic_require = File['/var/run/munin'] } default: { $basic_require = Package['munin-node'] } @@ -57,17 +54,14 @@ define munin::plugin ( } case $config { '': { - debug("no config for $name") file { $plugin_conf: ensure => absent } } default: { case $ensure { absent: { - debug("removing config for $name") file { $plugin_conf: ensure => absent } } default: { - debug("creating $plugin_conf") file { $plugin_conf: content => "[${name}]\n$config\n", mode => 0644, owner => root, group => 0, @@ -111,7 +105,6 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { default => $source } include munin::plugin::scriptpaths - debug ( "munin_plugin_${name}: name=$name, source=$source, script_path=$munin::plugin::scriptpaths::script_path" ) file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", source => "puppet://$server/$real_source", -- cgit v1.2.3 From 8b5287a7c93e071c856acd216d7e283262aec5dc Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 21 Feb 2009 15:51:11 +0000 Subject: some intendation clean ups --- manifests/plugin.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 82d2d27..c8d0bc3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -196,15 +196,15 @@ class munin::plugins::interfaces inherits munin::plugins::base { case $operatingsystem { openbsd: { $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1") - munin::plugin{ - $if_errs: ensure => "if_errcoll_"; - } + munin::plugin{ + $if_errs: ensure => "if_errcoll_"; + } } default: { $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1") - munin::plugin{ + munin::plugin{ $if_errs: ensure => "if_err_"; - } + } } } } -- cgit v1.2.3 From 3f62e41b08c30b5fd8b846c414646142f5345f3d Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 12:25:47 +0200 Subject: don't delete snmp plugins --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ee2cbbe..9ede2bf 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -137,7 +137,7 @@ class munin::plugins::base { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$server/common/empty", - ignore => '\.ignore', + ignore => '(\.ignore|snmp_*)', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 4b26758687f544e4c9305b8fb1910c20e6084409 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 12:29:09 +0200 Subject: revert globbing problem --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 9ede2bf..ee2cbbe 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -137,7 +137,7 @@ class munin::plugins::base { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$server/common/empty", - ignore => '(\.ignore|snmp_*)', + ignore => '\.ignore', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 6dde40efc2202cc372fc4b0c096288d373c190c7 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 16:00:00 +0200 Subject: do not delete snmp plugins --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ee2cbbe..bb02e46 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -137,7 +137,7 @@ class munin::plugins::base { file { [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: source => "puppet://$server/common/empty", - ignore => '\.ignore', + ignore => [ '\.ignore', 'snmp_*' ], ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 1069e03ef2af42e7fa025c5085f9ce78f62b75b3 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 12:25:47 +0200 Subject: don't delete snmp plugins --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index c8d0bc3..adc1f3c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -138,7 +138,7 @@ class munin::plugins::base { file { [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: source => "puppet://$server/common/empty", - ignore => '\.ignore', + ignore => '(\.ignore|snmp_*)', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 95ddca872bb45a1ae580c8e4fdc4435eecdfab05 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 12:29:09 +0200 Subject: revert globbing problem --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index adc1f3c..c8d0bc3 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -138,7 +138,7 @@ class munin::plugins::base { file { [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: source => "puppet://$server/common/empty", - ignore => '(\.ignore|snmp_*)', + ignore => '\.ignore', ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 56cad3194b814d24184443c954f50507217a7d7d Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 16:00:00 +0200 Subject: do not delete snmp plugins --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index c8d0bc3..6dfe5f0 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -138,7 +138,7 @@ class munin::plugins::base { file { [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: source => "puppet://$server/common/empty", - ignore => '\.ignore', + ignore => [ '\.ignore', 'snmp_*' ], ensure => directory, checksum => mtime, recurse => true, purge => true, force => true, mode => 0755, owner => root, group => 0, -- cgit v1.2.3 From 1893960c1babb6a261cc6fc399231e9c0644a104 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 22:51:15 +0200 Subject: refactor everything into its own file --- manifests/plugin.pp | 236 ---------------------------------------------------- 1 file changed, 236 deletions(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 8d739a8..0e83e04 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -3,19 +3,6 @@ # See LICENSE for the full license granted to you. # adapted and improved by admin(at)immerda.ch - -### configpaths - -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" } - } -} - ### defines define munin::plugin ( @@ -76,226 +63,3 @@ define munin::plugin ( } } } - -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", - } - } - } -} -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/$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 } - } -} - -### clases for plugins - -class munin::plugins::base { - file { - [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: - source => "puppet://$server/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 - - 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 } - xenu: { include munin::plugins::domU } - } -} - -# 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_"; - } - 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_"; - } - } - } -} - -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::debian inherits munin::plugins::base { - munin::plugin { apt_all: ensure => present; } -} - -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::vserver inherits munin::plugins::base { - munin::plugin { - [ netstat, processes ]: - ensure => present; - } -} - -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::centos inherits munin::plugins::base { -} - - - -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_vbd": config => "user root"} - munin::plugin::deploy { "xen_traffic_all": config => "user root"} -} - -class munin::plugins::physical inherits munin::plugins::base { - case $kernel { - linux: { munin::plugin { iostat: } } - } -} - -class munin::plugins::muninhost inherits munin::plugins::base { - munin::plugin { munin_update: } - munin::plugin { munin_graph: } -} - -class munin::plugins::domU inherits munin::plugins::base { } - -class munin::plugins::djbdns inherits munin::plugins::base { - munin::plugin::deploy { "tinydns": } -} - -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::selinux inherits munin::plugins::base { - munin::plugin::deploy { "selinuxenforced": } - munin::plugin::deploy { "selinux_avcstats": } -} - -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'; - } -} -- cgit v1.2.3 From 4b0841f9f2bcc58cd2da1f8913d7e4f05211888d Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 23:00:38 +0200 Subject: include client stuff --- manifests/plugin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 0e83e04..01eda76 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -10,7 +10,7 @@ define munin::plugin ( $script_path_in = '', $config = '') { - + include ::munin::client include munin::plugin::scriptpaths $real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in } -- cgit v1.2.3 From a385bc413215ac5aa6b646c3e4ebf59063230bd8 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 23:02:47 +0200 Subject: correctly include the right client class --- manifests/plugin.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/plugin.pp') diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 01eda76..1fa4651 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -10,7 +10,6 @@ define munin::plugin ( $script_path_in = '', $config = '') { - include ::munin::client include munin::plugin::scriptpaths $real_script_path = $script_path_in ? { '' => $munin::plugin::scriptpaths::script_path, default => $script_path_in } -- cgit v1.2.3