Regexp-Log-BlueCoat
view release on metacpan or search on metacpan
eg/notmatch.pl view on Meta::CPAN
#
# Regexp::Log::BlueCoat version $Regexp::Log::BlueCoat::VERSION generated the following regexp:
# $re
#
# Captured fields: @fields
#
# The following log lines did not match:
EOT
while (<>) {
# ignore streaming media for now
next if /^(?:Windows_Media|<RealMedia>)/;
my %data;
@data{@fields} = (m/$re/og) or print;
}
lib/Regexp/Log/BlueCoat.pm view on Meta::CPAN
Regexp::Log::BlueCoat is a module that computes custom regular
expressions to parse log files generated by the BlueCoat Sytems
I<Port 80 Security Appliance>.
See the Regexp::Log documentation for a description of the standard
Regexp::Log interface.
=head2 Streaming media logs
This version of Regexp::Log::BlueCoat does not support streaming
related logs. You will have to add the following line at the beginning
of the log parsing loop in your scripts, if your BlueCoat appliance
is configured to log those events.
next if /^(?:Windows_Media|<RealMedia>)/;
This may or may not be faster than have the regular expression generated
by the regexp() method fail on each streaming log line.
=cut
my $IP = '\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}';
my $HOST = '[-.\\S]+';
# define the BlueCoat specific stuff
%REGEXP = (
# %% - Denotes '%' character -
lib/Regexp/Log/BlueCoat.pm view on Meta::CPAN
# UFS specific regexps
if ( defined $ufs and $ufs ne '' ) {
my %categories = ( %{ $UFS{$ufs} }, %{ $self->{_ufs}{$ufs} } );
my $categories = join '|', sort values %categories;
$self->{_regexp} =~ s/%f/$categories/g;
}
}
=head1 TODO
Support streaming logs: Windows Media and RealMedia.
Support the W3C Extended Log File Format (ELFF), which is a subset of
the Blue Coat format where each field is described using a text string.
Have a look at the entries that produce multi-line logs.
=head1 BUGS
Most of the developpement has been done when I was trying to process
logs created with the following format:
( run in 0.443 second using v1.01-cache-2.11-cpan-4d50c553e7e )