From 9803fd1174ce6c2dff558504e9b53f1ad2c67abb Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 10 Jun 2014 21:47:51 +0100 Subject: [PATCH 16/17] [haproxy] new plugin Add a plugin for HAProxy, based on a suggestion from Brandon Perkins in rhbz#1107865. Backported to 2.2. Signed-off-by: Bryn M. Reeves --- sos/plugins/haproxy.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sos/plugins/haproxy.py diff --git a/sos/plugins/haproxy.py b/sos/plugins/haproxy.py new file mode 100644 index 0000000..05f2259 --- /dev/null +++ b/sos/plugins/haproxy.py @@ -0,0 +1,28 @@ +## 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 haproxy(sos.plugintools.PluginBase): + """haproxy information + """ + + packages = ('haproxy',) + + def setup(self): + self.addCopySpec("/etc/haproxy/haproxy.cfg") + self.collectExtOutput("haproxy -f /etc/haproxy/haproxy.cfg -c") + +# vim: et ts=4 sw=4 -- 1.9.3