mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Fixed the other ipvs plugins too regarding UDP detection
This commit is contained in:
parent
267c45f904
commit
f349130b3f
@ -90,8 +90,8 @@ for IP in $IPLIST; do
|
||||
|
||||
# If line number match the line number of the match listen ip, print the line...
|
||||
if [ "$N" -gt "$MATCH" ]; then
|
||||
# ... except if the line contain TCP word (this start an other listen)
|
||||
if ( echo $line | grep TCP > /dev/null ); then
|
||||
# ... except if the line contain TCP or UDP word (this start an other listen)
|
||||
if ( echo $line | grep -e TCP -e UDP > /dev/null ); then
|
||||
break
|
||||
fi
|
||||
|
||||
|
@ -75,8 +75,8 @@ ipvsadm -l -n --rate| nl > $F1
|
||||
|
||||
for IP in $IPLIST; do
|
||||
|
||||
COUNT1=`cat $F1 | grep TCP | grep $IP | awk '{print $7}'`
|
||||
COUNT2=`cat $F1 | grep TCP | grep $IP | awk '{print $8}'`
|
||||
COUNT1=`cat $F1 | grep -e TCP -e UDP | grep $IP | awk '{print $7}'`
|
||||
COUNT2=`cat $F1 | grep -e TCP -e UDP | grep $IP | awk '{print $8}'`
|
||||
NM=`echo $IP | md5sum | cut -d - -f1 | sed 's/ //g' | cut -b 5-9`
|
||||
echo down$NM.value $COUNT1
|
||||
echo up$NM.value $COUNT2
|
||||
|
@ -66,7 +66,7 @@ ipvsadm -l -n --rate| nl > $F1
|
||||
|
||||
for IP in $IPLIST; do
|
||||
|
||||
COUNT=`cat $F1 | grep TCP | grep $IP | awk '{print $4}'`
|
||||
COUNT=`cat $F1 | grep -e TCP -e UDP | grep $IP | awk '{print $4}'`
|
||||
NM=`echo $IP | md5sum | cut -d - -f1 | sed 's/ //g' | cut -b 5-9`
|
||||
echo a$NM.value $COUNT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user