diff options
-rw-r--r-- | sos/plugins/mysql.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py index 8c1603ba..b2e19cb7 100644 --- a/sos/plugins/mysql.py +++ b/sos/plugins/mysql.py @@ -25,7 +25,8 @@ class Mysql(Plugin): option_list = [ ("dbuser", "username for database dumps", "", "mysql"), ("dbpass", "password for database dumps", "", ""), - ("dbdump", "collect a database dump", "", False) + ("dbdump", "collect a database dump", "", False), + ("all_logs", "collect all MySQL logs", "", False) ] def setup(self): @@ -35,6 +36,11 @@ class Mysql(Plugin): "/var/log/mysql/mysqld.log", "/var/log/mariadb/mariadb.log", ]) + if self.get_option("all_logs"): + self.add_copy_specs([ + "/var/log/mysql*", + "/var/log/mariadb*" + ]) if self.get_option("dbdump"): dbuser = self.get_option("dbuser") dbpass = self.get_option("dbpass") |