Bug-fixes for innreport: - Test for the existence of 'img_dir' instead of 'html_dir' in innreport; - Trailing comma after %innfeed_spooled with "Outgoing feeds (innfeed) by Articles"; - Column "Total" of "Outgoing feeds (innfeed) by Volume" tries to add two hashes which evaluates to a constant 0; - Gracefully handle undefined hash elements in "NNRP readership statistics (by domain)"; - Also added two error messages generated by perl-nocem. http://inn.eyrie.org/viewcvs/branches/2.4/scripts/innreport.in?r1=8142&r2=8141&pathrev=8142&view=patch http://inn.eyrie.org/viewcvs/branches/2.4/samples/innreport.conf.in?r1=7945&r2=7944&pathrev=7945&view=patch http://inn.eyrie.org/viewcvs/branches/2.4/scripts/innreport_inn.pm?r1=7945&r2=7944&pathrev=7945&view=patch --- 2.4/scripts/innreport.in 2008/10/05 23:47:25 8141 +++ 2.4/scripts/innreport.in 2008/10/07 17:08:32 8142 @@ -212,7 +212,7 @@ $IMG_pth = $ref{'webpath'} if defined $ref{'webpath'}; $IMG_dir = $HTML_dir . "/" . $IMG_pth - if (defined $output{'default'}{'html_dir'} || + if (defined $output{'default'}{'img_dir'} || defined $ref{'w'} || defined $ref{'webpath'}) && (defined $output{'default'}{'html_dir'} || --- 2.4/samples/innreport.conf.in 2008/08/03 07:30:03 7944 +++ 2.4/samples/innreport.conf.in 2008/08/03 07:47:10 7945 @@ -1267,7 +1267,7 @@ data { name "Spooled"; color "#AF00FF"; - value "%innfeed_spooled,"; + value "%innfeed_spooled"; }; }; }; @@ -1347,12 +1347,6 @@ color "#FFAF00"; value "%innfeed_rejected_size"; }; - data { - name "Total"; - color "#00FF00"; - value "%innfeed_accepted_size + - %innfeed_rejected_size"; - }; }; }; @@ -2116,8 +2110,8 @@ name "Rej"; format_name "%4s"; format "%4d"; - value "$nnrpd_post_rej{$key} + - $nnrpd_post_error{$key}"; + value "($nnrpd_post_rej{$key}||0) + + ($nnrpd_post_error{$key}||0)"; total "total(%nnrpd_post_rej) + total(%nnrpd_post_error)"; }; @@ -2179,8 +2173,8 @@ name "Rej"; format_name "%4s"; format "%4d"; - value "$nnrpd_dom_post_rej{$key} + - $nnrpd_dom_post_error{$key}"; + value "($nnrpd_dom_post_rej{$key}||0) + + ($nnrpd_dom_post_error{$key}||0)"; total "total(%nnrpd_dom_post_rej) + total(%nnrpd_dom_post_error)"; }; --- 2.4/scripts/innreport_inn.pm 2008/08/03 07:30:03 7944 +++ 2.4/scripts/innreport_inn.pm 2008/08/03 07:47:10 7945 @@ -440,8 +440,8 @@ # The exact timers change from various versions of INN, so try to deal # with this in a general fashion. if ($left =~ m/^\S+\s+ # ME - time\ (\d+)\s+ # time - ((?:\S+\ \d+\(\d+\)\s*)+) # timer values + time\s(\d+)\s+ # time + ((?:\S+\s\d+\(\d+\)\s*)+) # timer values $/ox) { $innd_time_times += $1; my $timers = $2; @@ -719,8 +719,8 @@ # ME time X nnnn X(X) [...] return 1 if $left =~ m/backlogstats/; if ($left =~ m/^\S+\s+ # ME - time\ (\d+)\s+ # time - ((?:\S+\ \d+\(\d+\)\s*)+) # timer values + time\s(\d+)\s+ # time + ((?:\S+\s\d+\(\d+\)\s*)+) # timer values $/ox) { $innfeed_time_times += $1; my $timers = $2; @@ -1459,8 +1459,8 @@ # The exact timers change from various versions of INN, so try to deal # with this in a general fashion. if ($left =~ m/^\S+\s+ # ME - time\ (\d+)\s+ # time - ((?:\S+\ \d+\(\d+\)\s*)+) # timer values + time\s(\d+)\s+ # time + ((?:\S+\s\d+\(\d+\)\s*)+) # timer values $/ox) { $nnrpd_time_times += $1; my $timers = $2; @@ -1683,13 +1683,28 @@ $nocem_totalids{$nocem_lastid} += $2; return 1; } - if ($left =~ /bad signature from (.*)/o) { + if ($left =~ /Article <[^>]*>: (.*) \(ID [[:xdigit:]]*\) not in keyring/o) { + $nocem_badsigs{$1}++; + $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1}); + $nocem_totalbad++; + $nocem_lastid = $1; + return 1; + } + if ($left =~ /Article <[^>]*>: bad signature from (.*)/o) { $nocem_badsigs{$1}++; $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1}); $nocem_totalbad++; $nocem_lastid = $1; return 1; } + if ($left =~ /Article <[^>]*>: malformed signature/o) { + $nocem_badsigs{'N/A'}++; + $nocem_goodsigs{'N/A'} = 0 unless ($nocem_goodsigs{'N/A'}); + $nocem_totalbad++; + $nocem_lastid = 'N/A'; + return 1; + } + return 1; }