root / plugins / network / quagga_routes @ 92483a04
Historique | Voir | Annoter | Télécharger (908 octets)
| 1 |
#!/bin/sh |
|---|---|
| 2 |
|
| 3 |
if [ "$1" = "config" ]; then |
| 4 |
echo 'graph_title quagga routes' |
| 5 |
echo 'graph_args -l 0' |
| 6 |
echo 'graph_vlabel routes' |
| 7 |
echo 'graph_category network' |
| 8 |
echo 'graph_scale no' |
| 9 |
/usr/local/bin/vtysh -e "sh ip ro sum" | awk ' |
| 10 |
/connected/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
|
| 11 |
/static/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
|
| 12 |
/ebgp/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
|
| 13 |
/ibgp/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
|
| 14 |
/ospf/ {print $1 ".label " $1 "\n" $1 ".draw AREASTACK"}
|
| 15 |
/Totals/ {print $1 ".label " $1 "\n" $1 ".draw LINE1"}
|
| 16 |
' |
| 17 |
exit 0 |
| 18 |
fi |
| 19 |
|
| 20 |
/usr/local/bin/vtysh -e "sh ip ro sum" | awk ' |
| 21 |
/connected/ {print $1 ".value "$2}
|
| 22 |
/static/ {print $1 ".value "$2}
|
| 23 |
/ebgp/ {print $1 ".value "$2}
|
| 24 |
/ibgp/ {print $1 ".value "$2}
|
| 25 |
/ospf/ {print $1 ".value "$2}
|
| 26 |
/Totals/ {print $1 ".value "$2}
|
| 27 |
' |
