blob: a7a862ee5784e74e3b4342baa0db42de8e8d171d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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'] ]
}
}
|