mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Repair bug in other responses
This commit is contained in:
parent
706e7e9104
commit
0541fdd145
1 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@ haproxy_responses_backend -Haproxy responses backend
|
|||
|
||||
=head1 AUTHOR
|
||||
|
||||
Ricardo Fraile <rfrail3@yahoo.es>
|
||||
Ricardo Fraile <rikr_@hotmail.com>
|
||||
|
||||
=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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue