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/base.pp') 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 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/client/base.pp') 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 -- 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 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'manifests/client/base.pp') 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 } -- 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/base.pp') 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/base.pp') 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 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/base.pp') 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/base.pp') 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