Skip to content

Commit

Permalink
[AAP EDA] Collecting all log files from dir
Browse files Browse the repository at this point in the history
Changing the plugin to collect all log files from eda dir,
it will avoid missing log files added to the product
and not mapped at sos plugin.

Signed-off-by: Rudnei Bertol Junior <[email protected]>
  • Loading branch information
rbertol committed Jan 22, 2025
1 parent ff121f8 commit 70c0c53
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions sos/report/plugins/aap_eda.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 Rudnei Bertol Jr <[email protected]>
# Copyright (c) 2025 Rudnei Bertol Jr <[email protected]>

# This file is part of the sos project: https://github.com/sosreport/sos
#
Expand All @@ -19,15 +19,18 @@ class AAPEDAControllerPlugin(Plugin, RedHatPlugin):
'automation-eda-controller-server')

def setup(self):
self.add_copy_spec([
"/etc/ansible-automation-platform/",
"/var/log/ansible-automation-platform/eda/worker.log*",
"/var/log/ansible-automation-platform/eda/scheduler.log*",
"/var/log/ansible-automation-platform/eda/gunicorn.log*",
"/var/log/ansible-automation-platform/eda/activation.log*",
"/var/log/nginx/automationedacontroller.access.log*",
"/var/log/nginx/automationedacontroller.error.log*",
])
if self.get_option("all_logs"):
self.add_copy_spec([
"/var/log/ansible-automation-platform/eda/",
"/var/log/nginx/automationedacontroller.access.log*",
"/var/log/nginx/automationedacontroller.error.log*",
])
else:
self.add_copy_spec([
"/var/log/ansible-automation-platform/eda/*.log",
"/var/log/nginx/automationedacontroller.access.log",
"/var/log/nginx/automationedacontroller.error.log",
])

self.add_forbidden_path([
"/etc/ansible-automation-platform/eda/SECRET_KEY",
Expand Down

0 comments on commit 70c0c53

Please sign in to comment.