2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

arp_ sh lint

This commit is contained in:
Martin Ness 2014-09-13 22:03:45 +02:00
parent 24e77a2624
commit 36dbfa1b28

View File

@ -15,7 +15,7 @@
#%# family=contrib
#%# capabilities=autoconf suggest
INTERFACE=`basename $0 | sed 's/^arp_//g' | tr '_' '.'`
INTERFACE=$(basename $0 | sed 's/^arp_//g' | tr '_' '.')
if [ "$1" = "autoconf" ]; then
# Search for arp
@ -43,7 +43,7 @@ if [ "$1" = "config" ]; then
echo 'graph_vlabel Entries'
echo 'graph_category network'
echo 'graph_scale no'
echo "graph_info This graph shows the number of ARP entries registered by the system for interface $INTERFACE."
echo "graph_info This graph shows the number of ARP entries registered by the system for interface ${INTERFACE}."
echo 'entries.label ARP entries'
echo 'entries.draw LINE2'
echo 'entries.type GAUGE'
@ -51,5 +51,5 @@ if [ "$1" = "config" ]; then
exit 0
fi
arp -an -i $INTERFACE | awk 'BEGIN { regex="<incomplete>";} { if (!match($4,regex)) { a[$4] }} END{for(i in a){n++};print "entries.value " n}'
arp -an -i "$INTERFACE" | awk 'BEGIN { regex="<incomplete>";} { if (!match($4,regex)) { a[$4] }} END{for(i in a){n++};print "entries.value " n}'