aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2019-03-22 11:57:54 +0100
committerBryn M. Reeves <bmr@redhat.com>2019-03-22 12:36:20 +0000
commit5928c73fd777d0695010ff4d159257b5cff440f1 (patch)
tree70444bf6e5959dae918c5a70ab9ae67ce9fa599a
parentf394c251425f7e5b5b99b8f6fa5b598f06e3d0d7 (diff)
downloadsos-5928c73fd777d0695010ff4d159257b5cff440f1.tar.gz
[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 <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/apache.py6
1 files changed, 6 insertions, 0 deletions
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()