>From ed1570e2177cadd7957e35229463b8ca02276f96 Mon Sep 17 00:00:00 2001 From: Krzysztof Piotr Oledzki <[email protected]> Date: Mon, 25 Oct 2010 16:04:17 +0200 Subject: [CONTRIB] Update haproxy.pl
This patch adds support for Sockets and several new variables available in the 1.4 branch. --- contrib/netsnmp-perl/haproxy.pl | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/contrib/netsnmp-perl/haproxy.pl b/contrib/netsnmp-perl/haproxy.pl index 61b693a..f4c3621 100644 --- a/contrib/netsnmp-perl/haproxy.pl +++ b/contrib/netsnmp-perl/haproxy.pl @@ -1,14 +1,14 @@ # # Net-SNMP perl plugin for Haproxy -# Version 0.27 +# Version 0.30 # -# Copyright 2007-2008 Krzysztof Piotr Oledzki <[email protected]> +# Copyright 2007-2010 Krzysztof Piotr Oledzki <[email protected]> # -# 1. get a variable from stat: +# 1. get a variable from "show stat": # 1.3.6.1.4.1.29385.106.1.$type.$field.$iid.$sid -# type: 0->frontend, 1->backend, 2->server +# type: 0->frontend, 1->backend, 2->server, 3->socket # -# 2. get a variable from info +# 2. get a variable from "show info": # 1.3.6.1.4.1.29385.106.2.$req.$varnr # # TODO: @@ -53,7 +53,14 @@ my %info_vars = ( 9 => 'Ulimit-n', 10 => 'Maxsock', 11 => 'Maxconn', - 12 => 'CurrConns', + 12 => 'Maxpipes', + 13 => 'CurrConns', + 14 => 'PipesUsed', + 15 => 'PipesFree', + 16 => 'Tasks', + 17 => 'Run_queue', + 18 => 'node', + 19 => 'description', ); sub find_next_stat_id { @@ -107,7 +114,7 @@ sub haproxy_stat { my($type, $field, $proxyid, $sid, $or) = split('\.', $oid, 5); - next if $type > 2 || defined($or); + next if $type > 3 || defined($or); if ($mode == MODE_GETNEXT) { -- 1.6.4.2

