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/client.pp | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 manifests/client.pp (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp new file mode 100644 index 0000000..5b78186 --- /dev/null +++ b/manifests/client.pp @@ -0,0 +1,122 @@ +# client.pp - configure a munin node +# Copyright (C) 2007 David Schmitt +# See LICENSE for the full license granted to you. + +class munin::client { + + $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } + $munin_host_real = $munin_host ? { + '' => '*', + 'fqdn' => '*', + default => $munin_host + } + + case $operatingsystem { + darwin: { include munin::client::darwin } + debian: { + include munin::client::debian + include munin::plugins::debian + } + ubuntu: { + info ( "Trying to configure Ubuntu's munin with Debian class" ) + include munin::client::debian + include munin::plugins::debian + } + default: { fail ("Don't know how to handle munin on $operatingsystem") } + } + + case $kernel { + linux: { + case $vserver { + guest: { include munin::plugins::vserver } + default: { + include munin::plugins::linux + case $virtual { + xen0: { include munin::plugins::xen } + } + } + } + } + default: { + err( "Don't know which munin plugins to install for $kernel" ) + } + } + +} + +define munin::register() +{ + $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } + $munin_host_real = $munin_host ? { + '' => $fqdn, + 'fqdn' => $fqdn, + default => $munin_host + } + + @@file { "${NODESDIR}/${name}_${munin_port_real}": + ensure => present, + content => template("munin/defaultclient.erb"), + } +} + +define munin::register_snmp() +{ + @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", + ensure => present, + content => template("munin/snmpclient.erb"), + } +} + +class munin::client::darwin +{ + file { "/usr/share/snmp/snmpd.conf": + mode => 744, + content => template("munin/darwin_snmpd.conf.erb"), + group => staff, + owner => root, + } + delete_matching_line{"startsnmpdno": + file => "/etc/hostconfig", + pattern => "SNMPSERVER=-NO-", + } + line { "startsnmpdyes": + file => "/etc/hostconfig", + line => "SNMPSERVER=-YES-", + notify => Exec["/sbin/SystemStarter start SNMP"], + } + exec{"/sbin/SystemStarter start SNMP": + noop => false, + } + munin::register_snmp { $fqdn: } +} + +class munin::client::debian +{ + + package { "munin-node": ensure => installed } + + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => root; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.${operatingsystem}.${lsbdistcodename}"), + mode => 0644, owner => root, group => root, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin-node"], + notify => Service["munin-node"], + } + + service { "munin-node": + ensure => running, + # sarge's munin-node init script has no status + hasstatus => $lsbdistcodename ? { sarge => false, default => true } + } + + munin::register { $fqdn: } + + # workaround bug in munin_node_configure + plugin { "postfix_mailvolume": ensure => absent } +} + -- 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/client.pp | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 manifests/client.pp (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp new file mode 100644 index 0000000..5b78186 --- /dev/null +++ b/manifests/client.pp @@ -0,0 +1,122 @@ +# client.pp - configure a munin node +# Copyright (C) 2007 David Schmitt +# See LICENSE for the full license granted to you. + +class munin::client { + + $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } + $munin_host_real = $munin_host ? { + '' => '*', + 'fqdn' => '*', + default => $munin_host + } + + case $operatingsystem { + darwin: { include munin::client::darwin } + debian: { + include munin::client::debian + include munin::plugins::debian + } + ubuntu: { + info ( "Trying to configure Ubuntu's munin with Debian class" ) + include munin::client::debian + include munin::plugins::debian + } + default: { fail ("Don't know how to handle munin on $operatingsystem") } + } + + case $kernel { + linux: { + case $vserver { + guest: { include munin::plugins::vserver } + default: { + include munin::plugins::linux + case $virtual { + xen0: { include munin::plugins::xen } + } + } + } + } + default: { + err( "Don't know which munin plugins to install for $kernel" ) + } + } + +} + +define munin::register() +{ + $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } + $munin_host_real = $munin_host ? { + '' => $fqdn, + 'fqdn' => $fqdn, + default => $munin_host + } + + @@file { "${NODESDIR}/${name}_${munin_port_real}": + ensure => present, + content => template("munin/defaultclient.erb"), + } +} + +define munin::register_snmp() +{ + @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", + ensure => present, + content => template("munin/snmpclient.erb"), + } +} + +class munin::client::darwin +{ + file { "/usr/share/snmp/snmpd.conf": + mode => 744, + content => template("munin/darwin_snmpd.conf.erb"), + group => staff, + owner => root, + } + delete_matching_line{"startsnmpdno": + file => "/etc/hostconfig", + pattern => "SNMPSERVER=-NO-", + } + line { "startsnmpdyes": + file => "/etc/hostconfig", + line => "SNMPSERVER=-YES-", + notify => Exec["/sbin/SystemStarter start SNMP"], + } + exec{"/sbin/SystemStarter start SNMP": + noop => false, + } + munin::register_snmp { $fqdn: } +} + +class munin::client::debian +{ + + package { "munin-node": ensure => installed } + + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => root; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.${operatingsystem}.${lsbdistcodename}"), + mode => 0644, owner => root, group => root, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin-node"], + notify => Service["munin-node"], + } + + service { "munin-node": + ensure => running, + # sarge's munin-node init script has no status + hasstatus => $lsbdistcodename ? { sarge => false, default => true } + } + + munin::register { $fqdn: } + + # workaround bug in munin_node_configure + plugin { "postfix_mailvolume": ensure => absent } +} + -- 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/client.pp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 5b78186..f5caaec 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -22,6 +22,11 @@ class munin::client { include munin::client::debian include munin::plugins::debian } + gentoo: { + include munin::client::gentoo + include munin::plugins::gentoo + + } default: { fail ("Don't know how to handle munin on $operatingsystem") } } @@ -120,3 +125,35 @@ class munin::client::debian plugin { "postfix_mailvolume": ensure => absent } } +class munin::client::gentoo +{ + package { 'munin': + ensure => present, + category => $operatingsystem ? { + gentoo => 'net-analyzer', + default => '', + }, + } + + + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => root; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.Gentoo."), + mode => 0644, owner => root, group => root, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin-node"], + notify => Service["munin-node"], + } + + service { "munin": + ensure => running, + } + + munin::register { $fqdn: } + +} + -- 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/client.pp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 5b78186..f5caaec 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -22,6 +22,11 @@ class munin::client { include munin::client::debian include munin::plugins::debian } + gentoo: { + include munin::client::gentoo + include munin::plugins::gentoo + + } default: { fail ("Don't know how to handle munin on $operatingsystem") } } @@ -120,3 +125,35 @@ class munin::client::debian plugin { "postfix_mailvolume": ensure => absent } } +class munin::client::gentoo +{ + package { 'munin': + ensure => present, + category => $operatingsystem ? { + gentoo => 'net-analyzer', + default => '', + }, + } + + + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => root; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.Gentoo."), + mode => 0644, owner => root, group => root, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin-node"], + notify => Service["munin-node"], + } + + service { "munin": + ensure => running, + } + + munin::register { $fqdn: } + +} + -- cgit v1.2.3 From 4d9eb3d04b2ed3efba52d45e2a24cf7ed7965151 Mon Sep 17 00:00:00 2001 From: am Date: Tue, 4 Dec 2007 17:18:35 +0000 Subject: munin-node in gentoo is munin git-svn-id: https://svn/ipuppet/trunk/modules/munin@188 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index f5caaec..639d133 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -145,8 +145,8 @@ class munin::client::gentoo mode => 0644, owner => root, group => root, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin-node"], - notify => Service["munin-node"], + before => Package["munin"], + notify => Service["munin"], } service { "munin": -- cgit v1.2.3 From 1fced1bd007e0f3b72b46890d9d4b138f75a118d Mon Sep 17 00:00:00 2001 From: andreas Date: Tue, 4 Dec 2007 17:18:35 +0000 Subject: munin-node in gentoo is munin --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index f5caaec..639d133 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -145,8 +145,8 @@ class munin::client::gentoo mode => 0644, owner => root, group => root, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin-node"], - notify => Service["munin-node"], + before => Package["munin"], + notify => Service["munin"], } 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/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 639d133..47df43d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -145,8 +145,8 @@ class munin::client::gentoo mode => 0644, owner => root, group => root, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin"], - notify => Service["munin"], + #before => Package["munin"], + #notify => Service["munin"], } service { "munin": -- 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/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 639d133..47df43d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -145,8 +145,8 @@ class munin::client::gentoo mode => 0644, owner => root, group => root, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin"], - notify => Service["munin"], + #before => Package["munin"], + #notify => Service["munin"], } service { "munin": -- 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/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 47df43d..639d133 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -145,8 +145,8 @@ class munin::client::gentoo mode => 0644, owner => root, group => root, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - #before => Package["munin"], - #notify => Service["munin"], + before => Package["munin"], + notify => Service["munin"], } service { "munin": -- 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/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 47df43d..639d133 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -145,8 +145,8 @@ class munin::client::gentoo mode => 0644, owner => root, group => root, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - #before => Package["munin"], - #notify => Service["munin"], + before => Package["munin"], + notify => Service["munin"], } service { "munin": -- 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/client.pp | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 639d133..18a4043 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -25,7 +25,10 @@ class munin::client { gentoo: { include munin::client::gentoo include munin::plugins::gentoo - + } + centos: { + include munin::client::centos + include munin::plugins::centos } default: { fail ("Don't know how to handle munin on $operatingsystem") } } @@ -157,3 +160,35 @@ class munin::client::gentoo } +class munin::client::centos +{ + package { 'munin-node': + ensure => present, + category => $operatingsystem ? { + gentoo => 'net-analyzer', + default => '', + }, + } + + + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => root; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.CentOS."), + mode => 0644, owner => root, group => root, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin"], + notify => Service["munin"], + } + + service { "munin": + ensure => running, + } + + munin::register { $fqdn: } + +} + -- 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/client.pp | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 639d133..18a4043 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -25,7 +25,10 @@ class munin::client { gentoo: { include munin::client::gentoo include munin::plugins::gentoo - + } + centos: { + include munin::client::centos + include munin::plugins::centos } default: { fail ("Don't know how to handle munin on $operatingsystem") } } @@ -157,3 +160,35 @@ class munin::client::gentoo } +class munin::client::centos +{ + package { 'munin-node': + ensure => present, + category => $operatingsystem ? { + gentoo => 'net-analyzer', + default => '', + }, + } + + + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => root; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.CentOS."), + mode => 0644, owner => root, group => root, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin"], + notify => Service["munin"], + } + + service { "munin": + ensure => running, + } + + munin::register { $fqdn: } + +} + -- 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/client.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 18a4043..2e8f018 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -80,7 +80,7 @@ class munin::client::darwin file { "/usr/share/snmp/snmpd.conf": mode => 744, content => template("munin/darwin_snmpd.conf.erb"), - group => staff, + group => 0, owner => root, } delete_matching_line{"startsnmpdno": @@ -106,10 +106,10 @@ class munin::client::debian file { "/etc/munin/": ensure => directory, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.${operatingsystem}.${lsbdistcodename}"), - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin-node"], @@ -142,10 +142,10 @@ class munin::client::gentoo file { "/etc/munin/": ensure => directory, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.Gentoo."), - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], @@ -174,10 +174,10 @@ class munin::client::centos file { "/etc/munin/": ensure => directory, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group =>0; "/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.CentOS."), - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], -- 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/client.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 18a4043..2e8f018 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -80,7 +80,7 @@ class munin::client::darwin file { "/usr/share/snmp/snmpd.conf": mode => 744, content => template("munin/darwin_snmpd.conf.erb"), - group => staff, + group => 0, owner => root, } delete_matching_line{"startsnmpdno": @@ -106,10 +106,10 @@ class munin::client::debian file { "/etc/munin/": ensure => directory, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.${operatingsystem}.${lsbdistcodename}"), - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin-node"], @@ -142,10 +142,10 @@ class munin::client::gentoo file { "/etc/munin/": ensure => directory, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.Gentoo."), - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], @@ -174,10 +174,10 @@ class munin::client::centos file { "/etc/munin/": ensure => directory, - mode => 0755, owner => root, group => root; + mode => 0755, owner => root, group =>0; "/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.CentOS."), - mode => 0644, owner => root, group => root, + mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], -- 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/client.pp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 2e8f018..1aa0e88 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -40,7 +40,7 @@ class munin::client { default: { include munin::plugins::linux case $virtual { - xen0: { include munin::plugins::xen } + xen0: { include munin::plugins::dom0 } } } } @@ -100,6 +100,7 @@ class munin::client::darwin class munin::client::debian { + $script_path_default = "/usr/share/munin/plugins" package { "munin-node": ensure => installed } @@ -130,13 +131,15 @@ class munin::client::debian class munin::client::gentoo { - package { 'munin': + $script_path_default = "/usr/libexec/munin/plugins" + $acpi_available = "absent" + package { 'munin': ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', default => '', }, - } + } file { @@ -157,18 +160,18 @@ class munin::client::gentoo } munin::register { $fqdn: } - } class munin::client::centos { - package { 'munin-node': + $script_path_default = "/usr/share/munin/plugins" + package { 'munin-node': ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', default => '', }, - } + } file { -- 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/client.pp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 2e8f018..1aa0e88 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -40,7 +40,7 @@ class munin::client { default: { include munin::plugins::linux case $virtual { - xen0: { include munin::plugins::xen } + xen0: { include munin::plugins::dom0 } } } } @@ -100,6 +100,7 @@ class munin::client::darwin class munin::client::debian { + $script_path_default = "/usr/share/munin/plugins" package { "munin-node": ensure => installed } @@ -130,13 +131,15 @@ class munin::client::debian class munin::client::gentoo { - package { 'munin': + $script_path_default = "/usr/libexec/munin/plugins" + $acpi_available = "absent" + package { 'munin': ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', default => '', }, - } + } file { @@ -157,18 +160,18 @@ class munin::client::gentoo } munin::register { $fqdn: } - } class munin::client::centos { - package { 'munin-node': + $script_path_default = "/usr/share/munin/plugins" + package { 'munin-node': ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', default => '', }, - } + } file { -- cgit v1.2.3 From 7700dacfbdd0d6366a5c05d5bb1a72844a55b8fd Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 20:04:42 +0000 Subject: fixed servicemodules/munin/manifests/client.pp git-svn-id: https://svn/ipuppet/trunk/modules/munin@648 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 1aa0e88..d20850a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -155,7 +155,7 @@ class munin::client::gentoo notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } -- cgit v1.2.3 From 2be6a1adaea42c80126f8c55069f7283198fbbc5 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 20:04:42 +0000 Subject: fixed servicemodules/munin/manifests/client.pp --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 1aa0e88..d20850a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -155,7 +155,7 @@ class munin::client::gentoo notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } -- cgit v1.2.3 From c53532f9bc5a360522a067b14ef81de66add9d17 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 20:06:20 +0000 Subject: munin-node service git-svn-id: https://svn/ipuppet/trunk/modules/munin@649 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index d20850a..c2a59e4 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -165,7 +165,7 @@ class munin::client::gentoo class munin::client::centos { $script_path_default = "/usr/share/munin/plugins" - package { 'munin-node': + package { 'munin': ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', @@ -187,7 +187,7 @@ class munin::client::centos notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } -- cgit v1.2.3 From e7d5725e20ffdb20718c7e68dd9e39c7d987675f Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 20:06:20 +0000 Subject: munin-node service --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index d20850a..c2a59e4 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -165,7 +165,7 @@ class munin::client::gentoo class munin::client::centos { $script_path_default = "/usr/share/munin/plugins" - package { 'munin-node': + package { 'munin': ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', @@ -187,7 +187,7 @@ class munin::client::centos notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } -- cgit v1.2.3 From fd721045a7d529f3b9fbc796c58e26177b89ad65 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 20:13:15 +0000 Subject: fixed service git-svn-id: https://svn/ipuppet/trunk/modules/munin@651 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index c2a59e4..bc47a23 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -152,7 +152,7 @@ class munin::client::gentoo # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], - notify => Service["munin"], + notify => Service["munin-node"], } service { "munin-node": -- cgit v1.2.3 From 77212a2b8c764900b0ba5b167fb450ea6ecf3b96 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 20:13:15 +0000 Subject: fixed service --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index c2a59e4..bc47a23 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -152,7 +152,7 @@ class munin::client::gentoo # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], - notify => Service["munin"], + notify => Service["munin-node"], } service { "munin-node": -- cgit v1.2.3 From b2bbba673547959692b51f783b71959a17dce7dd Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 20:16:54 +0000 Subject: chaos-a... git-svn-id: https://svn/ipuppet/trunk/modules/munin@652 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index bc47a23..56742cb 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -187,7 +187,7 @@ class munin::client::centos notify => Service["munin"], } - service { "munin-node": + service { "munin": ensure => running, } -- cgit v1.2.3 From 8e637082f8bfb8430a0f1e4b11627646c8291453 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 20:16:54 +0000 Subject: chaos-a... --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index bc47a23..56742cb 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -187,7 +187,7 @@ class munin::client::centos notify => Service["munin"], } - service { "munin-node": + service { "munin": ensure => running, } -- cgit v1.2.3 From b929f469342c6c61ff29bb9f5f4271ab80d5d5fe Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 20:18:05 +0000 Subject: doch munin-node git-svn-id: https://svn/ipuppet/trunk/modules/munin@653 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 56742cb..bc47a23 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -187,7 +187,7 @@ class munin::client::centos notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } -- cgit v1.2.3 From 93ea9fb239a35098a10d95c191cafc84e1dc9769 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 20:18:05 +0000 Subject: doch munin-node --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 56742cb..bc47a23 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -187,7 +187,7 @@ class munin::client::centos notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } -- cgit v1.2.3 From 26e8702b15a37a5e22c070cbd6dd0105355b0d45 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 22:14:36 +0000 Subject: gentoo auf munin, versuch symlink git-svn-id: https://svn/ipuppet/trunk/modules/munin@655 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index bc47a23..af2c523 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -152,10 +152,10 @@ class munin::client::gentoo # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], - notify => Service["munin-node"], + notify => Service["munin"], } - service { "munin-node": + service { "munin": ensure => running, } -- cgit v1.2.3 From 75b7cf781e33d78a890e0717d4c052835a804f2c Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 22:14:36 +0000 Subject: gentoo auf munin, versuch symlink --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index bc47a23..af2c523 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -152,10 +152,10 @@ class munin::client::gentoo # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], - notify => Service["munin-node"], + notify => Service["munin"], } - service { "munin-node": + service { "munin": ensure => running, } -- cgit v1.2.3 From 562c898ab81bc9ee19548f9b4601d39773b516e1 Mon Sep 17 00:00:00 2001 From: am Date: Thu, 31 Jan 2008 22:19:05 +0000 Subject: kein notify? git-svn-id: https://svn/ipuppet/trunk/modules/munin@656 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index af2c523..3c2814b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -141,6 +141,13 @@ class munin::client::gentoo }, } + # link + file{ + "/etc/init.d/munin": + ensure => "/etc/init.d/munin-node", + } + + file { "/etc/munin/": @@ -152,7 +159,7 @@ class munin::client::gentoo # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], - notify => Service["munin"], + # notify => Service["munin"], } service { "munin": -- cgit v1.2.3 From ffadb6ba14efabe3eeae1decaef7034d4dbd03e3 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 31 Jan 2008 22:19:05 +0000 Subject: kein notify? --- manifests/client.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index af2c523..3c2814b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -141,6 +141,13 @@ class munin::client::gentoo }, } + # link + file{ + "/etc/init.d/munin": + ensure => "/etc/init.d/munin-node", + } + + file { "/etc/munin/": @@ -152,7 +159,7 @@ class munin::client::gentoo # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin"], - notify => Service["munin"], + # notify => Service["munin"], } service { "munin": -- cgit v1.2.3 From 24a5855d19e604e2d1cd23270d6d2514a2839ee0 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 23:25:21 +0000 Subject: really needed? git-svn-id: https://svn/ipuppet/trunk/modules/munin@659 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 3c2814b..4e89f12 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -142,10 +142,11 @@ class munin::client::gentoo } # link - file{ - "/etc/init.d/munin": - ensure => "/etc/init.d/munin-node", - } + # mh: really needed? +# file{ +# "/etc/init.d/munin": +# ensure => "/etc/init.d/munin-node", +# } -- cgit v1.2.3 From 656639fc8a08519013b873a0146bddb472ec8abd Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 Jan 2008 23:25:21 +0000 Subject: really needed? --- manifests/client.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 3c2814b..4e89f12 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -142,10 +142,11 @@ class munin::client::gentoo } # link - file{ - "/etc/init.d/munin": - ensure => "/etc/init.d/munin-node", - } + # mh: really needed? +# file{ +# "/etc/init.d/munin": +# ensure => "/etc/init.d/munin-node", +# } -- cgit v1.2.3 From db0ab2b74a969303bd5adb678e24c1e7bebb64c7 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 14:25:50 +0000 Subject: test in modul git-svn-id: https://svn/ipuppet/trunk/modules/munin@676 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 4e89f12..f334756 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,3 +203,11 @@ class munin::client::centos } +define munin::client::immer1-5($domU_number = '0') { + $munin_port = $domU_number ? { + '4949' => 4949, + default => muninport($domU_number); + } + + include munin::client +} -- cgit v1.2.3 From b5c0d56b42604771808b90397a84619f31240261 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 14:25:50 +0000 Subject: test in modul --- manifests/client.pp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 4e89f12..f334756 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,3 +203,11 @@ class munin::client::centos } +define munin::client::immer1-5($domU_number = '0') { + $munin_port = $domU_number ? { + '4949' => 4949, + default => muninport($domU_number); + } + + include munin::client +} -- cgit v1.2.3 From dda34c92a218f2f77a2904a868c573e766898d37 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 14:28:32 +0000 Subject: fehler? git-svn-id: https://svn/ipuppet/trunk/modules/munin@677 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index f334756..341aeaa 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,7 +203,7 @@ class munin::client::centos } -define munin::client::immer1-5($domU_number = '0') { +define munin::client::immertest($domU_number = '0') { $munin_port = $domU_number ? { '4949' => 4949, default => muninport($domU_number); -- cgit v1.2.3 From bb494884dff041662ee188f19d4969ea2d38e7d0 Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 14:28:32 +0000 Subject: fehler? --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index f334756..341aeaa 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,7 +203,7 @@ class munin::client::centos } -define munin::client::immer1-5($domU_number = '0') { +define munin::client::immertest($domU_number = '0') { $munin_port = $domU_number ? { '4949' => 4949, default => muninport($domU_number); -- cgit v1.2.3 From 775a5fb9185abb040659cea5bb4c3490633ae888 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 14:32:06 +0000 Subject: test git-svn-id: https://svn/ipuppet/trunk/modules/munin@678 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 341aeaa..e0cf17b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,7 +203,7 @@ class munin::client::centos } -define munin::client::immertest($domU_number = '0') { +define munin::immertest($domU_number = '0') { $munin_port = $domU_number ? { '4949' => 4949, default => muninport($domU_number); @@ -211,3 +211,4 @@ define munin::client::immertest($domU_number = '0') { include munin::client } + -- cgit v1.2.3 From b685b11ba32d98ce7e2e56b7902e5aa3f93c3c5a Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 14:32:06 +0000 Subject: test --- manifests/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 341aeaa..e0cf17b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,7 +203,7 @@ class munin::client::centos } -define munin::client::immertest($domU_number = '0') { +define munin::immertest($domU_number = '0') { $munin_port = $domU_number ? { '4949' => 4949, default => muninport($domU_number); @@ -211,3 +211,4 @@ define munin::client::immertest($domU_number = '0') { include munin::client } + -- cgit v1.2.3 From a9a318e0c451bbddeaaac135ac4317bb01599bc4 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 14:43:48 +0000 Subject: case... git-svn-id: https://svn/ipuppet/trunk/modules/munin@679 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index e0cf17b..510945d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,12 +203,4 @@ class munin::client::centos } -define munin::immertest($domU_number = '0') { - $munin_port = $domU_number ? { - '4949' => 4949, - default => muninport($domU_number); - } - - include munin::client -} -- cgit v1.2.3 From e850327283865f00748f241247e7e196ff653ada Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 14:43:48 +0000 Subject: case... --- manifests/client.pp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index e0cf17b..510945d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -203,12 +203,4 @@ class munin::client::centos } -define munin::immertest($domU_number = '0') { - $munin_port = $domU_number ? { - '4949' => 4949, - default => muninport($domU_number); - } - - include munin::client -} -- cgit v1.2.3 From 1116b7ecf0b2760e09e589543a1a6fb9a6fed38b Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:29:58 +0000 Subject: fixed some service correlation git-svn-id: https://svn/ipuppet/trunk/modules/munin@707 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 510945d..df60a77 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,6 +134,7 @@ class munin::client::gentoo $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" package { 'munin': + alias => 'munin-node' ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', @@ -159,7 +160,7 @@ class munin::client::gentoo mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin"], + before => Package["munin-node"], # notify => Service["munin"], } @@ -175,10 +176,6 @@ class munin::client::centos $script_path_default = "/usr/share/munin/plugins" package { 'munin': ensure => present, - category => $operatingsystem ? { - gentoo => 'net-analyzer', - default => '', - }, } @@ -191,7 +188,7 @@ class munin::client::centos mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin"], + before => Package["munin-node"], notify => Service["munin"], } -- cgit v1.2.3 From af67525a0b0eeac47b62efe23e7dd8ef8c320262 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:29:58 +0000 Subject: fixed some service correlation --- manifests/client.pp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 510945d..df60a77 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,6 +134,7 @@ class munin::client::gentoo $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" package { 'munin': + alias => 'munin-node' ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', @@ -159,7 +160,7 @@ class munin::client::gentoo mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin"], + before => Package["munin-node"], # notify => Service["munin"], } @@ -175,10 +176,6 @@ class munin::client::centos $script_path_default = "/usr/share/munin/plugins" package { 'munin': ensure => present, - category => $operatingsystem ? { - gentoo => 'net-analyzer', - default => '', - }, } @@ -191,7 +188,7 @@ class munin::client::centos mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! - before => Package["munin"], + before => Package["munin-node"], notify => Service["munin"], } -- cgit v1.2.3 From a35e38d571e0a3411f4fd1831cdb18235157621f Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:33:29 +0000 Subject: fixed some service correlation git-svn-id: https://svn/ipuppet/trunk/modules/munin@708 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index df60a77..d61db3b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -174,7 +174,7 @@ class munin::client::gentoo class munin::client::centos { $script_path_default = "/usr/share/munin/plugins" - package { 'munin': + package { 'munin-node': ensure => present, } -- cgit v1.2.3 From 52c1bc427e718aa98ae2ce6ff5cced66a0aa6d2d Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 18:33:29 +0000 Subject: fixed some service correlation --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index df60a77..d61db3b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -174,7 +174,7 @@ class munin::client::gentoo class munin::client::centos { $script_path_default = "/usr/share/munin/plugins" - package { 'munin': + package { 'munin-node': ensure => present, } -- cgit v1.2.3 From 4fb0b2fa23bc1aa4e1eaf34cff6b2fa17653e3f1 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 18:59:21 +0000 Subject: tippfehler git-svn-id: https://svn/ipuppet/trunk/modules/munin@710 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index d61db3b..d0f793e 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,7 +134,7 @@ class munin::client::gentoo $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" package { 'munin': - alias => 'munin-node' + alias => 'munin-node', ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', -- cgit v1.2.3 From 6764bd14ef940c0126b1f403525dc36a538d28dc Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 18:59:21 +0000 Subject: tippfehler --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index d61db3b..d0f793e 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,7 +134,7 @@ class munin::client::gentoo $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" package { 'munin': - alias => 'munin-node' + alias => 'munin-node', ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', -- cgit v1.2.3 From 07415f2506af67e05d83d04979f4e8f2d3fc1a1b Mon Sep 17 00:00:00 2001 From: am Date: Fri, 1 Feb 2008 19:06:03 +0000 Subject: test git-svn-id: https://svn/ipuppet/trunk/modules/munin@712 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index d0f793e..71f86fa 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,7 +134,7 @@ class munin::client::gentoo $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" package { 'munin': - alias => 'munin-node', + alias => munin-node, ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', -- cgit v1.2.3 From 798813916cf38cbc7d8eaded019b37acab99415c Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 1 Feb 2008 19:06:03 +0000 Subject: test --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index d0f793e..71f86fa 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,7 +134,7 @@ class munin::client::gentoo $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" package { 'munin': - alias => 'munin-node', + alias => munin-node, ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', -- cgit v1.2.3 From b3a600ad26a21e446d528a93ff03d3ca9dfb66c1 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 19:11:06 +0000 Subject: fixed service problem git-svn-id: https://svn/ipuppet/trunk/modules/munin@713 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 71f86fa..17ad207 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -164,7 +164,7 @@ class munin::client::gentoo # notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } @@ -189,7 +189,7 @@ class munin::client::centos # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin-node"], - notify => Service["munin"], + notify => Service["munin-node"], } service { "munin-node": -- cgit v1.2.3 From 5049f21501bbdda4a448cae66845bba603e47e03 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 1 Feb 2008 19:11:06 +0000 Subject: fixed service problem --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 71f86fa..17ad207 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -164,7 +164,7 @@ class munin::client::gentoo # notify => Service["munin"], } - service { "munin": + service { "munin-node": ensure => running, } @@ -189,7 +189,7 @@ class munin::client::centos # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin-node"], - notify => Service["munin"], + notify => Service["munin-node"], } service { "munin-node": -- cgit v1.2.3 From fd7b356081ce48f9b882610fe06f17cd4762c3c7 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 2 Feb 2008 00:33:47 +0000 Subject: fixed language problem, added need package by debian git-svn-id: https://svn/ipuppet/trunk/modules/munin@734 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 17ad207..7dcbbe1 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -103,6 +103,8 @@ class munin::client::debian $script_path_default = "/usr/share/munin/plugins" package { "munin-node": ensure => installed } + # the plugin will need that + package { "iproute": ensure => installed } file { "/etc/munin/": -- cgit v1.2.3 From 3ff86b597015cedc9a53abd95781ab2d1f3eb4ab Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 2 Feb 2008 00:33:47 +0000 Subject: fixed language problem, added need package by debian --- manifests/client.pp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 17ad207..7dcbbe1 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -103,6 +103,8 @@ class munin::client::debian $script_path_default = "/usr/share/munin/plugins" package { "munin-node": ensure => installed } + # the plugin will need that + package { "iproute": ensure => installed } file { "/etc/munin/": -- 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/client.pp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 7dcbbe1..ba59333 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -100,8 +100,6 @@ class munin::client::darwin class munin::client::debian { - $script_path_default = "/usr/share/munin/plugins" - package { "munin-node": ensure => installed } # the plugin will need that package { "iproute": ensure => installed } @@ -133,10 +131,10 @@ class munin::client::debian class munin::client::gentoo { - $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" - package { 'munin': - alias => munin-node, + package { 'munin-node': + name => 'munin', + alias => 'munin-node', ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', @@ -144,15 +142,6 @@ class munin::client::gentoo }, } - # link - # mh: really needed? -# file{ -# "/etc/init.d/munin": -# ensure => "/etc/init.d/munin-node", -# } - - - file { "/etc/munin/": ensure => directory, @@ -175,7 +164,6 @@ class munin::client::gentoo class munin::client::centos { - $script_path_default = "/usr/share/munin/plugins" package { 'munin-node': ensure => present, } -- 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/client.pp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 7dcbbe1..ba59333 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -100,8 +100,6 @@ class munin::client::darwin class munin::client::debian { - $script_path_default = "/usr/share/munin/plugins" - package { "munin-node": ensure => installed } # the plugin will need that package { "iproute": ensure => installed } @@ -133,10 +131,10 @@ class munin::client::debian class munin::client::gentoo { - $script_path_default = "/usr/libexec/munin/plugins" $acpi_available = "absent" - package { 'munin': - alias => munin-node, + package { 'munin-node': + name => 'munin', + alias => 'munin-node', ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', @@ -144,15 +142,6 @@ class munin::client::gentoo }, } - # link - # mh: really needed? -# file{ -# "/etc/init.d/munin": -# ensure => "/etc/init.d/munin-node", -# } - - - file { "/etc/munin/": ensure => directory, @@ -175,7 +164,6 @@ class munin::client::gentoo class munin::client::centos { - $script_path_default = "/usr/share/munin/plugins" package { 'munin-node': ensure => present, } -- cgit v1.2.3 From f0b680075d3106efc0a04c8fd3a5d5f05dbe82e6 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Feb 2008 20:39:54 +0000 Subject: fixed double package problem git-svn-id: https://svn/ipuppet/trunk/modules/munin@765 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index ba59333..13f3e09 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,7 +134,6 @@ class munin::client::gentoo $acpi_available = "absent" package { 'munin-node': name => 'munin', - alias => 'munin-node', ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', -- cgit v1.2.3 From 047a55a85be261881b7709fe243633ac533f43d8 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Feb 2008 20:39:54 +0000 Subject: fixed double package problem --- manifests/client.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index ba59333..13f3e09 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -134,7 +134,6 @@ class munin::client::gentoo $acpi_available = "absent" package { 'munin-node': name => 'munin', - alias => 'munin-node', ensure => present, category => $operatingsystem ? { gentoo => 'net-analyzer', -- 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/client.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 13f3e09..0a65418 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -39,9 +39,6 @@ class munin::client { guest: { include munin::plugins::vserver } default: { include munin::plugins::linux - case $virtual { - xen0: { include munin::plugins::dom0 } - } } } } @@ -49,6 +46,11 @@ class munin::client { err( "Don't know which munin plugins to install for $kernel" ) } } + case $virtual { + physical: { munin::plugins::physical } + xen0: { include munin::plugins::dom0 } + xenu: { include munin::plugins::domU } + } } -- 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/client.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 13f3e09..0a65418 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -39,9 +39,6 @@ class munin::client { guest: { include munin::plugins::vserver } default: { include munin::plugins::linux - case $virtual { - xen0: { include munin::plugins::dom0 } - } } } } @@ -49,6 +46,11 @@ class munin::client { err( "Don't know which munin plugins to install for $kernel" ) } } + case $virtual { + physical: { munin::plugins::physical } + xen0: { include munin::plugins::dom0 } + xenu: { include munin::plugins::domU } + } } -- cgit v1.2.3 From 1804eec4a2d9d99964373595da00349adc869cac Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 21 Mar 2008 15:57:06 +0000 Subject: fixed typo git-svn-id: https://svn/ipuppet/trunk/modules/munin@1082 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 0a65418..dbf175a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -47,7 +47,7 @@ class munin::client { } } case $virtual { - physical: { munin::plugins::physical } + physical: { include munin::plugins::physical } xen0: { include munin::plugins::dom0 } xenu: { include munin::plugins::domU } } -- cgit v1.2.3 From 2601cf24698507d2be6e75923b58f8fb40ed2985 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 21 Mar 2008 15:57:06 +0000 Subject: fixed typo --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 0a65418..dbf175a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -47,7 +47,7 @@ class munin::client { } } case $virtual { - physical: { munin::plugins::physical } + physical: { include munin::plugins::physical } xen0: { include munin::plugins::dom0 } xenu: { include munin::plugins::domU } } -- cgit v1.2.3 From a969b61bab854b4c4a9bb7f216073dd426514f73 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 29 Mar 2008 14:47:43 +0000 Subject: merged munin-module with davids git-svn-id: https://svn/ipuppet/trunk/modules/munin@1143 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index dbf175a..c81e6f4 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -74,6 +74,7 @@ define munin::register_snmp() @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", ensure => present, content => template("munin/snmpclient.erb"), + tag => 'munin', } } -- cgit v1.2.3 From 2051940e6d88d1c7d04df289c0d4873c04dbe020 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 29 Mar 2008 14:47:43 +0000 Subject: merged munin-module with davids --- manifests/client.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index dbf175a..c81e6f4 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -74,6 +74,7 @@ define munin::register_snmp() @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", ensure => present, content => template("munin/snmpclient.erb"), + tag => 'munin', } } -- 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/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index c81e6f4..8181845 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -66,6 +66,7 @@ define munin::register() @@file { "${NODESDIR}/${name}_${munin_port_real}": ensure => present, content => template("munin/defaultclient.erb"), + tag => 'munin', } } @@ -129,7 +130,7 @@ class munin::client::debian munin::register { $fqdn: } # workaround bug in munin_node_configure - plugin { "postfix_mailvolume": ensure => absent } + munin::plugin { "postfix_mailvolume": ensure => absent } } class munin::client::gentoo -- 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/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index c81e6f4..8181845 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -66,6 +66,7 @@ define munin::register() @@file { "${NODESDIR}/${name}_${munin_port_real}": ensure => present, content => template("munin/defaultclient.erb"), + tag => 'munin', } } @@ -129,7 +130,7 @@ class munin::client::debian munin::register { $fqdn: } # workaround bug in munin_node_configure - plugin { "postfix_mailvolume": ensure => absent } + munin::plugin { "postfix_mailvolume": ensure => absent } } class munin::client::gentoo -- 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/client.pp | 168 ++++++++++++++-------------------------------------- 1 file changed, 46 insertions(+), 122 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 8181845..69e9f2e 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -11,47 +11,14 @@ class munin::client { default => $munin_host } - case $operatingsystem { - darwin: { include munin::client::darwin } - debian: { - include munin::client::debian - include munin::plugins::debian - } - ubuntu: { - info ( "Trying to configure Ubuntu's munin with Debian class" ) - include munin::client::debian - include munin::plugins::debian - } - gentoo: { - include munin::client::gentoo - include munin::plugins::gentoo - } - centos: { - include munin::client::centos - include munin::plugins::centos - } - default: { fail ("Don't know how to handle munin on $operatingsystem") } - } - - case $kernel { - linux: { - case $vserver { - guest: { include munin::plugins::vserver } - default: { - include munin::plugins::linux - } - } - } - default: { - err( "Don't know which munin plugins to install for $kernel" ) - } - } - case $virtual { - physical: { include munin::plugins::physical } - xen0: { include munin::plugins::dom0 } - xenu: { include munin::plugins::domU } + case $operatingsystem { + darwin: { include munin::client::darwin } + debian: { include munin::client::debian } + ubuntu: { include munin::client::ubuntu } + centos: { include munin::client::centos } + gentoo: { include munin::client::gentoo } + default: { include munin::client::base } } - } define munin::register() @@ -66,7 +33,7 @@ define munin::register() @@file { "${NODESDIR}/${name}_${munin_port_real}": ensure => present, content => template("munin/defaultclient.erb"), - tag => 'munin', + tag => 'munin', } } @@ -75,12 +42,34 @@ define munin::register_snmp() @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", ensure => present, content => template("munin/snmpclient.erb"), - tag => 'munin', + tag => 'munin', } } -class munin::client::darwin -{ +class munin::client::base { + package { "munin-node": ensure => installed } + service { "munin-node": + ensure => running, + hasstatus => true, + hasrestart => true, + require => Package[munin-node], + } + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => 0; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.$operatingsystem.$lsbdistrelease"), + mode => 0644, owner => root, group => 0, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin-node"], + } + munin::register { $fqdn: } + include munin::plugins::base +} + +class munin::client::darwin { file { "/usr/share/snmp/snmpd.conf": mode => 744, content => template("munin/darwin_snmpd.conf.erb"), @@ -102,95 +91,30 @@ class munin::client::darwin munin::register_snmp { $fqdn: } } -class munin::client::debian -{ - package { "munin-node": ensure => installed } +class munin::client::debian inherits munin::client::base { # the plugin will need that package { "iproute": ensure => installed } - file { - "/etc/munin/": - ensure => directory, - mode => 0755, owner => root, group => 0; - "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.${operatingsystem}.${lsbdistcodename}"), - mode => 0644, owner => root, group => 0, - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package["munin-node"], - notify => Service["munin-node"], - } - - service { "munin-node": - ensure => running, + Service["munin-node"]{ # sarge's munin-node init script has no status hasstatus => $lsbdistcodename ? { sarge => false, default => true } } - - munin::register { $fqdn: } - # workaround bug in munin_node_configure - munin::plugin { "postfix_mailvolume": ensure => absent } + plugin { "postfix_mailvolume": ensure => absent } + include munin::plugins::debian } -class munin::client::gentoo -{ - $acpi_available = "absent" - package { 'munin-node': - name => 'munin', - ensure => present, - category => $operatingsystem ? { - gentoo => 'net-analyzer', - default => '', - }, - } - - file { - "/etc/munin/": - ensure => directory, - mode => 0755, owner => root, group => 0; - "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.Gentoo."), - mode => 0644, owner => root, group => 0, - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package["munin-node"], - # notify => Service["munin"], - } - - service { "munin-node": - ensure => running, - } - - munin::register { $fqdn: } -} +class munin::client::ubuntu inherits munin::client::debian {} -class munin::client::centos -{ - package { 'munin-node': - ensure => present, +class munin::client::gentoo inherits munin::client::base { + Package['munin-node'] { + name => 'munin', + category => 'net-analyzer', } - - file { - "/etc/munin/": - ensure => directory, - mode => 0755, owner => root, group =>0; - "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.CentOS."), - mode => 0644, owner => root, group => 0, - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package["munin-node"], - notify => Service["munin-node"], - } - - service { "munin-node": - ensure => running, - } - - munin::register { $fqdn: } - + include munin::plugins::gentoo } - +class munin::client::centos inherits munin::client::base { + include munin::plugins::centos +} -- 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/client.pp | 168 ++++++++++++++-------------------------------------- 1 file changed, 46 insertions(+), 122 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 8181845..69e9f2e 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -11,47 +11,14 @@ class munin::client { default => $munin_host } - case $operatingsystem { - darwin: { include munin::client::darwin } - debian: { - include munin::client::debian - include munin::plugins::debian - } - ubuntu: { - info ( "Trying to configure Ubuntu's munin with Debian class" ) - include munin::client::debian - include munin::plugins::debian - } - gentoo: { - include munin::client::gentoo - include munin::plugins::gentoo - } - centos: { - include munin::client::centos - include munin::plugins::centos - } - default: { fail ("Don't know how to handle munin on $operatingsystem") } - } - - case $kernel { - linux: { - case $vserver { - guest: { include munin::plugins::vserver } - default: { - include munin::plugins::linux - } - } - } - default: { - err( "Don't know which munin plugins to install for $kernel" ) - } - } - case $virtual { - physical: { include munin::plugins::physical } - xen0: { include munin::plugins::dom0 } - xenu: { include munin::plugins::domU } + case $operatingsystem { + darwin: { include munin::client::darwin } + debian: { include munin::client::debian } + ubuntu: { include munin::client::ubuntu } + centos: { include munin::client::centos } + gentoo: { include munin::client::gentoo } + default: { include munin::client::base } } - } define munin::register() @@ -66,7 +33,7 @@ define munin::register() @@file { "${NODESDIR}/${name}_${munin_port_real}": ensure => present, content => template("munin/defaultclient.erb"), - tag => 'munin', + tag => 'munin', } } @@ -75,12 +42,34 @@ define munin::register_snmp() @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", ensure => present, content => template("munin/snmpclient.erb"), - tag => 'munin', + tag => 'munin', } } -class munin::client::darwin -{ +class munin::client::base { + package { "munin-node": ensure => installed } + service { "munin-node": + ensure => running, + hasstatus => true, + hasrestart => true, + require => Package[munin-node], + } + file { + "/etc/munin/": + ensure => directory, + mode => 0755, owner => root, group => 0; + "/etc/munin/munin-node.conf": + content => template("munin/munin-node.conf.$operatingsystem.$lsbdistrelease"), + mode => 0644, owner => root, group => 0, + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package["munin-node"], + } + munin::register { $fqdn: } + include munin::plugins::base +} + +class munin::client::darwin { file { "/usr/share/snmp/snmpd.conf": mode => 744, content => template("munin/darwin_snmpd.conf.erb"), @@ -102,95 +91,30 @@ class munin::client::darwin munin::register_snmp { $fqdn: } } -class munin::client::debian -{ - package { "munin-node": ensure => installed } +class munin::client::debian inherits munin::client::base { # the plugin will need that package { "iproute": ensure => installed } - file { - "/etc/munin/": - ensure => directory, - mode => 0755, owner => root, group => 0; - "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.${operatingsystem}.${lsbdistcodename}"), - mode => 0644, owner => root, group => 0, - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package["munin-node"], - notify => Service["munin-node"], - } - - service { "munin-node": - ensure => running, + Service["munin-node"]{ # sarge's munin-node init script has no status hasstatus => $lsbdistcodename ? { sarge => false, default => true } } - - munin::register { $fqdn: } - # workaround bug in munin_node_configure - munin::plugin { "postfix_mailvolume": ensure => absent } + plugin { "postfix_mailvolume": ensure => absent } + include munin::plugins::debian } -class munin::client::gentoo -{ - $acpi_available = "absent" - package { 'munin-node': - name => 'munin', - ensure => present, - category => $operatingsystem ? { - gentoo => 'net-analyzer', - default => '', - }, - } - - file { - "/etc/munin/": - ensure => directory, - mode => 0755, owner => root, group => 0; - "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.Gentoo."), - mode => 0644, owner => root, group => 0, - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package["munin-node"], - # notify => Service["munin"], - } - - service { "munin-node": - ensure => running, - } - - munin::register { $fqdn: } -} +class munin::client::ubuntu inherits munin::client::debian {} -class munin::client::centos -{ - package { 'munin-node': - ensure => present, +class munin::client::gentoo inherits munin::client::base { + Package['munin-node'] { + name => 'munin', + category => 'net-analyzer', } - - file { - "/etc/munin/": - ensure => directory, - mode => 0755, owner => root, group =>0; - "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.CentOS."), - mode => 0644, owner => root, group => 0, - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package["munin-node"], - notify => Service["munin-node"], - } - - service { "munin-node": - ensure => running, - } - - munin::register { $fqdn: } - + include munin::plugins::gentoo } - +class munin::client::centos inherits munin::client::base { + include munin::plugins::centos +} -- cgit v1.2.3 From 3b9dff3584c98fe8e2754fe91204748853e84d84 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 14:35:15 +0000 Subject: refixed template path git-svn-id: https://svn/ipuppet/trunk/modules/munin@1257 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 69e9f2e..39d9a15 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -59,7 +59,7 @@ class munin::client::base { ensure => directory, mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.$operatingsystem.$lsbdistrelease"), + content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! -- cgit v1.2.3 From 9fbcc8b4c693585f042ede9c4a99f147155a9218 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 14:35:15 +0000 Subject: refixed template path --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 69e9f2e..39d9a15 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -59,7 +59,7 @@ class munin::client::base { ensure => directory, mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.$operatingsystem.$lsbdistrelease"), + content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! -- cgit v1.2.3 From 540d97e640a7b1415cdaffae922a5253f0e3790d Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 15:03:26 +0000 Subject: fixed munin-conf on gentoo git-svn-id: https://svn/ipuppet/trunk/modules/munin@1258 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 39d9a15..08fc3ba 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -111,6 +111,9 @@ class munin::client::gentoo inherits munin::client::base { name => 'munin', category => 'net-analyzer', } + File["/etc/munin/munin-node.conf"]{ + content => template("munin/munin-node.conf.$operatingsystem"), + } include munin::plugins::gentoo } -- cgit v1.2.3 From c2fc3aa408e66fe0848fef1a40d5d4f57364f331 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 24 Apr 2008 15:03:26 +0000 Subject: fixed munin-conf on gentoo --- manifests/client.pp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 39d9a15..08fc3ba 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -111,6 +111,9 @@ class munin::client::gentoo inherits munin::client::base { name => 'munin', category => 'net-analyzer', } + File["/etc/munin/munin-node.conf"]{ + content => template("munin/munin-node.conf.$operatingsystem"), + } include munin::plugins::gentoo } -- cgit v1.2.3 From 6bc29ac288bcc25dec161a96679f1ac872f11837 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 10:43:41 +0000 Subject: another try to fix this problem git-svn-id: https://svn/ipuppet/trunk/modules/munin@1261 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 08fc3ba..2208b8d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -59,7 +59,7 @@ class munin::client::base { ensure => directory, mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), + content => template("munin/munin-node.conf.$operatingsystem"), mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! @@ -99,6 +99,9 @@ class munin::client::debian inherits munin::client::base { # sarge's munin-node init script has no status hasstatus => $lsbdistcodename ? { sarge => false, default => true } } + File["/etc/munin/munin-node.conf"]{ + content => template("munin/munin-node.conf.$operatingsystem"), + } # workaround bug in munin_node_configure plugin { "postfix_mailvolume": ensure => absent } include munin::plugins::debian @@ -111,9 +114,7 @@ class munin::client::gentoo inherits munin::client::base { name => 'munin', category => 'net-analyzer', } - File["/etc/munin/munin-node.conf"]{ - content => template("munin/munin-node.conf.$operatingsystem"), - } + include munin::plugins::gentoo } -- cgit v1.2.3 From 214e5d1a774dfa2e1c4745677f0cfce928c6167d Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 10:43:41 +0000 Subject: another try to fix this problem --- manifests/client.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 08fc3ba..2208b8d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -59,7 +59,7 @@ class munin::client::base { ensure => directory, mode => 0755, owner => root, group => 0; "/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), + content => template("munin/munin-node.conf.$operatingsystem"), mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! @@ -99,6 +99,9 @@ class munin::client::debian inherits munin::client::base { # sarge's munin-node init script has no status hasstatus => $lsbdistcodename ? { sarge => false, default => true } } + File["/etc/munin/munin-node.conf"]{ + content => template("munin/munin-node.conf.$operatingsystem"), + } # workaround bug in munin_node_configure plugin { "postfix_mailvolume": ensure => absent } include munin::plugins::debian @@ -111,9 +114,7 @@ class munin::client::gentoo inherits munin::client::base { name => 'munin', category => 'net-analyzer', } - File["/etc/munin/munin-node.conf"]{ - content => template("munin/munin-node.conf.$operatingsystem"), - } + include munin::plugins::gentoo } -- cgit v1.2.3 From 561b770f24a688842bfad68143826aefd8ab1fd0 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 11:03:45 +0000 Subject: forgot lsbdistcodename in debian git-svn-id: https://svn/ipuppet/trunk/modules/munin@1262 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 2208b8d..b2bad8b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -1,6 +1,7 @@ # client.pp - configure a munin node # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. +# Adapted and improved by admin(at)immerda.ch class munin::client { @@ -100,7 +101,7 @@ class munin::client::debian inherits munin::client::base { hasstatus => $lsbdistcodename ? { sarge => false, default => true } } File["/etc/munin/munin-node.conf"]{ - content => template("munin/munin-node.conf.$operatingsystem"), + content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), } # workaround bug in munin_node_configure plugin { "postfix_mailvolume": ensure => absent } -- cgit v1.2.3 From b1bdb26fa56b10e78c28f7855a7e978fb1998cf6 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 11:03:45 +0000 Subject: forgot lsbdistcodename in debian --- manifests/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 2208b8d..b2bad8b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -1,6 +1,7 @@ # client.pp - configure a munin node # Copyright (C) 2007 David Schmitt # See LICENSE for the full license granted to you. +# Adapted and improved by admin(at)immerda.ch class munin::client { @@ -100,7 +101,7 @@ class munin::client::debian inherits munin::client::base { hasstatus => $lsbdistcodename ? { sarge => false, default => true } } File["/etc/munin/munin-node.conf"]{ - content => template("munin/munin-node.conf.$operatingsystem"), + content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), } # workaround bug in munin_node_configure plugin { "postfix_mailvolume": ensure => absent } -- cgit v1.2.3 From e80b4c9f2aff54318f2f3338ef23b73a3a40a58c Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 11:37:59 +0000 Subject: antoher try to fix the problem git-svn-id: https://svn/ipuppet/trunk/modules/munin@1264 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index b2bad8b..8305bf0 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -55,11 +55,11 @@ class munin::client::base { hasrestart => true, require => Package[munin-node], } - file { - "/etc/munin/": + file {"/etc/munin/": ensure => directory, mode => 0755, owner => root, group => 0; - "/etc/munin/munin-node.conf": + } + file {"/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.$operatingsystem"), mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can -- cgit v1.2.3 From c9191ce64fe7b60fe42cfe872fcbbf3fe436d3b9 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 11:37:59 +0000 Subject: antoher try to fix the problem --- manifests/client.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index b2bad8b..8305bf0 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -55,11 +55,11 @@ class munin::client::base { hasrestart => true, require => Package[munin-node], } - file { - "/etc/munin/": + file {"/etc/munin/": ensure => directory, mode => 0755, owner => root, group => 0; - "/etc/munin/munin-node.conf": + } + file {"/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.$operatingsystem"), mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can -- 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/client.pp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 8305bf0..59b6980 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -51,6 +51,7 @@ class munin::client::base { package { "munin-node": ensure => installed } service { "munin-node": ensure => running, + enable => true, hasstatus => true, hasrestart => true, require => Package[munin-node], @@ -59,6 +60,10 @@ class munin::client::base { ensure => directory, mode => 0755, owner => root, group => 0; } + $real_munin_allow = $munin_allow ? { + '' => '127.0.0.1', + default => $munin_allow + } file {"/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.$operatingsystem"), mode => 0644, owner => root, group => 0, -- 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/client.pp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 8305bf0..59b6980 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -51,6 +51,7 @@ class munin::client::base { package { "munin-node": ensure => installed } service { "munin-node": ensure => running, + enable => true, hasstatus => true, hasrestart => true, require => Package[munin-node], @@ -59,6 +60,10 @@ class munin::client::base { ensure => directory, mode => 0755, owner => root, group => 0; } + $real_munin_allow = $munin_allow ? { + '' => '127.0.0.1', + default => $munin_allow + } file {"/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.$operatingsystem"), mode => 0644, owner => root, group => 0, -- cgit v1.2.3 From 12f797a7968d5adc27de20c6651a56594fb4fa36 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 8 Jul 2008 18:41:50 +0000 Subject: if the munin node config file is changed it should notify the service git-svn-id: https://svn/ipuppet/trunk/modules/munin@1777 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 59b6980..9a7b772 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -66,10 +66,11 @@ class munin::client::base { } file {"/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.$operatingsystem"), - mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin-node"], + notify => Service['munin-node'], + mode => 0644, owner => root, group => 0, } munin::register { $fqdn: } include munin::plugins::base -- cgit v1.2.3 From 6db2a3fbbb42df462d8c9752fd13c11ee3a7a6d1 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 8 Jul 2008 18:41:50 +0000 Subject: if the munin node config file is changed it should notify the service --- manifests/client.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 59b6980..9a7b772 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -66,10 +66,11 @@ class munin::client::base { } file {"/etc/munin/munin-node.conf": content => template("munin/munin-node.conf.$operatingsystem"), - mode => 0644, owner => root, group => 0, # this has to be installed before the package, so the postinst can # boot the munin-node without failure! before => Package["munin-node"], + notify => Service['munin-node'], + mode => 0644, owner => root, group => 0, } munin::register { $fqdn: } include munin::plugins::base -- 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/client.pp | 79 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 18 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 9a7b772..b9e0c0a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -13,9 +13,9 @@ class munin::client { } case $operatingsystem { + openbsd: { include munin::client::openbsd } darwin: { include munin::client::darwin } - debian: { include munin::client::debian } - ubuntu: { include munin::client::ubuntu } + debian,ubuntu: { include munin::client::debian } centos: { include munin::client::centos } gentoo: { include munin::client::gentoo } default: { include munin::client::base } @@ -48,15 +48,13 @@ define munin::register_snmp() } class munin::client::base { - package { "munin-node": ensure => installed } - service { "munin-node": + service { 'munin-node': ensure => running, enable => true, hasstatus => true, hasrestart => true, - require => Package[munin-node], } - file {"/etc/munin/": + file {'/etc/munin/': ensure => directory, mode => 0755, owner => root, group => 0; } @@ -64,18 +62,53 @@ class munin::client::base { '' => '127.0.0.1', default => $munin_allow } - file {"/etc/munin/munin-node.conf": - content => template("munin/munin-node.conf.$operatingsystem"), - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package["munin-node"], - notify => Service['munin-node'], - mode => 0644, owner => root, group => 0, + file {'/etc/munin/munin-node.conf': + content => template("munin/munin-node.conf.$operatingsystem"), + notify => Service['munin-node'], + mode => 0644, owner => root, group => 0, } munin::register { $fqdn: } include munin::plugins::base } +# currently we install munin on openbsd by hand +# :( +class munin::openbsd inherits openbsd::base { + file{'/usr/src/munin_openbsd.tar.gz': + source => "puppet://$server/munin/openbsd/package/munin_openbsd.tar.gz", + owner => root, group => 0, mode => 0600; + } + package{ [ 'p5-Compress-Zlib', 'p5-Crypt-SSLeay', 'p5-HTML-Parser', + 'p5-HTML-Tagset', 'p5-HTTP-GHTTP', 'p5-LWP-UserAgent-Determined', + 'p5-Net-SSLeay', 'p5-Net-Server', 'p5-URI', 'p5-libwww', 'pcre', 'curl' ]: + ensure => installed, + before => File['/var/run/munin'], + } + exec{'extract_openbsd': + command => 'tar xzf /usr/src/munin_openbsd.tar.gz', + unless => 'test -d /opt/munin', + require => File['/usr/src/munin_openbsd.tar.gz'], + } + file{'/var/run/munin': + ensure => directory, + require => File['/usr/src/munin_openbsd.tar.gz'], + owner => root, group => 0, mode => 0755; + } + exec{'enable_munin_on_boot': + command => 'echo "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" >> /etc/rc.local', + unless => 'grep -q "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" >> /etc/rc.local', + require => File['/var/run/munin'], + } + Service['munin-node']{ + restart => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`', + stopt => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`', + start => '/opt/munin/sbin/munin-node', + hasstatus => false, + hasrestart => false, + require => File['/var/run/munin'], + } +} + class munin::client::darwin { file { "/usr/share/snmp/snmpd.conf": mode => 744, @@ -98,7 +131,19 @@ class munin::client::darwin { munin::register_snmp { $fqdn: } } -class munin::client::debian inherits munin::client::base { +class munin::client::package inherits munin::client::base { + package { 'munin-node': ensure => installed } + Service['munin-node']{ + require => Package[munin-node], + } + File['/etc/munin/munin-node.conf']{ + # this has to be installed before the package, so the postinst can + # boot the munin-node without failure! + before => Package['munin-node'], + } +} + +class munin::client::debian inherits munin::client::package { # the plugin will need that package { "iproute": ensure => installed } @@ -114,9 +159,7 @@ class munin::client::debian inherits munin::client::base { include munin::plugins::debian } -class munin::client::ubuntu inherits munin::client::debian {} - -class munin::client::gentoo inherits munin::client::base { +class munin::client::gentoo inherits munin::client::package { Package['munin-node'] { name => 'munin', category => 'net-analyzer', @@ -126,6 +169,6 @@ class munin::client::gentoo inherits munin::client::base { include munin::plugins::gentoo } -class munin::client::centos inherits munin::client::base { +class munin::client::centos inherits munin::client::package { include munin::plugins::centos } -- cgit v1.2.3 From 831d0c319031253b05e45e6895f4f0e676b73a6b Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 20:02:37 +0000 Subject: correct naming of classes --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index b9e0c0a..7f784d0 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -73,7 +73,7 @@ class munin::client::base { # currently we install munin on openbsd by hand # :( -class munin::openbsd inherits openbsd::base { +class munin::client::openbsd inherits munin::client::base { file{'/usr/src/munin_openbsd.tar.gz': source => "puppet://$server/munin/openbsd/package/munin_openbsd.tar.gz", owner => root, group => 0, mode => 0600; -- cgit v1.2.3 From 70314baaf955865d34b9563316c9028f8b6ac018 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 20:34:12 +0000 Subject: fix param-name --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 7f784d0..89c7b46 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -101,7 +101,7 @@ class munin::client::openbsd inherits munin::client::base { } Service['munin-node']{ restart => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`', - stopt => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`', + stop => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`', start => '/opt/munin/sbin/munin-node', hasstatus => false, hasrestart => false, -- cgit v1.2.3 From 1e8273a21b504a18ad8066ba6c5b625473ba8b52 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 20:41:18 +0000 Subject: adding an additional order param --- manifests/client.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 89c7b46..39119d3 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -88,6 +88,7 @@ class munin::client::openbsd inherits munin::client::base { command => 'tar xzf /usr/src/munin_openbsd.tar.gz', unless => 'test -d /opt/munin', require => File['/usr/src/munin_openbsd.tar.gz'], + before => File['/var/run/munin'], } file{'/var/run/munin': ensure => directory, -- cgit v1.2.3 From b60f432b6a09d1cb29e65f2ebef4f8564abe6b70 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 20:48:49 +0000 Subject: reorder dependecies --- manifests/client.pp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 39119d3..35ffb23 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -88,16 +88,15 @@ class munin::client::openbsd inherits munin::client::base { command => 'tar xzf /usr/src/munin_openbsd.tar.gz', unless => 'test -d /opt/munin', require => File['/usr/src/munin_openbsd.tar.gz'], - before => File['/var/run/munin'], } file{'/var/run/munin': ensure => directory, - require => File['/usr/src/munin_openbsd.tar.gz'], + require => Exec['extract_openbsd'], owner => root, group => 0, mode => 0755; } exec{'enable_munin_on_boot': command => 'echo "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" >> /etc/rc.local', - unless => 'grep -q "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" >> /etc/rc.local', + unless => 'grep -q "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" /etc/rc.local', require => File['/var/run/munin'], } Service['munin-node']{ -- cgit v1.2.3 From 3c9e214789657bd53c6047523ae6e897cd73a144 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 20:51:19 +0000 Subject: switch to the / dir --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 35ffb23..4d8f0ba 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -85,7 +85,7 @@ class munin::client::openbsd inherits munin::client::base { before => File['/var/run/munin'], } exec{'extract_openbsd': - command => 'tar xzf /usr/src/munin_openbsd.tar.gz', + command => 'cd /;tar xzf /usr/src/munin_openbsd.tar.gz', unless => 'test -d /opt/munin', require => File['/usr/src/munin_openbsd.tar.gz'], } -- cgit v1.2.3 From c919dd6dd636c8fff4260b26c5d3422a67e8531b Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 20:54:23 +0000 Subject: log directory also needs to be created --- manifests/client.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 4d8f0ba..86babaa 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -89,7 +89,7 @@ class munin::client::openbsd inherits munin::client::base { unless => 'test -d /opt/munin', require => File['/usr/src/munin_openbsd.tar.gz'], } - file{'/var/run/munin': + file{[ '/var/run/munin', '/var/log/munin' ]: ensure => directory, require => Exec['extract_openbsd'], owner => root, group => 0, mode => 0755; @@ -105,7 +105,7 @@ class munin::client::openbsd inherits munin::client::base { start => '/opt/munin/sbin/munin-node', hasstatus => false, hasrestart => false, - require => File['/var/run/munin'], + require => [ File['/var/run/munin'], File['/var/log/munin'] ], } } -- cgit v1.2.3 From 800018f6422ad792191a1109c552fc52f87ea3df Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 21:57:15 +0000 Subject: fix rc.local adding, simplify the grep -> more errors possible, less tricky --- manifests/client.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 86babaa..dcec13e 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -96,7 +96,7 @@ class munin::client::openbsd inherits munin::client::base { } exec{'enable_munin_on_boot': command => 'echo "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" >> /etc/rc.local', - unless => 'grep -q "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" /etc/rc.local', + unless => 'grep -q "munin-node" /etc/rc.local', require => File['/var/run/munin'], } Service['munin-node']{ -- cgit v1.2.3 From 1a6afef5c71eb98ec357163c1e345d10ee731acc Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 1 Oct 2008 22:20:36 +0000 Subject: use new unified adding cmd --- manifests/client.pp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index dcec13e..db5587f 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -71,7 +71,7 @@ class munin::client::base { include munin::plugins::base } -# currently we install munin on openbsd by hand +# currently we install munin on openbsd by targz # :( class munin::client::openbsd inherits munin::client::base { file{'/usr/src/munin_openbsd.tar.gz': @@ -94,9 +94,8 @@ class munin::client::openbsd inherits munin::client::base { require => Exec['extract_openbsd'], owner => root, group => 0, mode => 0755; } - exec{'enable_munin_on_boot': - command => 'echo "if [ -x /opt/munin/sbin/munin-node ]; then echo -n \' munin\'; /opt/munin/sbin/munin-node; fi" >> /etc/rc.local', - unless => 'grep -q "munin-node" /etc/rc.local', + openbsd::add_to_rc_local{'munin-node': + binary => '/opt/munin/sbin/munin-node', require => File['/var/run/munin'], } Service['munin-node']{ -- cgit v1.2.3 From 955947ce7db6d7f6a1a3b3ac53ca0932b28d1dac Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 2 Mar 2009 22:55:10 +0000 Subject: added munin logfile cleanup cron --- manifests/client.pp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index db5587f..c59369b 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -106,6 +106,13 @@ class munin::client::openbsd inherits munin::client::base { hasrestart => false, require => [ File['/var/run/munin'], File['/var/log/munin'] ], } + + cron{'clean_munin_logfile': + command => 'rm /var/log/munin/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`', + minute => 0, + hour => 2, + weekday => 0, + } } class munin::client::darwin { -- cgit v1.2.3 From ac4b2be1fac6ec7893a166fec0a065fb943c8e5f Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 12:00:48 +0200 Subject: finally implemented snmp client --- manifests/client.pp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 9a7b772..f2046fb 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -38,13 +38,27 @@ define munin::register() } } -define munin::register_snmp() +# snmp_testplugin: the plugin we use to test if it's set +define munin::register_snmp( + $snmpd_testplugin = 'load' +) { - @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", - ensure => present, - content => template("munin/snmpclient.erb"), - tag => 'munin', - } + $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } + $munin_host_real = $munin_host ? { + '' => '*', + 'fqdn' => '*', + default => $munin_host + } + exec{"register_snmp_munin_for_${name}": + command => "munin-node-configure-snmp ${name} | sh", + unless => "test -e /etc/munin/plugins/snmp_${name}_${snmpd_testplugin}", + } + @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", + ensure => present, + content => template("munin/snmpclient.erb"), + require => Exec["register_snmp_munin_for_${name}"], + tag => 'munin', + } } class munin::client::base { -- cgit v1.2.3 From 1a65e541db574c549afccf44796be7489c37d22b Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 17:08:18 +0200 Subject: don't require the exec, as the require is exported as well --- manifests/client.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index f2046fb..4c75757 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -56,7 +56,6 @@ define munin::register_snmp( @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", ensure => present, content => template("munin/snmpclient.erb"), - require => Exec["register_snmp_munin_for_${name}"], tag => 'munin', } } -- cgit v1.2.3 From 6465fd8dca9cf73c625109e1ea78fb53f2d56d50 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 12:00:48 +0200 Subject: finally implemented snmp client --- manifests/client.pp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index c59369b..9524edf 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -38,13 +38,27 @@ define munin::register() } } -define munin::register_snmp() +# snmp_testplugin: the plugin we use to test if it's set +define munin::register_snmp( + $snmpd_testplugin = 'load' +) { - @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", - ensure => present, - content => template("munin/snmpclient.erb"), - tag => 'munin', - } + $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } + $munin_host_real = $munin_host ? { + '' => '*', + 'fqdn' => '*', + default => $munin_host + } + exec{"register_snmp_munin_for_${name}": + command => "munin-node-configure-snmp ${name} | sh", + unless => "test -e /etc/munin/plugins/snmp_${name}_${snmpd_testplugin}", + } + @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", + ensure => present, + content => template("munin/snmpclient.erb"), + require => Exec["register_snmp_munin_for_${name}"], + tag => 'munin', + } } class munin::client::base { -- cgit v1.2.3 From e90b0da899492b8f7c1d60c568cecc3dbdb88cf6 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 15 Apr 2009 17:08:18 +0200 Subject: don't require the exec, as the require is exported as well --- manifests/client.pp | 1 - 1 file changed, 1 deletion(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 9524edf..48d2a22 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -56,7 +56,6 @@ define munin::register_snmp( @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", ensure => present, content => template("munin/snmpclient.erb"), - require => Exec["register_snmp_munin_for_${name}"], tag => 'munin', } } -- cgit v1.2.3 From c63a28d3c16ec2bb3a46d3d5faf6d7ef3b737b70 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 22:22:36 +0200 Subject: add shorewall rules --- manifests/client.pp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index df9ab06..7894e2f 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -20,6 +20,9 @@ class munin::client { gentoo: { include munin::client::gentoo } default: { include munin::client::base } } + if $use_shorewall { + include shorewall::rules::munin + } } define munin::register() -- 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/client.pp | 171 ---------------------------------------------------- 1 file changed, 171 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 7894e2f..bf49f44 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -16,7 +16,6 @@ class munin::client { openbsd: { include munin::client::openbsd } darwin: { include munin::client::darwin } debian,ubuntu: { include munin::client::debian } - centos: { include munin::client::centos } gentoo: { include munin::client::gentoo } default: { include munin::client::base } } @@ -24,173 +23,3 @@ class munin::client { include shorewall::rules::munin } } - -define munin::register() -{ - $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } - $munin_host_real = $munin_host ? { - '' => $fqdn, - 'fqdn' => $fqdn, - default => $munin_host - } - - @@file { "${NODESDIR}/${name}_${munin_port_real}": - ensure => present, - content => template("munin/defaultclient.erb"), - tag => 'munin', - } -} - -# snmp_testplugin: the plugin we use to test if it's set -define munin::register_snmp( - $snmpd_testplugin = 'load' -) -{ - $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } - $munin_host_real = $munin_host ? { - '' => '*', - 'fqdn' => '*', - default => $munin_host - } - exec{"register_snmp_munin_for_${name}": - command => "munin-node-configure-snmp ${name} | sh", - unless => "test -e /etc/munin/plugins/snmp_${name}_${snmpd_testplugin}", - } - @@file { "munin_snmp_${name}": path => "${NODESDIR}/${name}", - ensure => present, - content => template("munin/snmpclient.erb"), - tag => 'munin', - } -} - -class munin::client::base { - service { 'munin-node': - ensure => running, - enable => true, - hasstatus => true, - hasrestart => true, - } - file {'/etc/munin/': - ensure => directory, - mode => 0755, owner => root, group => 0; - } - $real_munin_allow = $munin_allow ? { - '' => '127.0.0.1', - default => $munin_allow - } - file {'/etc/munin/munin-node.conf': - content => template("munin/munin-node.conf.$operatingsystem"), - notify => Service['munin-node'], - mode => 0644, owner => root, group => 0, - } - munin::register { $fqdn: } - include munin::plugins::base -} - -# currently we install munin on openbsd by targz -# :( -class munin::client::openbsd inherits munin::client::base { - file{'/usr/src/munin_openbsd.tar.gz': - source => "puppet://$server/munin/openbsd/package/munin_openbsd.tar.gz", - owner => root, group => 0, mode => 0600; - } - package{ [ 'p5-Compress-Zlib', 'p5-Crypt-SSLeay', 'p5-HTML-Parser', - 'p5-HTML-Tagset', 'p5-HTTP-GHTTP', 'p5-LWP-UserAgent-Determined', - 'p5-Net-SSLeay', 'p5-Net-Server', 'p5-URI', 'p5-libwww', 'pcre', 'curl' ]: - ensure => installed, - before => File['/var/run/munin'], - } - exec{'extract_openbsd': - command => 'cd /;tar xzf /usr/src/munin_openbsd.tar.gz', - unless => 'test -d /opt/munin', - require => File['/usr/src/munin_openbsd.tar.gz'], - } - file{[ '/var/run/munin', '/var/log/munin' ]: - ensure => directory, - require => Exec['extract_openbsd'], - owner => root, group => 0, mode => 0755; - } - openbsd::add_to_rc_local{'munin-node': - binary => '/opt/munin/sbin/munin-node', - require => File['/var/run/munin'], - } - Service['munin-node']{ - restart => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`', - stop => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`', - start => '/opt/munin/sbin/munin-node', - hasstatus => false, - hasrestart => false, - require => [ File['/var/run/munin'], File['/var/log/munin'] ], - } - - cron{'clean_munin_logfile': - command => 'rm /var/log/munin/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`', - minute => 0, - hour => 2, - weekday => 0, - } -} - -class munin::client::darwin { - file { "/usr/share/snmp/snmpd.conf": - mode => 744, - content => template("munin/darwin_snmpd.conf.erb"), - group => 0, - owner => root, - } - delete_matching_line{"startsnmpdno": - file => "/etc/hostconfig", - pattern => "SNMPSERVER=-NO-", - } - line { "startsnmpdyes": - file => "/etc/hostconfig", - line => "SNMPSERVER=-YES-", - notify => Exec["/sbin/SystemStarter start SNMP"], - } - exec{"/sbin/SystemStarter start SNMP": - noop => false, - } - munin::register_snmp { $fqdn: } -} - -class munin::client::package inherits munin::client::base { - package { 'munin-node': ensure => installed } - Service['munin-node']{ - require => Package[munin-node], - } - File['/etc/munin/munin-node.conf']{ - # this has to be installed before the package, so the postinst can - # boot the munin-node without failure! - before => Package['munin-node'], - } -} - -class munin::client::debian inherits munin::client::package { - # the plugin will need that - package { "iproute": ensure => installed } - - Service["munin-node"]{ - # sarge's munin-node init script has no status - hasstatus => $lsbdistcodename ? { sarge => false, default => true } - } - File["/etc/munin/munin-node.conf"]{ - content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), - } - # workaround bug in munin_node_configure - plugin { "postfix_mailvolume": ensure => absent } - include munin::plugins::debian -} - -class munin::client::gentoo inherits munin::client::package { - Package['munin-node'] { - name => 'munin', - category => 'net-analyzer', - } - - - include munin::plugins::gentoo -} - -class munin::client::centos inherits munin::client::package { - include munin::plugins::centos -} -- 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/client.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index bf49f44..d033c28 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -17,6 +17,7 @@ class munin::client { darwin: { include munin::client::darwin } debian,ubuntu: { include munin::client::debian } gentoo: { include munin::client::gentoo } + centos: { include munin::client::package } default: { include munin::client::base } } if $use_shorewall { -- cgit v1.2.3