From c4a20c4adee1d71f06c32dccf9d7b0178a4fff24 Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Fri, 25 Aug 2023 20:39:45 +0200 Subject: munin,bird: Fix error in capture group --- other_scripts/munin_bird | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'other_scripts') 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; -- cgit v1.2.3