diff options
author | uvok cheetah | 2023-08-25 20:39:45 +0200 |
---|---|---|
committer | uvok cheetah | 2023-08-25 20:39:45 +0200 |
commit | c4a20c4adee1d71f06c32dccf9d7b0178a4fff24 (patch) | |
tree | 6a52d45a51ddd252920fc01fd9ca6f45d42bb10f | |
parent | 5efe2d5b32d0bcd338c19f7b689886c0abfca6b5 (diff) |
munin,bird: Fix error in capture group
-rwxr-xr-x | other_scripts/munin_bird | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/other_scripts/munin_bird b/other_scripts/munin_bird index 294104e..ad6b9ca 100755 --- a/other_scripts/munin_bird +++ b/other_scripts/munin_bird @@ -95,13 +95,20 @@ sub get_stats { next unless $protocol ~~ $protocols; $stats->{$name}->{title} = $1; } -# when (/^\s+Routes:\s+(\d+)\s+imported,\s+(\d+)\s+exported,\s+(\d+)\s+preferred$/){ - when (/^\s+Routes:\s+(\d+)\s+imported,(?:\s+(\d+)\s+filtered,)?\s+(\d+)\s+exported,\s+(\d+)\s+preferred$/){ + # no filtered present + 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}->{exported} = $2; $stats->{$name}->{preferred} = $3; } + # filtered present + 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}->{exported} = $3; + $stats->{$name}->{preferred} = $4; + } # received rejected filtered ignored accepted when (/^\s+(Import|Export)\s(updates|withdraws):\s+(\d+|-+)\s+(\d+|-+)\s+(\d+|-+)\s+(\d+|-+)\s+(\d+|-+)$/){ next unless $protocol ~~ $protocols; |