diff options
author | Micah Anderson <micah@riseup.net> | 2011-01-10 15:35:52 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2011-01-10 15:35:52 -0500 |
commit | 38cad6021d905c893e66eb2fab90e669ccf7087b (patch) | |
tree | fa9796ded3919318e4b6b927abf7041713755744 /manifests | |
parent | 7712633da4e8a2accacde65f1197f5b9bd0252b4 (diff) |
add a $use_munin variable to give a knob to turn on/off munin graphing.
add two new munin graphs for puppetmaster: one to graph the memory usage of the running puppetmasters; and one to graph the average compile time
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/puppetmaster.pp | 4 | ||||
-rw-r--r-- | manifests/puppetmaster/hasdb/mysql.pp | 8 | ||||
-rw-r--r-- | manifests/puppetmaster/munin.pp | 9 |
3 files changed, 18 insertions, 3 deletions
diff --git a/manifests/puppetmaster.pp b/manifests/puppetmaster.pp index 41d8021..4d1960d 100644 --- a/manifests/puppetmaster.pp +++ b/manifests/puppetmaster.pp @@ -42,4 +42,8 @@ class puppet::puppetmaster inherits puppet { if $use_shorewall { include shorewall::rules::puppet::master } + + if $use_munin { + include puppet::puppetmaster::munin + } } diff --git a/manifests/puppetmaster/hasdb/mysql.pp b/manifests/puppetmaster/hasdb/mysql.pp index 322bf69..1ed122a 100644 --- a/manifests/puppetmaster/hasdb/mysql.pp +++ b/manifests/puppetmaster/hasdb/mysql.pp @@ -23,8 +23,10 @@ define puppet::puppetmaster::hasdb::mysql ( tag => "mysql_${dbhostfqdn}", } - munin::plugin::deploy { 'puppetresources': - source => "puppet/munin/puppetresources.mysql", - config => "env.mysqlopts --user=$dbuser --password=$dbpwd -h $dbhost\nenv.puppetdb $dbname", + if $use_munin { + munin::plugin::deploy { 'puppetresources': + source => "puppet/munin/puppetresources.mysql", + config => "env.mysqlopts --user=$dbuser --password=$dbpwd -h $dbhost\nenv.puppetdb $dbname", + } } } diff --git a/manifests/puppetmaster/munin.pp b/manifests/puppetmaster/munin.pp new file mode 100644 index 0000000..4500b74 --- /dev/null +++ b/manifests/puppetmaster/munin.pp @@ -0,0 +1,9 @@ +class puppet::puppetmaster::munin { + + munin::plugin::deploy { + [ 'puppetmaster_memory', 'puppet_clients' ]: + source => "puppet/munin/puppet_", + config => "user root" + } + +} |