From f58eb6e445962a74c15e27cd010a890873a0046a Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 4 Jul 2014 18:39:01 +0100 Subject: [PATCH] [mongodb] backport new plugin from upstream --- sos/plugins/mongodb.py | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sos/plugins/mongodb.py diff --git a/sos/plugins/mongodb.py b/sos/plugins/mongodb.py new file mode 100644 index 0000000..f8a47f7 --- /dev/null +++ b/sos/plugins/mongodb.py @@ -0,0 +1,41 @@ +## Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves + +### This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. + +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +import sos.plugintools + +class mongodb(sos.plugintools.PluginBase): + """MongoDB related information + """ + + packages = ('mongodb-server',) + files = ('/etc/mongodb.conf',) + + def setup(self): + self.addCopySpecs([ + "/etc/mongodb.conf", + "/etc/sysconfig/mongodb", + "/var/log/mongodb/mongodb.log" + ]) + + def postproc(self): + self.doRegexSub( + "/etc/mongodb.conf", + r"(mms-token\s*=\s*.*)", + r"mms-token = ********" + ) + + +# vim: et ts=4 sw=4 -- 1.9.3