From 5928c73fd777d0695010ff4d159257b5cff440f1 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Fri, 22 Mar 2019 11:57:54 +0100 Subject: [apache] dont collect foreman httpd logs Prevent foreman and apache plugins in collecting the same logfiles but with different sizelimit - dont collect those files in apache plugin itself. Resolves: #1596 Signed-off-by: Pavel Moravec Signed-off-by: Bryn M. Reeves --- sos/plugins/apache.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sos/plugins/apache.py b/sos/plugins/apache.py index 390478ef..f4f24dc0 100644 --- a/sos/plugins/apache.py +++ b/sos/plugins/apache.py @@ -28,6 +28,10 @@ class Apache(Plugin): "apachectl -S" ]) + # The foreman plugin collects these files with a greater size limit: + # do not collect them here to avoid collisions in the archive paths. + self.add_forbidden_path("/var/log/{}*/foreman*".format(self.apachepkg)) + class RedHatApache(Apache, RedHatPlugin): files = ( @@ -35,6 +39,7 @@ class RedHatApache(Apache, RedHatPlugin): '/etc/httpd22/conf/httpd.conf', '/etc/httpd24/conf/httpd.conf' ) + apachepkg = 'httpd' def setup(self): super(RedHatApache, self).setup() @@ -83,6 +88,7 @@ class RedHatApache(Apache, RedHatPlugin): class DebianApache(Apache, DebianPlugin, UbuntuPlugin): files = ('/etc/apache2/apache2.conf',) + apachepkg = 'apache' def setup(self): super(DebianApache, self).setup() -- cgit