From 0541fdd14551e88cf97d622489b809db804716a2 Mon Sep 17 00:00:00 2001 From: ricardo Date: Tue, 11 Sep 2012 13:49:33 +0200 Subject: [PATCH] Repair bug in other responses --- plugins/haproxy/haproxy_responses_backend | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/haproxy/haproxy_responses_backend b/plugins/haproxy/haproxy_responses_backend index a0fad86a..69c0db9c 100755 --- a/plugins/haproxy/haproxy_responses_backend +++ b/plugins/haproxy/haproxy_responses_backend @@ -17,7 +17,7 @@ haproxy_responses_backend -Haproxy responses backend =head1 AUTHOR -Ricardo Fraile +Ricardo Fraile =head1 LICENSE @@ -33,7 +33,7 @@ GNU . $MUNIN_LIBDIR/plugins/plugin.sh function parse_url { - # Modify ifs variable + # Modificamos la variable if, al final se vuelve a dejar igual OIFS=$IFS; IFS=","; PXNAME="$1" @@ -44,10 +44,10 @@ function parse_url { ARRAY1=($LINE1); - # Find values + # Recorremos el array buscando los valores esperados for ((i=0; i<${#ARRAY1[@]}; ++i)); do - # Get data + # Si coincide con el valor, sacar el dato if [[ "${ARRAY1[$i]}" == "${VALUE}" ]]; then o=$i; o=`expr $o + 1` @@ -55,7 +55,7 @@ function parse_url { fi done - # Reset ifs + # se deja la variable igual IFS=$OIFS; } @@ -125,6 +125,6 @@ fi echo "hrsp_3xx`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $H3xx" echo "hrsp_4xx`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $H4xx" echo "hrsp_5xx`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $H5xx" - echo "hrsp_oxx`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $Hoxx" + echo "hrsp_other`echo $i | md5sum | cut -d - -f1 | sed 's/ //g'`.value $Hoxx" done