diff options
author | mh <mh@immerda.ch> | 2008-06-13 20:16:32 +0000 |
---|---|---|
committer | mh <mh@immerda.ch> | 2008-06-13 20:16:32 +0000 |
commit | 5c17a7fda8dcc10bee2417da0e0f3918172046b2 (patch) | |
tree | f93e5ab9af6ab008aaefee87239df4276009ad5f /manifests/munin.pp | |
parent | 7aeeced0339255f5cdc614dd631582d1064a4a8a (diff) |
merged with puzzle
Diffstat (limited to 'manifests/munin.pp')
-rw-r--r-- | manifests/munin.pp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/manifests/munin.pp b/manifests/munin.pp new file mode 100644 index 0000000..a7a862e --- /dev/null +++ b/manifests/munin.pp @@ -0,0 +1,22 @@ +# manifests/munin.pp + +class mysql::munin { + 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"), + } + + mysql_grant{'munin@localhost': + privileges => 'select_priv', + require => Mysql_user['munin@localhost'], + } + + 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'] ] + } +} |