1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 18:07:20 +00:00

More housecleaning.

Collapse some categories; remove duplicates; move plugins in where
they belong, remove files that are not really plugins at all.
This commit is contained in:
Diego Elio Pettenò 2012-08-06 21:55:44 -07:00
parent 4e3ef5b93e
commit 0a1524f27f
45 changed files with 0 additions and 1337 deletions

39
plugins/network/bgpd Executable file
View file

@ -0,0 +1,39 @@
#!/bin/sh
# bgpd.sh
#
#
# Created by spleen.
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title bgp pfxs'
echo 'graph_args -l 0'
echo 'graph_vlabel PfxRcvd'
echo 'graph_category System'
echo 'graph_scale no'
echo 'graph_info show ip bgp summary'
mfs=0
/usr/local/bin/vtysh -c "sh ip bgp su" | /usr/bin/awk '{ if (( $2 == "4" ) || ( $2 == "6")) print $1 }' | while read i; do
case $i in
*) name=`echo $i | /usr/bin/awk '{ gsub("[^a-zA-Z0-9_]", root_, $1); print $1 }'` ;;
esac
dn=`echo $i | sed 's/_/ /g'`
echo "$name.label $dn"
done
exit 0
fi
/usr/local/bin/vtysh -c "sh ip bgp su" | /usr/bin/awk '{ if (( $2 == "4" ) || ( $2 == "6")) print $1,$10 }' | while read i; do
case $i in
*) name=`echo $i | /usr/bin/awk '{ gsub("[^a-zA-Z0-9_]", root_, $1); print $1 }'` ;;
esac
dn=`echo $i | awk '{print $2}'`
echo "$name.value $dn"
done