Tail-Stat

 view release on metacpan or  search on metacpan

lib/Tail/Stat/Plugin/icecast.pm  view on Meta::CPAN

package Tail::Stat::Plugin::icecast;

=head1 NAME

Tail::Stat::Plugin::icecast - Statistics collector for Icecast streaming server

=cut

use strict;
use warnings 'all';


=head1 SYNOPSIS

tstatd icecast error.log


=head1 LOG FORMATS

Plugin search icecast error logs for records like:

=over

=item C<listener count>

 INFO source/source_main listener count on /mv128.mp3 now 73

=back


=head1 STATISTICS

=head2 Overall statistics

=over

=item C<online:I<stream>>

Current number of connected clients.

=item C<enter:I<stream>>

Total number of clients connects.

=item C<leave:I<stream>>

Total number of clients disconnects.

=back

=cut


use base 'Tail::Stat::Plugin';


sub regex { qr{

	(?:
		INFO                      # just a marker
			\s+
		source/source_main        # is it same for all servers?
			\s+
		listener\scount\son
			\s+



( run in 0.611 second using v1.01-cache-2.11-cpan-39bf76dae61 )