Blame SOURCES/sos-bz1538226-insights_collect_insights_archive_if_available.patch

99acac
From a2f8d3bea955568f97367f75720728619b12276a Mon Sep 17 00:00:00 2001
99acac
From: Pavel Moravec <pmoravec@redhat.com>
99acac
Date: Fri, 24 Apr 2020 11:41:54 +0200
99acac
Subject: [PATCH] [insights] collect insights-client dump
99acac
99acac
Collect data of "insights-client --offline" into
99acac
sos_commands/insights/insights-client-dump directory.
99acac
99acac
Related: #2030
99acac
Resolves: #2032
99acac
99acac
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
99acac
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
99acac
---
99acac
 sos/plugins/insights.py | 4 ++++
99acac
 1 file changed, 4 insertions(+)
99acac
99acac
diff --git a/sos/plugins/insights.py b/sos/plugins/insights.py
99acac
index a944e49..62ece8b 100644
99acac
--- a/sos/plugins/insights.py
99acac
+++ b/sos/plugins/insights.py
99acac
@@ -31,6 +31,10 @@ class RedHatInsights(Plugin, RedHatPlugin):
99acac
         else:
99acac
             self.add_copy_spec("/var/log/insights-client/insights-client.log")
99acac
 
99acac
+        # Collect insights-client report data into given dump dir
99acac
+        path = self.get_cmd_output_path(name="insights-client-dump")
99acac
+        self.add_cmd_output("insights-client --offline --output-dir %s" % path)
99acac
+
99acac
     def postproc(self):
99acac
         for conf in self.config:
99acac
             self.do_file_sub(
99acac
-- 
99acac
1.8.3.1
99acac