summaryrefslogtreecommitdiff
path: root/manifests/server/munin
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/server/munin')
-rw-r--r--manifests/server/munin/base.pp20
-rw-r--r--manifests/server/munin/debian.pp17
-rw-r--r--manifests/server/munin/default.pp13
3 files changed, 40 insertions, 10 deletions
diff --git a/manifests/server/munin/base.pp b/manifests/server/munin/base.pp
new file mode 100644
index 0000000..ad4bb8a
--- /dev/null
+++ b/manifests/server/munin/base.pp
@@ -0,0 +1,20 @@
+class mysql::server::munin::base {
+
+ file {
+ "/usr/local/share/munin-plugins/mysql_connections":
+ source => "puppet:///modules/mysql/munin/mysql_connections",
+ mode => 0755, owner => root, group => root;
+
+ "/usr/local/share/munin-plugins/mysql_qcache":
+ source => "puppet:///modules/mysql/munin/mysql_qcache",
+ mode => 0755, owner => root, group => root;
+
+ "/usr/local/share/munin-plugins/mysql_qcache_mem":
+ source => "puppet:///modules/mysql/munin/mysql_qcache_mem",
+ mode => 0755, owner => root, group => root;
+
+ "/usr/local/share/munin-plugins/mysql_size_all":
+ source => "puppet:///modules/mysql/munin/mysql_size_all",
+ mode => 0755, owner => root, group => root;
+ }
+}
diff --git a/manifests/server/munin/debian.pp b/manifests/server/munin/debian.pp
index 2b2acb4..d1636d5 100644
--- a/manifests/server/munin/debian.pp
+++ b/manifests/server/munin/debian.pp
@@ -1,9 +1,14 @@
# manifests/server/munin/debian.pp
-class mysql::server::munin::debian {
- munin::plugin {
- [mysql_bytes, mysql_queries, mysql_slowqueries, mysql_threads]:
- config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
- require => Package['mysql'],
- }
+class mysql::server::munin::debian inherits mysql::server::munin::base {
+ munin::plugin {
+ [ mysql_bytes, mysql_queries, mysql_slowqueries, mysql_threads ]:
+ config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
+ require => Package['mysql'];
+
+ [ mysql_connections, mysql_qcache, mysql_cache_mem, mysql_size_all ]:
+ config => "user root\nenv.mysqlopts --defaults-file=/etc/mysql/debian.cnf",
+ script_path_in => "/usr/local/share/munin-plugins",
+ require => Package['mysql'];
+ }
}
diff --git a/manifests/server/munin/default.pp b/manifests/server/munin/default.pp
index b60ff0d..2660ea0 100644
--- a/manifests/server/munin/default.pp
+++ b/manifests/server/munin/default.pp
@@ -1,6 +1,6 @@
# manifests/server/munin/default.pp
-class mysql::server::munin::default {
+class mysql::server::munin::default inherits mysql::server::munin::base {
case $munin_mysql_password {
'': { fail("please specify \$munin_mysql_password to enable mysql munin plugin")}
}
@@ -16,8 +16,13 @@ class mysql::server::munin::default {
}
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'] ]
+ [ 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'] ];
+
+ [ mysql_connections, mysql_qcache, mysql_cache_mem, mysql_size_all ]:
+ script_path_in => "/usr/local/share/munin-plugins",
+ config => "env.mysqlopts --user=munin --password=${munin_mysql_password} -h localhost",
+ require => [ Mysql_grant['munin@localhost'], Mysql_user['munin@localhost'], Package['mysql'] ];
}
}