mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Better IPv6 handling in suggest mode
This commit is contained in:
parent
8b7a1d2a36
commit
f55154456d
1 changed files with 14 additions and 16 deletions
|
@ -43,14 +43,13 @@ if [ "$1" = "autoconf" ]; then
|
|||
fi
|
||||
|
||||
if [ "$1" = "suggest" ]; then
|
||||
ip6tables -L INPUT -v -n -x 2>/dev/null | awk '$8 ~ /[0-9]/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'
|
||||
ip6tables -L INPUT -v -n -x 2>/dev/null | awk --posix '$8 ~ /^([0-9a-f]{1,4}(\:|\:\:)){1,7}([0-9a-f]{1,4})\/([0-9]{1,3})$/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'|sed "s#/[0-9]\{1,3\}##"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
|
||||
echo "graph_order out in"
|
||||
echo "graph_title $IP traffic"
|
||||
echo "graph_title $IP IPv6 traffic"
|
||||
echo 'graph_args --base 1000'
|
||||
echo 'graph_vlabel bits per ${graph_period}'
|
||||
echo 'graph_category network'
|
||||
|
@ -67,4 +66,3 @@ fi;
|
|||
|
||||
ip6tables -L INPUT -v -n -x | grep -m1 $IP | awk "{ print \"in.value \" \$2 }"
|
||||
ip6tables -L OUTPUT -v -n -x | grep -m1 $IP | awk "{ print \"out.value \" \$2 }"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue