Fix munin plugin class on Debian

This commit is contained in:
Jerome Charaoui 2014-03-11 14:52:56 -04:00
parent 6d9a846867
commit f34882cadd
2 changed files with 22 additions and 32 deletions

View file

@ -20,7 +20,7 @@ class mysql::server (
}
if $manage_munin and $::mysql_exists == 'true' {
if $munin_password == 'absent' {
if $munin_password == 'absent' and $::operatingsystem != debian {
fail('need to set the munin password')
}
case $::operatingsystem {

View file

@ -1,35 +1,25 @@
# debian way of calling plugins
class mysql::server::munin::debian inherits mysql::server::munin::default {
Munin::Plugin['mysql_bytes']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
Munin::Plugin['mysql_queries']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
Munin::Plugin['mysql_slowqueries']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
Munin::Plugin['mysql_threads']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
Munin::Plugin::Deploy['mysql_connections']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
Munin::Plugin::Deploy['mysql_qcache']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
Munin::Plugin::Deploy['mysql_cache_mem']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
Munin::Plugin::Deploy['mysql_size_all']{
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
class mysql::server::munin::debian {
munin::plugin {
[mysql_queries, mysql_slowqueries, mysql_bytes, mysql_threads]:
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
}
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';
'mysql_size_all':
source => 'mysql/munin/mysql_size_all';
}
Munin::Plugin::Deploy[ [ 'mysql_connections', 'mysql_qcache', 'mysql_qcache_mem', 'mysql_size_all' ] ] {
config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
require => Package['mysql'],
}
}