diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-06-23 14:47:56 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-06-23 14:47:56 +0100 |
commit | cc97df09a2a63ff1f53e45e8a372889b55ba1983 (patch) | |
tree | e4106f9bef744302d744b85c4f98d3a9fe59454e | |
parent | e62adc8eb187037e2e3b8de66fe24308c58f3724 (diff) | |
download | sos-cc97df09a2a63ff1f53e45e8a372889b55ba1983.tar.gz |
[mysql] add all_logs option
Add an 'all_logs' option to the MySQL / MariaDB plugin to allow
the old behaviour of collecting all logs files to be requested.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-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") |