diff options
-rwxr-xr-x | roles/router/files/munin_bird (renamed from other_scripts/munin_bird) | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/other_scripts/munin_bird b/roles/router/files/munin_bird index ad6b9ca..7fb39cf 100755 --- a/other_scripts/munin_bird +++ b/roles/router/files/munin_bird @@ -78,8 +78,12 @@ sub get_stats { ($name, $protocol) = ($1,$2); next unless $protocol ~~ $protocols; $stats->{$name}->{protocol} = $protocol; - # fix uninit variable + # fix uninit variables $stats->{$name}->{title} = $name; + $stats->{$name}->{imported} = 0; + $stats->{$name}->{filtered} = 0; + $stats->{$name}->{exported} = 0; + $stats->{$name}->{preferred} = 0; } when (/^0001 /) { print $bird_ctl "show protocols all\n"; @@ -99,6 +103,7 @@ sub get_stats { when (/^\s+Routes:\s+(\d+)\s+imported,\s+(\d+)\s+exported,\s+(\d+)\s+preferred$/){ next unless $protocol ~~ $protocols; $stats->{$name}->{imported} = $1; + $stats->{$name}->{filtered} = 0; $stats->{$name}->{exported} = $2; $stats->{$name}->{preferred} = $3; } @@ -106,6 +111,7 @@ sub get_stats { when (/^\s+Routes:\s+(\d+)\s+imported,\s+(\d+)\s+filtered,\s+(\d+)\s+exported,\s+(\d+)\s+preferred$/){ next unless $protocol ~~ $protocols; $stats->{$name}->{imported} = $1; + $stats->{$name}->{filtered} = $2; $stats->{$name}->{exported} = $3; $stats->{$name}->{preferred} = $4; } @@ -151,6 +157,11 @@ exported.type GAUGE exported.info Exported routes exported.min 0 exported.draw LINE1 +filtered.label Filtered routes +filtered.type GAUGE +filtered.info Filtered routes +filtered.min 0 +filtered.draw LINE1 imported.label Imported routes imported.type GAUGE imported.info Impored routes @@ -223,6 +234,7 @@ sub fetch { print <<HEREDOC; multigraph ${name}_routes exported.value $proto->{exported} +filtered.value $proto->{filtered} imported.value $proto->{imported} preferred.value $proto->{preferred} multigraph ${name}_activity |