Skip to content

Commit

Permalink
[insights] Capture machine-id and lastupload files
Browse files Browse the repository at this point in the history
Capture machine-id and lastupload files.

Signed-off-by: Jose Castillo <[email protected]>
  • Loading branch information
jcastill authored and arif-ali committed Feb 8, 2024
1 parent 480d3ed commit fdba7e6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sos/report/plugins/insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ class RedHatInsights(Plugin, RedHatPlugin):
plugin_name = 'insights'
packages = ('redhat-access-insights', 'insights-client')
profiles = ('system', 'sysmgmt')
config = (
config_and_status = (
'/etc/insights-client/insights-client.conf',
'/etc/insights-client/.registered',
'/etc/insights-client/tags.yaml',
'/etc/insights-client/malware-detection-config.yml',
'/etc/redhat-access-insights/redhat-access-insights.conf'
'/etc/redhat-access-insights/redhat-access-insights.conf',
'/etc/insights-client/.lastupload',
'/etc/insights-client/machine-id',
)

def setup(self):
self.add_copy_spec(self.config)
self.add_copy_spec(self.config_and_status)
self.add_copy_spec('/var/lib/insights')

# Legacy log file location
Expand All @@ -54,7 +56,7 @@ def setup(self):
self.add_cmd_output(f"/bin/ls -lanR {_dir}", cmd_as_tag=True)

def postproc(self):
for conf in self.config:
for conf in self.config_and_status:
self.do_file_sub(
conf, r'(password[\t\ ]*=[\t\ ]*)(.+)', r'\1********'
)
Expand Down

0 comments on commit fdba7e6

Please sign in to comment.