diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-06-23 13:31:59 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-06-23 13:31:59 +0100 |
commit | 0542338c6d2942971edd4f70699972d162b7e794 (patch) | |
tree | 4ae7b8768c69a7d23febcf85d3d39eca88ad9cda | |
parent | 6a13d85a88905415a317cb59142930e68c5b0e3f (diff) | |
download | sos-0542338c6d2942971edd4f70699972d162b7e794.tar.gz |
[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 <bmr@redhat.com>
-rw-r--r-- | sos/plugins/mysql.py | 23 |
1 files 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): |