diff options
Diffstat (limited to 'manifests/server')
-rw-r--r-- | manifests/server/base.pp | 2 | ||||
-rw-r--r-- | manifests/server/munin/base.pp | 20 | ||||
-rw-r--r-- | manifests/server/munin/debian.pp | 17 | ||||
-rw-r--r-- | manifests/server/nagios.pp | 2 |
4 files changed, 34 insertions, 7 deletions
diff --git a/manifests/server/base.pp b/manifests/server/base.pp index eb66b43..75f5725 100644 --- a/manifests/server/base.pp +++ b/manifests/server/base.pp @@ -52,7 +52,7 @@ class mysql::server::base { exec { 'mysql_set_rootpw': command => '/usr/local/sbin/setmysqlpass.sh', - unless => "mysqladmin -uroot status > /dev/null", + unless => '/usr/bin/mysqladmin -uroot status > /dev/null', require => [ File['mysql_setmysqlpass.sh'], Package['mysql-server'] ], refreshonly => true, } 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/nagios.pp b/manifests/server/nagios.pp index 18eef8a..26644db 100644 --- a/manifests/server/nagios.pp +++ b/manifests/server/nagios.pp @@ -1,3 +1,5 @@ +# manifests/server/nagios.pp + class mysql::server::nagios { # Flip this variable if you need to check MySQL through check_ssh or check_nrpe, # in that case you will have to manually define nagios::service::mysql |