|
|
e75bc7 |
From d0408ac43e1ec3b114e69b2950202f87f2fcd250 Mon Sep 17 00:00:00 2001
|
|
|
e75bc7 |
From: "Bryn M. Reeves" <bmr@redhat.com>
|
|
|
e75bc7 |
Date: Mon, 19 Jan 2015 18:12:15 +0000
|
|
|
e75bc7 |
Subject: [PATCH] [squid] collect logs from /var/log/squid
|
|
|
e75bc7 |
|
|
|
e75bc7 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
e75bc7 |
---
|
|
|
e75bc7 |
sos/plugins/squid.py | 8 ++++++--
|
|
|
e75bc7 |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
e75bc7 |
|
|
|
e75bc7 |
diff --git a/sos/plugins/squid.py b/sos/plugins/squid.py
|
|
|
e75bc7 |
index 0d596e5..f1aea73 100644
|
|
|
e75bc7 |
--- a/sos/plugins/squid.py
|
|
|
e75bc7 |
+++ b/sos/plugins/squid.py
|
|
|
e75bc7 |
@@ -29,8 +29,12 @@ class RedHatSquid(Squid, RedHatPlugin):
|
|
|
e75bc7 |
packages = ('squid',)
|
|
|
e75bc7 |
|
|
|
e75bc7 |
def setup(self):
|
|
|
e75bc7 |
- self.add_copy_spec_limit("/etc/squid/squid.conf",
|
|
|
e75bc7 |
- sizelimit=self.get_option('log_size'))
|
|
|
e75bc7 |
+ log_size = self.get_option('log_size')
|
|
|
e75bc7 |
+ log_path = "/var/log/squid/"
|
|
|
e75bc7 |
+ self.add_copy_spec_limit("/etc/squid/squid.conf", sizelimit=log_size)
|
|
|
e75bc7 |
+ self.add_copy_spec_limit(log_path + "access.log", sizelimit=log_size)
|
|
|
e75bc7 |
+ self.add_copy_spec_limit(log_path + "cache.log", sizelimit=log_size)
|
|
|
e75bc7 |
+ self.add_copy_spec_limit(log_path + "squid.out", sizelimit=log_size)
|
|
|
e75bc7 |
|
|
|
e75bc7 |
|
|
|
e75bc7 |
class DebianSquid(Squid, DebianPlugin, UbuntuPlugin):
|
|
|
e75bc7 |
--
|
|
|
e75bc7 |
1.9.3
|
|
|
e75bc7 |
|