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