diff --git a/README b/README index fdce3bf..e850f6f 100644 --- a/README +++ b/README @@ -427,6 +427,10 @@ CONFIGURATION Used to set the number of top url and second level domain to show. Default is top 100. + TopDenied number + Used to set the number of top denied url to show. Default is top + 100. + TopStorage number Top number of url to preserve on each data file sorted by OrderUrl. On huge access log it will improve a lot the performances but you diff --git a/SquidAnalyzer.pm b/SquidAnalyzer.pm index af85aad..65ed355 100644 --- a/SquidAnalyzer.pm +++ b/SquidAnalyzer.pm @@ -1707,6 +1707,7 @@ sub _init $self->{CostPrice} = $options{CostPrice} || 0; $self->{Currency} = $options{Currency} || '€'; $self->{TopNumber} = $options{TopNumber} || 10; + $self->{TopDenied} = $options{TopDenied} || 10; $self->{TopStorage} = $options{TopStorage} || 0; $self->{TransfertUnit} = $options{TransfertUnit} || 'BYTES'; if (!grep(/^$self->{TransfertUnit}$/i, 'BYTES', 'KB', 'MB', 'GB')) { @@ -5102,7 +5103,6 @@ sub _print_user_denied_detail } - sub _print_top_url_stat { my ($self, $outdir, $year, $month, $day, $week) = @_; @@ -5517,7 +5517,7 @@ sub _print_top_denied_stat } my $t1 = $Translate{"Url_Hits_title"}; - $t1 =~ s/\%d/$self->{TopNumber}/; + $t1 =~ s/\%d/$self->{TopDenied}/; print $out $self->_print_title($t1, $stat_date, $week); print $out qq{ @@ -5599,7 +5599,7 @@ sub _print_top_denied_stat $bl }; $i++; - last if ($i > $self->{TopNumber}); + last if ($i > $self->{TopDenied}); } print $out qq{}; diff --git a/doc/SquidAnalyzer.pod b/doc/SquidAnalyzer.pod index 2856e75..43665df 100644 --- a/doc/SquidAnalyzer.pod +++ b/doc/SquidAnalyzer.pod @@ -449,6 +449,11 @@ special character. Default is € Used to set the number of top url and second level domain to show. Default is top 100. +=item TopDenied number + +Used to set the number of top denied url to show. +Default is top 100. + =item TopStorage number Top number of url to preserve on each data file sorted by OrderUrl. diff --git a/etc/squidanalyzer.conf b/etc/squidanalyzer.conf index 42cf761..071ee29 100644 --- a/etc/squidanalyzer.conf +++ b/etc/squidanalyzer.conf @@ -81,6 +81,9 @@ Currency € # Top number of url to show from all url extracted from the log TopNumber 100 +# Top number of denied URL to show +TopDenied 100 + # Top number of url to preserve on each data file sorted by OrderUrl. # On huge access log it will improve a lot the performances but you # will have less precision in the top url. Default to 0, all url will