diff options
author | Louis Bouchard <louis.bouchard@canonical.com> | 2013-12-17 11:55:33 +0100 |
---|---|---|
committer | Adam Stokes <adam.stokes@ubuntu.com> | 2013-12-17 09:47:56 -0500 |
commit | 9497e36c20c5f6a7f7ac2ede919c5b4791b0f6b4 (patch) | |
tree | 695e7832f3a89361b813ba3955604bbb67dcd67c | |
parent | bf8ecd23565312138fee224db6423c2d6442ce87 (diff) | |
download | sos-9497e36c20c5f6a7f7ac2ede919c5b4791b0f6b4.tar.gz |
Fixed config file collection for Debian/Ubuntu
Fixes: #222
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r-- | sos/plugins/squid.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sos/plugins/squid.py b/sos/plugins/squid.py index 4f6310fc..bf6579b4 100644 --- a/sos/plugins/squid.py +++ b/sos/plugins/squid.py @@ -14,17 +14,34 @@ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin -class Squid(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): +class Squid(Plugin): """squid related information """ plugin_name = 'squid' + option_list = [("logsize", "maximum size (MiB) of logs to collect", "", 15)] + +class RedHatSquid(Squid, RedHatPlugin): + """squid Red Hat related information + """ + files = ('/etc/squid/squid.conf',) packages = ('squid',) def setup(self): - self.add_copy_spec("/etc/squid/squid.conf") - self.add_copy_spec_limit("/var/log/squid", + self.add_copy_spec_limit("/etc/squid/squid.conf", + sizelimit=self.get_option('logsize')) + +class DebianSquid(Squid, DebianPlugin, UbuntuPlugin): + """squid related information for Debian and Ubuntu + """ + + plugin_name = 'squid' + files = ('/etc/squid3/squid.conf',) + packages = ('squid3',) + + def setup(self): + self.add_copy_spec_limit("/etc/squid3/squid.conf", sizelimit=self.get_option('logsize')) |