diff options
author | Douglas Schilling Landgraf <dougsland@gmail.com> | 2018-07-10 12:03:41 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-08-10 17:14:19 +0100 |
commit | d297b2116fd864c65dba76b343f5101466c0eeb7 (patch) | |
tree | 4454568a0bedde350cc174edaafe4ef246efb732 | |
parent | dfed1abf3cac691cfc669bbf4e07e58e2e637776 (diff) | |
download | sos-d297b2116fd864c65dba76b343f5101466c0eeb7.tar.gz |
[rhv-log-collector-analyzer] Add new plugin for RHV
This commit adds the plugin rhv-log-collector-analyzer, it will
collect:
- Output of rhv-log-collector-analyer --json
- Generated HTML file from --live
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
-rw-r--r-- | sos/plugins/rhv_analyzer.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sos/plugins/rhv_analyzer.py b/sos/plugins/rhv_analyzer.py new file mode 100644 index 00000000..7c233a0b --- /dev/null +++ b/sos/plugins/rhv_analyzer.py @@ -0,0 +1,40 @@ +# Copyright (C) 2018 Red Hat, Inc. +# +# This file is part of the sos project: https://github.com/sosreport/sos +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# version 2 of the GNU General Public License. +# +# See the LICENSE file in the source distribution for further information. + +from sos.plugins import Plugin, RedHatPlugin + + +class RhvLogCollectorAnalyzer(Plugin, RedHatPlugin): + """RHV Log Collector Analyzer""" + + packages = ('rhv-log-collector-analyzer',) + + plugin_name = 'RhvLogCollectorAnalyzer' + profiles = ('virt',) + + def setup(self): + tool_name = 'rhv-log-collector-analyzer' + report = "{dircmd}/analyzer-report.html".format( + dircmd=self.get_cmd_output_path() + ) + + self.add_cmd_output( + "{tool_name}" + " --live" + " --html={report}".format( + report=report, tool_name=tool_name) + ) + + self.add_cmd_output( + "{tool_name}" + " --json".format(tool_name=tool_name) + ) + +# vim: expandtab tabstop=4 shiftwidth=4 |