Commit graph

68 commits

Author SHA1 Message Date
mh
c38546e15f introduce the /etc/mysql/conf.d/ directory for CentOS 2013-12-05 20:14:04 +01:00
mh
6d485b1693 better use this built in fact now 2013-12-05 10:49:54 +01:00
mh
e9f0304525 this is not really necessary 2013-12-04 23:15:26 +01:00
mh
bd6abae490 some mysql versions start to display a nasty warning - http://bugs.mysql.com/bug.php?id=68376 2013-05-03 11:55:41 +02:00
mh
6d9a846867 introduce helpers for mysql backups 2013-02-19 10:12:35 +01:00
mh
c1c3b11245 make trocla an optional dependency 2013-01-02 18:48:49 +01:00
mh
33241a38d2 linting 2013-01-02 17:13:45 +01:00
mh
dd6c24844b Merge remote-tracking branch 'shared/master'
Conflicts:
	files/config/my.cnf.Debian
	manifests/server/base.pp
	manifests/server/munin/default.pp
	manifests/server/nagios.pp
2013-01-02 17:03:18 +01:00
mh
35b62c1b3d some need the password not quoted... 2012-12-10 11:01:28 +01:00
mh
7b2a72a976 document intend of refreshonyl for setting root pw 2012-12-09 16:01:02 +01:00
mh
de7cb43faa fix dependency issues 2012-12-09 15:52:34 +01:00
mh
828d52e667 woraround a puppet provider bug 2012-12-09 15:12:19 +01:00
mh
53d1455aa5 linting 2012-12-06 23:09:44 +01:00
mh
60ec42a15f fix typo 2012-06-17 16:50:08 -03:00
mh
59ec83a3cc take hiera out of the params 2012-06-14 15:02:17 -03:00
mh
956edf58cc take hiera out of the params 2012-06-14 14:53:44 -03:00
o
01ab6a5315 some more hiera variables removed 2012-06-14 11:33:31 -03:00
mh
e4ca510b7c refactor things for >2.7 2012-06-08 13:04:06 -03:00
mh
7f4ae6753f use correct backup location
Up to now we used an empty backup location... :/
2012-05-14 10:29:52 +02:00
mh
1f0784b73e Merge remote-tracking branch 'laurantb/master'
Conflicts:
	manifests/server/cron/backup.pp
2012-04-29 12:55:07 +02:00
Micah Anderson
05e97ab820 Merge remote-tracking branch 'lelutin/nagios_service' into shared 2012-04-11 18:28:15 -04:00
Micah Anderson
7f4f7e0052 fix typo in name of mysql_qcache_mem graph 2012-03-07 15:10:48 -05:00
Micah Anderson
d66e58c325 Merge commit '356fdab8147f8a32a3f14514f2bb77f4f312c734' into shared
Conflicts:
	files/munin/mysql_connections
	manifests/server/base.pp
	manifests/server/munin/default.pp
2012-03-07 11:49:28 -05:00
Micah Anderson
e9ff8b6a23 Merge remote-tracking branch 'lelutin/root_pw_no_arg' into shared
Conflicts:
	manifests/server/base.pp
2012-03-07 11:02:01 -05:00
Gabriel Filion
64bbe64b96 Use the right parameter to nagios::service::mysql
check_hostname is not defined. We need to use check_host instead
2012-02-23 04:52:55 -05:00
mh
4ac7369515 migrate everything to hiera/trocla and use the new scoping style 2012-02-10 14:35:19 +01:00
Laurent Bachelier
fb1ec5b777 --all is deprecated 2011-03-18 17:51:34 +01:00
mh
d31940e3f0 Remove other default accounts due to security reasons 2011-02-25 17:27:19 +01:00
mh
356fdab814 add some other mysql plugins 2010-12-21 22:10:34 +01:00
Gabriel Filion
e894ddb718 Avoid root password leak to process list
The current procedure of setting the root MySQL password leaks the root
password by giving it to the setmysqlpass.sh script on the command line.
This means that during the couple of seconds that the script is
executing, the password is visible in the process list!

Since we're already writing the password in the /root/.my.cnf file, make
the setmysqlpass.sh script parse this file to retrieve the password
instead of receiving it from a command line argument.

Also, in some shells the 'echo' command might appear in the process
list. Use a heredoc notation to create the output without using a
command.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-12-18 12:50:17 +01:00
Gabriel Filion
af8b414c32 Avoid root password leak to process list
The current procedure of setting the root MySQL password leaks the root
password by giving it to the setmysqlpass.sh script on the command line.
This means that during the couple of seconds that the script is
executing, the password is visible in the process list!

Since we're already writing the password in the /root/.my.cnf file, make
the setmysqlpass.sh script parse this file to retrieve the password
instead of receiving it from a command line argument.

Also, in some shells the 'echo' command might appear in the process
list. Use a heredoc notation to create the output without using a
command.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-12-15 08:30:53 -05:00
Micah Anderson
9583889456 add mysql munin graphs and adjust the file distribution to match the right location of where they are 2010-11-01 19:43:23 -04:00
Micah Anderson
b48f864b30 fully qualify the path to mysqladmin, without it, you will get this error:
Parameter unless failed: 'mysqladmin -uroot status > /dev/null' is both unqualifed and specified no search path at /etc/puppet/modules/mysql/manifests/server/base.pp:62

unless you have set globally:

Exec { path => "/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin" }
2010-10-29 15:05:16 -04:00
Micah Anderson
8067a1042b fixed stray semicolon 2010-10-26 17:39:40 -04:00
Micah Anderson
f43c0c883a fix script_path_in parameter 2010-10-26 17:37:36 -04:00
Micah Anderson
78fa3e62cf fix munin script path 2010-10-26 13:05:40 -04:00
Micah Anderson
9871e9319c move the mysql::server::munin::base class to its own file 2010-10-26 11:28:17 -04:00
Micah Anderson
b1ef87fbda fix incorrect munin graph names 2010-10-26 11:27:59 -04:00
Micah Anderson
50b6789a3a add the mysql munin graphs:
. mysql_connections
 . mysql_qcache
 . mysql_qcache_mem
 . mysql_size_all
2010-10-26 11:12:14 -04:00
Micah Anderson
fa67257056 . remove the check_mysql_health script from the mysql module, instead it belongs in the nagios module
. change the default nagios::service::mysql check to use the check_mysql_health 'connection-time' check mode, which is identical to the original check, with some additional information

. stop using nagios::plugin::deploy because this doesn't work when more than one node attempts to realize this class

. stop exporting the nagios_command because this doesn't work when more than one node attempts to realize this class

. remove the check_health define, instead this be how it was before, as the previous nagios::service::mysql define
2010-10-18 20:52:42 -04:00
Micah Anderson
f52a66ea0e change the default $check_hostname variable to be the localhost interface. This seems to make more sense than using $fqdn 2010-10-18 15:50:26 -04:00
Micah Anderson
6031165200 simplify the nagios check_mysql_health plugin process:
1. use the new plugin deploy feature in nagios (nagios::plugin::deploy)
2. remove unnecessary classes and inheritance - this plugin seems reasonable to install by default, and in fact it could be argued that the other 'check_mysql' plugin that still remains can be removed, as its functionality is vastly overshadowed by this one
3. add the 'repl_client_priv' mysql grant privs to the nagios user. these are needed for the check_mysql_health plugin slave replication modes. According to http://dev.mysql.com/doc/refman/5.0/en/privileges-provided.html#priv_replication-client - The REPLICATION CLIENT privilege enables the use of SHOW MASTER STATUS and SHOW SLAVE STATUS. These privileges are not too much to provide to the nagios user, as they are only informational
4. setup the define "check_health" so it can be used easily
2010-10-17 18:23:42 -04:00
Micah Anderson
784bd6271f add a more advanced mysql health check plugin:
* create a mysql::server::nagios::base class with the common parts needed for the basic plugin, and the health plugin
 * make mysql::server:nagios inherit mysql::server:nagios::base
 * create a new class mysql::server::nagios::check_health inheriting ::base

the nagios module has also received a new define to setup the different nagios::service pieces for the different health check modes that might be desired

its assumed you would setup the different health check modes in site-mysql/init.pp as different hosts will require different modes and/or parameters, for example:

class site-mysql::server {
  include mysql::server::nagios::check_health

  nagios::service::mysql_health { [ 'connection-time', 'uptime', 'threads-connected', 'threadcache-hitrate' ]:
    require => Mysql_grant[$nagios_mysql_user],
  }

  case $hostname {
    "eider": {
      nagios::service::mysql_health { [ 'slave-io-running', 'slave-sql-running', 'slave-lag' ]:
    require => Mysql_grant[$nagios_mysql_user],
      }
    }
  }
}
2010-09-27 13:18:51 -04:00
Micah Anderson
c4fa879120 fixing merge error which removed a / -- round 2 2010-09-22 19:50:01 -04:00
Micah Anderson
892a2c5f63 fixing merge error which removed a / 2010-09-22 19:38:17 -04:00
Micah Anderson
7b1d2925b9 fix pathing, its /usr not /user 2010-09-22 19:31:06 -04:00
Micah Anderson
a3e7b031a3 Merge remote branch 'remotes/immerda/master'
Conflicts:
	manifests/server/base.pp
2010-09-22 13:12:51 -04:00
Micah Anderson
31de67a0f9 allow for different my.cnf files according to the OS release 2010-09-22 12:52:50 -04:00
Micah Anderson
f1f1d212c1 require package mysql-server for service mysql instead of mysql-client 2010-09-22 12:37:46 -04:00
mh
24d7c6aa24 remove unnecessary fileserver variable (#2460) round II 2010-08-11 15:57:43 +02:00