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

28 lines
908 B
Plaintext
Raw Normal View History

2011-02-13 02:07:13 +01:00
#!/bin/sh
if [ "$1" = "config" ]; then
echo 'graph_title quagga routes'
echo 'graph_args -l 0'
echo 'graph_vlabel routes'
echo 'graph_category network'
2011-02-13 02:07:13 +01:00
echo 'graph_scale no'
/usr/local/bin/vtysh -e "sh ip ro sum" | awk '
/connected/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
/static/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
/ebgp/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
/ibgp/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
2011-02-20 16:44:33 +01:00
/ospf/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
2011-02-13 02:07:13 +01:00
/Totals/ {print $1 ".label " $1 "\n" $1 ".draw LINE1"}
'
exit 0
fi
/usr/local/bin/vtysh -e "sh ip ro sum" | awk '
/connected/ {print $1 ".value "$2}
/static/ {print $1 ".value "$2}
/ebgp/ {print $1 ".value "$2}
/ibgp/ {print $1 ".value "$2}
2011-02-20 16:44:33 +01:00
/ospf/ {print $1 ".value "$2}
2011-02-13 02:07:13 +01:00
/Totals/ {print $1 ".value "$2}
'