diff options
-rw-r--r-- | sos/plugins/mysql.py | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py index 1437c162..205b7af2 100644 --- a/sos/plugins/mysql.py +++ b/sos/plugins/mysql.py @@ -12,19 +12,43 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -from sos.plugins import Plugin, RedHatPlugin +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin from os.path import exists -class mysql(Plugin, RedHatPlugin): +class Mysql(Plugin): """MySQL related information """ + plugin_name = "mysql" + + def setup(self): + super(mysql, self).setup() + +class RedHatMysql(Mysql, RedHatPlugin): + """MySQL related information for RedHat based distributions + """ + files = ('/etc/my.cnf',) packages = ('mysql-server', 'mysql') def setup(self): self.add_copy_specs([ + super(RedHatMysql, self).setup() "/etc/my.cnf", "/etc/sysconfig/network", "/etc/ld.so.conf.d/mysql*", "/var/log/mysql*"]) + +class DebianMysql(mysql, DebianPlugin, UbuntuPlugin): + """MySQL related information for Debian based distributions + """ + + files = ('/etc/mysql/my.cnf',) + packages = ('mysql-server', 'mysql-common') + + def setup(self): + super(DebianMysql, self).setup() + self.addCopySpecs([ + "/etc/mysql/my.cnf", + "/etc/mysql/conf.d/mysql*", + "/var/log/mysql*"]) |