From 356fdab8147f8a32a3f14514f2bb77f4f312c734 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 21 Dec 2010 22:10:34 +0100 Subject: add some other mysql plugins --- manifests/server/munin/default.pp | 48 ++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'manifests/server/munin/default.pp') diff --git a/manifests/server/munin/default.pp b/manifests/server/munin/default.pp index b60ff0d..424f8b2 100644 --- a/manifests/server/munin/default.pp +++ b/manifests/server/munin/default.pp @@ -1,23 +1,39 @@ # manifests/server/munin/default.pp class mysql::server::munin::default { - case $munin_mysql_password { - '': { fail("please specify \$munin_mysql_password to enable mysql munin plugin")} - } + case $munin_mysql_password { + '': { fail("please specify \$munin_mysql_password to enable mysql munin plugin")} + } - mysql_user{'munin@localhost': - password_hash => mysql_password("$munin_mysql_password"), - require => Package['mysql'], - } + mysql_user{'munin@localhost': + password_hash => mysql_password("$munin_mysql_password"), + require => Package['mysql'], + } - mysql_grant{'munin@localhost': - privileges => 'select_priv', - require => [ Mysql_user['munin@localhost'], Package['mysql'] ], - } + mysql_grant{'munin@localhost': + privileges => 'select_priv', + require => [ Mysql_user['munin@localhost'], Package['mysql'] ], + } - munin::plugin { - [mysql_bytes, mysql_queries, mysql_slowqueries, mysql_threads]: - config => "env.mysqlopts --user=munin --password=${munin_mysql_password} -h localhost", - require => [ Mysql_grant['munin@localhost'], Mysql_user['munin@localhost'], Package['mysql'] ] - } + munin::plugin { + [mysql_bytes, mysql_queries, mysql_slowqueries, mysql_threads]: + config => "env.mysqlopts --user=munin --password=${munin_mysql_password} -h localhost", + require => [ Mysql_grant['munin@localhost'], Mysql_user['munin@localhost'], Package['mysql'] ] + } + + Munin::Plugin::Deploy{ + config => "env.mysqlopts --user=munin --password=$munin_mysql_password -h localhost", + require => + [ Mysql_grant['munin@localhost'], + Mysql_user['munin@localhost'], + Package['mysql'] ] + } + munin::plugin::deploy{ + 'mysql_connections': + source => 'mysql/munin/mysql_connections'; + 'mysql_qcache': + source => 'mysql/munin/mysql_qcache'; + 'mysql_qcache_mem': + source => 'mysql/munin/mysql_qcache_mem'; + } } -- cgit v1.2.3