46fa714b9cfbc1029868051cd1e7391e5e83135e
Munin.md
... | ... | @@ -0,0 +1,16 @@ |
1 | +## Graph your routes |
|
2 | + |
|
3 | +``` |
|
4 | +#!/bin/bash |
|
5 | +if [ "$1" = "config" ];then |
|
6 | + echo graph_title Number of routes |
|
7 | + echo graph_vlabel num. routes |
|
8 | + echo graph_category network |
|
9 | + echo graph_scale no |
|
10 | + for AS in $(ip r|sed 's/.* dev //;s/ .*//'|sort|uniq -c|grep as|awk '{print $2}');do |
|
11 | + echo $AS.label $AS |
|
12 | + done |
|
13 | +else |
|
14 | + ip r|sed 's/.* dev //;s/ .*//'|sort|uniq -c|grep as|awk '{print $2".value "$1}' |
|
15 | +fi |
|
16 | +``` |
|
... | ... | \ No newline at end of file |