Blame SOURCES/sos-bz1600158-rhv-log-collector-analyzer.patch

b72d26
From d297b2116fd864c65dba76b343f5101466c0eeb7 Mon Sep 17 00:00:00 2001
b72d26
From: Douglas Schilling Landgraf <dougsland@gmail.com>
b72d26
Date: Tue, 10 Jul 2018 12:03:41 -0400
b72d26
Subject: [PATCH] [rhv-log-collector-analyzer] Add new plugin for RHV
b72d26
b72d26
This commit adds the plugin rhv-log-collector-analyzer, it will
b72d26
collect:
b72d26
b72d26
- Output of rhv-log-collector-analyer --json
b72d26
- Generated HTML file from --live
b72d26
b72d26
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
b72d26
---
b72d26
 sos/plugins/rhv_analyzer.py | 40 +++++++++++++++++++++++++++++++++++++
b72d26
 1 file changed, 40 insertions(+)
b72d26
 create mode 100644 sos/plugins/rhv_analyzer.py
b72d26
b72d26
diff --git a/sos/plugins/rhv_analyzer.py b/sos/plugins/rhv_analyzer.py
b72d26
new file mode 100644
b72d26
index 00000000..7c233a0b
b72d26
--- /dev/null
b72d26
+++ b/sos/plugins/rhv_analyzer.py
b72d26
@@ -0,0 +1,40 @@
b72d26
+# Copyright (C) 2018 Red Hat, Inc.
b72d26
+#
b72d26
+# This file is part of the sos project: https://github.com/sosreport/sos
b72d26
+#
b72d26
+# This copyrighted material is made available to anyone wishing to use,
b72d26
+# modify, copy, or redistribute it subject to the terms and conditions of
b72d26
+# version 2 of the GNU General Public License.
b72d26
+#
b72d26
+# See the LICENSE file in the source distribution for further information.
b72d26
+
b72d26
+from sos.plugins import Plugin, RedHatPlugin
b72d26
+
b72d26
+
b72d26
+class RhvLogCollectorAnalyzer(Plugin, RedHatPlugin):
b72d26
+    """RHV Log Collector Analyzer"""
b72d26
+
b72d26
+    packages = ('rhv-log-collector-analyzer',)
b72d26
+
b72d26
+    plugin_name = 'RhvLogCollectorAnalyzer'
b72d26
+    profiles = ('virt',)
b72d26
+
b72d26
+    def setup(self):
b72d26
+        tool_name = 'rhv-log-collector-analyzer'
b72d26
+        report = "{dircmd}/analyzer-report.html".format(
b72d26
+            dircmd=self.get_cmd_output_path()
b72d26
+        )
b72d26
+
b72d26
+        self.add_cmd_output(
b72d26
+            "{tool_name}"
b72d26
+            " --live"
b72d26
+            " --html={report}".format(
b72d26
+                report=report, tool_name=tool_name)
b72d26
+        )
b72d26
+
b72d26
+        self.add_cmd_output(
b72d26
+            "{tool_name}"
b72d26
+            " --json".format(tool_name=tool_name)
b72d26
+        )
b72d26
+
b72d26
+# vim: expandtab tabstop=4 shiftwidth=4
b72d26
-- 
b72d26
2.17.1
b72d26