From 0542338c6d2942971edd4f70699972d162b7e794 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 23 Jun 2014 13:31:59 +0100 Subject: [mysql] limit log collection and add support for MariaDB Add support for the MariaDB fork of MySQL. Since a MySQL or MariaDB instance may have very large log files under /var/log/{mysql,mariadb}. For now restrict log collection to the main demon log. Signed-off-by: Bryn M. Reeves --- sos/plugins/mysql.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py index bec55b19..6bdacce6 100644 --- a/sos/plugins/mysql.py +++ b/sos/plugins/mysql.py @@ -16,7 +16,7 @@ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin from os.path import exists class Mysql(Plugin): - """MySQL related information + """MySQL and MariaDB related information """ plugin_name = "mysql" @@ -26,31 +26,40 @@ class Mysql(Plugin): super(Mysql, self).setup() self.add_copy_specs([ self.mysql_cnf, - "/var/log/mysql*" + "/var/log/mysql/mysqld.log", + "/var/log/mariadb/mariadb.log", ]) class RedHatMysql(Mysql, RedHatPlugin): - """MySQL related information for RedHat based distributions + """MySQL and MariaDB information for Red Hat based distributions """ packages = ( 'mysql-server', - 'mysql' + 'mysql', + 'mariadb-server', + 'mariadb' ) def setup(self): super(RedHatMysql, self).setup() - self.add_copy_spec("/etc/ld.so.conf.d/mysql*") + self.add_copy_specs([ + "/etc/ld.so.conf.d/mysql-*.conf", + "/etc/ld.so.conf.d/mariadb-*.conf" + ]) + self.add_copy_spec("/etc/my.cnf.d/*") class DebianMysql(Mysql, DebianPlugin, UbuntuPlugin): - """MySQL related information for Debian based distributions + """MySQL and MariaDB information for Debian based distributions """ packages = ( 'mysql-server', - 'mysql-common' + 'mysql-common', + 'mariadb-server', + 'mariadb-common' ) def setup(self): -- cgit