From 015b7262e4b0bedad9500e982350197160a4ad1d Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Tue, 21 Sep 2010 17:25:49 +0200 Subject: refactor module to the new standard --- manifests/client/openbsd.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/client') diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp index 17abdbf..4c2807c 100644 --- a/manifests/client/openbsd.pp +++ b/manifests/client/openbsd.pp @@ -2,7 +2,7 @@ # :( 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", + source => "puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz", owner => root, group => 0, mode => 0600; } package{ [ 'p5-Compress-Zlib', 'p5-Crypt-SSLeay', 'p5-HTML-Parser', -- cgit v1.2.3 From e27e74f81274d35d3873c6b5b5fa8816138212ed Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Mon, 27 Sep 2010 12:13:10 +0200 Subject: code style for darwin class --- manifests/client/darwin.pp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/darwin.pp b/manifests/client/darwin.pp index f6fc95f..4004f74 100644 --- a/manifests/client/darwin.pp +++ b/manifests/client/darwin.pp @@ -1,21 +1,21 @@ 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: } + 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: } } -- cgit v1.2.3 From 33380e238f3ac37ac79f30485fdebbc5dd10170b Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 5 Aug 2011 10:59:04 +0200 Subject: use correct define --- manifests/client/darwin.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/darwin.pp b/manifests/client/darwin.pp index 4004f74..92787ec 100644 --- a/manifests/client/darwin.pp +++ b/manifests/client/darwin.pp @@ -5,9 +5,10 @@ class munin::client::darwin { group => 0, owner => root, } - delete_matching_line{"startsnmpdno": + line{"startsnmpdno": file => "/etc/hostconfig", - pattern => "SNMPSERVER=-NO-", + line => "SNMPSERVER=-NO-", + ensure => 'absent', } line { "startsnmpdyes": file => "/etc/hostconfig", -- cgit v1.2.3 From 9b161f0c61bbd30960e663eceef8f1b35f633507 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 5 Nov 2011 14:14:32 +0100 Subject: use hiera to configure munin node specific things --- manifests/client/base.pp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 17387e8..6b4bef9 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -1,4 +1,6 @@ -class munin::client::base { +class munin::client::base( + $munin_allow = hiera('munin_allow','127.0.0.1') +) { service { 'munin-node': ensure => running, enable => true, @@ -9,10 +11,6 @@ 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"), notify => Service['munin-node'], -- cgit v1.2.3 From e2dfae5852ecdf3695a6af8ec48092ea24698390 Mon Sep 17 00:00:00 2001 From: "Christian G. Warden" Date: Thu, 2 Feb 2012 18:10:14 -0800 Subject: Fully qualify facter variables --- manifests/client/base.pp | 4 ++-- manifests/client/darwin.pp | 2 +- manifests/client/debian.pp | 4 ++-- manifests/client/openbsd.pp | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 6b4bef9..0c7a62a 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -12,11 +12,11 @@ class munin::client::base( mode => 0755, owner => root, group => 0; } file {'/etc/munin/munin-node.conf': - content => template("munin/munin-node.conf.$operatingsystem"), + content => template("munin/munin-node.conf.${::operatingsystem}"), notify => Service['munin-node'], mode => 0644, owner => root, group => 0, } - munin::register { $fqdn: + munin::register { $::fqdn: config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], } include munin::plugins::base diff --git a/manifests/client/darwin.pp b/manifests/client/darwin.pp index 92787ec..264263d 100644 --- a/manifests/client/darwin.pp +++ b/manifests/client/darwin.pp @@ -18,5 +18,5 @@ class munin::client::darwin { exec{"/sbin/SystemStarter start SNMP": noop => false, } - munin::register::snmp { $fqdn: } + munin::register::snmp { $::fqdn: } } diff --git a/manifests/client/debian.pp b/manifests/client/debian.pp index 97f5fbf..903fb2d 100644 --- a/manifests/client/debian.pp +++ b/manifests/client/debian.pp @@ -4,10 +4,10 @@ class munin::client::debian inherits munin::client::package { Service["munin-node"]{ # sarge's munin-node init script has no status - hasstatus => $lsbdistcodename ? { sarge => false, default => true } + hasstatus => $::lsbdistcodename ? { sarge => false, default => true } } File["/etc/munin/munin-node.conf"]{ - content => template("munin/munin-node.conf.$operatingsystem.$lsbdistcodename"), + content => template("munin/munin-node.conf.${::operatingsystem}.${::lsbdistcodename}"), } # workaround bug in munin_node_configure plugin { "postfix_mailvolume": ensure => absent } diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp index 7012c00..e1742d2 100644 --- a/manifests/client/openbsd.pp +++ b/manifests/client/openbsd.pp @@ -1,7 +1,7 @@ # currently we install munin on openbsd by targz # :( class munin::client::openbsd inherits munin::client::base { - if $operatingsystemrelease == '4.3' { + if $::operatingsystemrelease == '4.3' { file{'/usr/src/munin_openbsd.tar.gz': source => "puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz", owner => root, group => 0, mode => 0600; @@ -32,7 +32,7 @@ class munin::client::openbsd inherits munin::client::base { owner => root, group => 0, mode => 0755; } openbsd::rc_local{'munin-node': - binary => $operatingsystemrelease ? { + binary => $::operatingsystemrelease ? { '4.3' => '/opt/munin/sbin/munin-node', default => '/usr/local/sbin/munin-node' }, @@ -41,7 +41,7 @@ class munin::client::openbsd inherits munin::client::base { 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 => $operatingsystemrelease ? { + start => $::operatingsystemrelease ? { '4.3' => '/opt/munin/sbin/munin-node', default => '/usr/local/sbin/munin-node' }, -- cgit v1.2.3 From 9fd1de5acd9064a0d67ca9d2c13a829a3f628f39 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 19:39:49 -0300 Subject: new style for 2.7 --- manifests/client/base.pp | 38 ++++++++--------- manifests/client/centos.pp | 2 +- manifests/client/debian.pp | 24 +++++------ manifests/client/gentoo.pp | 2 +- manifests/client/openbsd.pp | 102 ++++++++++++++++++++++---------------------- manifests/client/package.pp | 18 ++++---- 6 files changed, 93 insertions(+), 93 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 0c7a62a..80a25c5 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -1,23 +1,23 @@ class munin::client::base( $munin_allow = hiera('munin_allow','127.0.0.1') ) { - service { 'munin-node': - ensure => running, - enable => true, - hasstatus => true, - hasrestart => true, - } - file {'/etc/munin': - ensure => directory, - mode => 0755, 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: - config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], - } - include munin::plugins::base + service { 'munin-node': + ensure => running, + enable => true, + hasstatus => true, + hasrestart => true, + } + file {'/etc/munin': + ensure => directory, + mode => 0755, 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: + config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], + } + include munin::plugins::base } diff --git a/manifests/client/centos.pp b/manifests/client/centos.pp index 42e8c59..3a7151b 100644 --- a/manifests/client/centos.pp +++ b/manifests/client/centos.pp @@ -1,3 +1,3 @@ class munin::client::centos inherits munin::client::package { - include munin::plugins::centos + include munin::plugins::centos } diff --git a/manifests/client/debian.pp b/manifests/client/debian.pp index 903fb2d..e67ac26 100644 --- a/manifests/client/debian.pp +++ b/manifests/client/debian.pp @@ -1,15 +1,15 @@ class munin::client::debian inherits munin::client::package { - # the plugin will need that - package { "iproute": ensure => installed } + # 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 + 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 } diff --git a/manifests/client/gentoo.pp b/manifests/client/gentoo.pp index c24d317..6a01050 100644 --- a/manifests/client/gentoo.pp +++ b/manifests/client/gentoo.pp @@ -4,5 +4,5 @@ class munin::client::gentoo inherits munin::client::package { category => 'net-analyzer', } - include munin::plugins::gentoo + include munin::plugins::gentoo } diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp index e1742d2..88d0640 100644 --- a/manifests/client/openbsd.pp +++ b/manifests/client/openbsd.pp @@ -1,59 +1,59 @@ # currently we install munin on openbsd by targz # :( class munin::client::openbsd inherits munin::client::base { - if $::operatingsystemrelease == '4.3' { - file{'/usr/src/munin_openbsd.tar.gz': - source => "puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz", - owner => root, group => 0, mode => 0600; - } - exec{'extract_openbsd': - command => 'cd /;tar xzf /usr/src/munin_openbsd.tar.gz', - unless => 'test -d /opt/munin', - require => File['/usr/src/munin_openbsd.tar.gz'], - before => File['/var/run/munin'], - } - package{'p5-Compress-Zlib': - ensure => installed, - before => File['/var/run/munin'], - } - } else { - package{'munin-node': - ensure => installed, - } + if $::operatingsystemrelease == '4.3' { + file{'/usr/src/munin_openbsd.tar.gz': + source => "puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz", + owner => root, group => 0, mode => 0600; } - package{ [ 'p5-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'], + before => File['/var/run/munin'], } - file{[ '/var/run/munin', '/var/log/munin' ]: - ensure => directory, - owner => root, group => 0, mode => 0755; + package{'p5-Compress-Zlib': + ensure => installed, + before => File['/var/run/munin'], } - openbsd::rc_local{'munin-node': - binary => $::operatingsystemrelease ? { - '4.3' => '/opt/munin/sbin/munin-node', - default => '/usr/local/sbin/munin-node' - }, - require => File['/var/run/munin'], - } - Service['munin-node']{ - restart => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`', - stop => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`', - start => $::operatingsystemrelease ? { - '4.3' => '/opt/munin/sbin/munin-node', - default => '/usr/local/sbin/munin-node' - }, - status => 'test -e /var/run/munin/munin-node.pid && (ps ax | egrep -q "^$(cat /var/run/munin/munin-node.pid).*munin-node")', - hasstatus => true, - hasrestart => true, - require => [ File['/var/run/munin'], File['/var/log/munin'] ], - } - cron{'clean_munin_logfile': - command => 'rm /var/log/munin/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`', - minute => 0, - hour => 2, - weekday => 0, + } else { + package{'munin-node': + ensure => installed, } + } + package{ [ 'p5-Crypt-SSLeay', 'p5-HTML-Parser', 'p5-HTML-Tagset', 'p5-HTTP-GHTTP', + 'p5-LWP-UserAgent-Determined', 'p5-Net-SSLeay', 'p5-Net-Server', + 'p5-URI', 'p5-libwww', 'pcre', 'curl' ]: + ensure => installed, + before => File['/var/run/munin'], + } + file{[ '/var/run/munin', '/var/log/munin' ]: + ensure => directory, + owner => root, group => 0, mode => 0755; + } + openbsd::rc_local{'munin-node': + binary => $::operatingsystemrelease ? { + '4.3' => '/opt/munin/sbin/munin-node', + default => '/usr/local/sbin/munin-node' + }, + require => File['/var/run/munin'], + } + Service['munin-node']{ + restart => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`', + stop => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`', + start => $::operatingsystemrelease ? { + '4.3' => '/opt/munin/sbin/munin-node', + default => '/usr/local/sbin/munin-node' + }, + status => 'test -e /var/run/munin/munin-node.pid && (ps ax | egrep -q "^$(cat /var/run/munin/munin-node.pid).*munin-node")', + hasstatus => true, + hasrestart => true, + require => [ File['/var/run/munin'], File['/var/log/munin'] ], + } + cron{'clean_munin_logfile': + command => 'rm /var/log/munin/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`', + minute => 0, + hour => 2, + weekday => 0, + } } diff --git a/manifests/client/package.pp b/manifests/client/package.pp index 18566b8..58f40da 100644 --- a/manifests/client/package.pp +++ b/manifests/client/package.pp @@ -1,11 +1,11 @@ class munin::client::package inherits munin::client::base { - package { 'munin-node': ensure => installed } - 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'], - } + 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'], + } } -- cgit v1.2.3 From c95f0b2fcf4f35b1a7ae3ad9c04600a32ab2bb43 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 13 Jun 2012 20:40:57 -0300 Subject: migrate away from hiera stuff --- manifests/client/base.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 80a25c5..1cba47b 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -1,6 +1,4 @@ -class munin::client::base( - $munin_allow = hiera('munin_allow','127.0.0.1') -) { +class munin::client::base { service { 'munin-node': ensure => running, enable => true, @@ -17,6 +15,8 @@ class munin::client::base( mode => 0644, owner => root, group => 0, } munin::register { $::fqdn: + host => $munin::client::host, + port => $munin::client::port, config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], } include munin::plugins::base -- cgit v1.2.3 From 1ca3978ff3094c01a56feaee6c37fc82e3224d15 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 18 Jun 2012 15:40:22 -0300 Subject: if it's * it should be collected by fqdn otherwise directly by what is given to be listened on --- manifests/client/base.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 1cba47b..84ba9b2 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -15,7 +15,10 @@ class munin::client::base { mode => 0644, owner => root, group => 0, } munin::register { $::fqdn: - host => $munin::client::host, + host => $munin::client::host ? { + '*' => $::fqdn, + default => $munin::client::host + }, port => $munin::client::port, config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], } -- cgit v1.2.3 From 864587e318adf0aa7d4a191b596f5b8337faf521 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 7 Dec 2012 16:05:41 +0100 Subject: fix issue if pid is not at the beginning + linting --- manifests/client/openbsd.pp | 46 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp index 88d0640..1852962 100644 --- a/manifests/client/openbsd.pp +++ b/manifests/client/openbsd.pp @@ -3,14 +3,16 @@ class munin::client::openbsd inherits munin::client::base { if $::operatingsystemrelease == '4.3' { file{'/usr/src/munin_openbsd.tar.gz': - source => "puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz", - owner => root, group => 0, mode => 0600; + source => "puppet:///modules/munin/openbsd/package/munin_openbsd.tar.gz", + owner => root, + group => 0, + mode => '0600'; } exec{'extract_openbsd': command => 'cd /;tar xzf /usr/src/munin_openbsd.tar.gz', - unless => 'test -d /opt/munin', + unless => 'test -d /opt/munin', require => File['/usr/src/munin_openbsd.tar.gz'], - before => File['/var/run/munin'], + before => File['/var/run/munin'], } package{'p5-Compress-Zlib': ensure => installed, @@ -28,32 +30,32 @@ class munin::client::openbsd inherits munin::client::base { before => File['/var/run/munin'], } file{[ '/var/run/munin', '/var/log/munin' ]: - ensure => directory, - owner => root, group => 0, mode => 0755; + ensure => directory, + owner => root, + group => 0, + mode => '0755'; + } + $bin_loc = $::operatingsystemrelease ? { + '4.3' => '/opt/munin/sbin/munin-node', + default => '/usr/local/sbin/munin-node' } openbsd::rc_local{'munin-node': - binary => $::operatingsystemrelease ? { - '4.3' => '/opt/munin/sbin/munin-node', - default => '/usr/local/sbin/munin-node' - }, + binary => $bin_loc, 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 => $::operatingsystemrelease ? { - '4.3' => '/opt/munin/sbin/munin-node', - default => '/usr/local/sbin/munin-node' - }, - status => 'test -e /var/run/munin/munin-node.pid && (ps ax | egrep -q "^$(cat /var/run/munin/munin-node.pid).*munin-node")', - hasstatus => true, - hasrestart => true, - require => [ File['/var/run/munin'], File['/var/log/munin'] ], + restart => '/bin/kill -HUP `/bin/cat /var/run/munin/munin-node.pid`', + stop => '/bin/kill `/bin/cat /var/run/munin/munin-node.pid`', + start => $bin_loc, + status => 'test -e /var/run/munin/munin-node.pid && (ps ax | egrep -q "^ *$(cat /var/run/munin/munin-node.pid).*munin-node")', + hasstatus => true, + hasrestart => true, + require => [ File['/var/run/munin'], File['/var/log/munin'] ], } cron{'clean_munin_logfile': command => 'rm /var/log/munin/munin-node.log; kill -HUP `cat /var/run/munin/munin-node.pid`', - minute => 0, - hour => 2, + minute => 0, + hour => 2, weekday => 0, } } -- cgit v1.2.3 From a2004f577c2e15d9b6cf482f0693601f43c43fad Mon Sep 17 00:00:00 2001 From: Markus Heberling Date: Wed, 23 Jan 2013 20:15:52 +0100 Subject: added support for use_ssh for munin 2.0 --- manifests/client/base.pp | 1 + 1 file changed, 1 insertion(+) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 84ba9b2..441198e 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -20,6 +20,7 @@ class munin::client::base { default => $munin::client::host }, port => $munin::client::port, + use_ssh => $munin::client::use_ssh, config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], } include munin::plugins::base -- cgit v1.2.3 From 3b10e0eb3fabb19cc0fa9d66f5a8379ae96aeb6f Mon Sep 17 00:00:00 2001 From: Sander Hoentjen Date: Mon, 18 Mar 2013 14:56:44 +0100 Subject: Add support for specifying tags for exported resources This enables you to specify different servers for different clients. --- manifests/client/base.pp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'manifests/client') diff --git a/manifests/client/base.pp b/manifests/client/base.pp index 441198e..78398a9 100644 --- a/manifests/client/base.pp +++ b/manifests/client/base.pp @@ -15,13 +15,14 @@ class munin::client::base { mode => 0644, owner => root, group => 0, } munin::register { $::fqdn: - host => $munin::client::host ? { - '*' => $::fqdn, - default => $munin::client::host + host => $munin::client::host ? { + '*' => $::fqdn, + default => $munin::client::host }, - port => $munin::client::port, - use_ssh => $munin::client::use_ssh, - config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], + port => $munin::client::port, + use_ssh => $munin::client::use_ssh, + config => [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10'], + export_tag => $munin::client::export_tag, } include munin::plugins::base } -- cgit v1.2.3