summaryrefslogtreecommitdiff
path: root/other_scripts
diff options
context:
space:
mode:
authoruvok cheetah2023-08-25 20:39:45 +0200
committeruvok cheetah2023-08-25 20:39:45 +0200
commitc4a20c4adee1d71f06c32dccf9d7b0178a4fff24 (patch)
tree6a52d45a51ddd252920fc01fd9ca6f45d42bb10f /other_scripts
parent5efe2d5b32d0bcd338c19f7b689886c0abfca6b5 (diff)
munin,bird: Fix error in capture group
Diffstat (limited to 'other_scripts')
-rwxr-xr-xother_scripts/munin_bird11
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;