|
|
0cd6dc |
From 3aabd18b2666dbbeb86871ac4b9f025e468d5818 Mon Sep 17 00:00:00 2001
|
|
|
0cd6dc |
From: Christy Perez <christy@linux.vnet.ibm.com>
|
|
|
0cd6dc |
Date: Tue, 16 Dec 2014 12:46:27 +0000
|
|
|
0cd6dc |
Subject: [PATCH 30/93] [kimchi] add new plugin
|
|
|
0cd6dc |
|
|
|
0cd6dc |
This plugin gathers kimchi logs and configuration files.
|
|
|
0cd6dc |
|
|
|
0cd6dc |
Kimchi is an HTML5-based virtualization-management platform
|
|
|
0cd6dc |
For more information, please visit:
|
|
|
0cd6dc |
https://github.com/kimchi-project/kimchi/wiki
|
|
|
0cd6dc |
|
|
|
0cd6dc |
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
|
|
|
0cd6dc |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
0cd6dc |
---
|
|
|
0cd6dc |
sos/plugins/kimchi.py | 40 ++++++++++++++++++++++++++++++++++++++++
|
|
|
0cd6dc |
1 file changed, 40 insertions(+)
|
|
|
0cd6dc |
create mode 100644 sos/plugins/kimchi.py
|
|
|
0cd6dc |
|
|
|
0cd6dc |
diff --git a/sos/plugins/kimchi.py b/sos/plugins/kimchi.py
|
|
|
0cd6dc |
new file mode 100644
|
|
|
0cd6dc |
index 0000000..613b2c9
|
|
|
0cd6dc |
--- /dev/null
|
|
|
0cd6dc |
+++ b/sos/plugins/kimchi.py
|
|
|
0cd6dc |
@@ -0,0 +1,40 @@
|
|
|
0cd6dc |
+# Copyright IBM, Corp. 2014, Christy Perez <christy@linux.vnet.ibm.com>
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+# This program is free software; you can redistribute it and/or modify
|
|
|
0cd6dc |
+# it under the terms of the GNU General Public License as published by
|
|
|
0cd6dc |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
0cd6dc |
+# (at your option) any later version.
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+# This program is distributed in the hope that it will be useful,
|
|
|
0cd6dc |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
0cd6dc |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
0cd6dc |
+# GNU General Public License for more details.
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+# You should have received a copy of the GNU General Public License
|
|
|
0cd6dc |
+# along with this program; if not, write to the Free Software
|
|
|
0cd6dc |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+class Kimchi(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
|
|
|
0cd6dc |
+ """kimchi-related information
|
|
|
0cd6dc |
+ """
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+ plugin_name = 'kimchi'
|
|
|
0cd6dc |
+ packages = ('kimchi',)
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+ def setup(self):
|
|
|
0cd6dc |
+ log_limit = self.get_option('log_size')
|
|
|
0cd6dc |
+ if not self.get_option('all_logs'):
|
|
|
0cd6dc |
+ self.add_copy_spec_limit('/var/log/kimchi/*.log',
|
|
|
0cd6dc |
+ sizelimit=log_limit)
|
|
|
0cd6dc |
+ self.add_copy_spec_limit('/etc/kimchi/kimchi*',
|
|
|
0cd6dc |
+ sizelimit=log_limit)
|
|
|
0cd6dc |
+ self.add_copy_spec_limit('/etc/kimchi/distros.d/*.json',
|
|
|
0cd6dc |
+ sizelimit=log_limit)
|
|
|
0cd6dc |
+ else:
|
|
|
0cd6dc |
+ self.add_copy_spec('/var/log/kimchi/')
|
|
|
0cd6dc |
+ self.add_copy_spec('/etc/kimchi/')
|
|
|
0cd6dc |
+
|
|
|
0cd6dc |
+# vim: expandtab tabstop=4 shiftwidth=4
|
|
|
0cd6dc |
--
|
|
|
0cd6dc |
1.9.3
|
|
|
0cd6dc |
|