sos/SOURCES/sos-bz1814867-insights-arch...

79 lines
2.7 KiB
Diff

From 0766cc739d424932e18c250c88f0227da06ecaed Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Sun, 19 Apr 2020 16:38:50 +0200
Subject: [PATCH] [insights] collect insights-client dump
Collect data of "insights-client --offline" into
sos_commands/insights/insights-client-dump directory.
Resolves: #2030
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
---
sos/plugins/insights.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sos/plugins/insights.py b/sos/plugins/insights.py
index a8fa4e5f..17b99980 100644
--- a/sos/plugins/insights.py
+++ b/sos/plugins/insights.py
@@ -31,6 +31,10 @@ class RedHatInsights(Plugin, RedHatPlugin):
else:
self.add_copy_spec("/var/log/insights-client/insights-client.log")
+ # Collect insights-client report data into given dump dir
+ path = self.get_cmd_output_path(name="insights-client-dump")
+ self.add_cmd_output("insights-client --offline --output-dir %s" % path)
+
def postproc(self):
for conf in self.config:
self.do_file_sub(
--
2.21.3
From f41a12032d1b0caf962145ddd5026b3798931026 Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Tue, 12 May 2020 09:58:26 +0200
Subject: [PATCH] [insights] collect insights dump output in deterministic
filename
Currently, "insights-client --offline" stdout is stored in filename like
insights-client_--offline_--output-dir_.var.tmp.sos.cbl0ox16. (and so on)
Let make the filename unified and deterministic.
Also add the trailing vim expand tabs comment.
Resolves: #2058
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
---
sos/plugins/insights.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sos/plugins/insights.py b/sos/plugins/insights.py
index 75d521bc..e50bc8fb 100644
--- a/sos/plugins/insights.py
+++ b/sos/plugins/insights.py
@@ -33,7 +33,8 @@ class RedHatInsights(Plugin, RedHatPlugin):
# Collect insights-client report data into given dump dir
path = self.get_cmd_output_path(name="insights-client-dump")
- self.add_cmd_output("insights-client --offline --output-dir %s" % path)
+ self.add_cmd_output("insights-client --offline --output-dir %s" % path,
+ suggest_filename="insights-client-dump.log")
def postproc(self):
for conf in self.config:
@@ -44,3 +45,5 @@ class RedHatInsights(Plugin, RedHatPlugin):
self.do_file_sub(
conf, r'(proxy[\t\ ]*=.*)(:)(.*)(@.*)', r'\1\2********\4'
)
+
+# vim: set et ts=4 sw=4 :
--
2.21.3