aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Benedito <lbenedit@redhat.com>2024-03-12 10:24:15 +0000
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-03-12 11:27:02 -0400
commitb1a1a62bbac9364185d969f3c992821db77bb43b (patch)
tree7bd9374218ac0381fa8e3db05773c82e48879978
parent0022500d0fbd10b4c8e45a432693b98d8971a988 (diff)
downloadsos-b1a1a62bbac9364185d969f3c992821db77bb43b.tar.gz
[nginx] Implementing files exclusions from AAP for nginx
Signed-off-by: Lucas Benedito <lbenedit@redhat.com>
-rw-r--r--sos/report/plugins/nginx.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/sos/report/plugins/nginx.py b/sos/report/plugins/nginx.py
index 204498df..9021f5e5 100644
--- a/sos/report/plugins/nginx.py
+++ b/sos/report/plugins/nginx.py
@@ -33,6 +33,18 @@ class Nginx(Plugin, IndependentPlugin):
"/var/log/nginx/access.log",
"/var/log/nginx/error.log",
])
+
+ # Other plugins collect these files;
+ # do not collect them here to avoid collisions in the archive paths.
+ altconf = [
+ 'automationcontroller',
+ 'automationhub',
+ 'automationedacontroller'
+ ]
+ self.add_forbidden_path([
+ f"/var/log/nginx/{alt}*" for alt in altconf
+ ])
+
if self.get_option("log") or self.get_option("all_logs"):
self.add_copy_spec("/var/log/nginx/*")