]> git.sesse.net Git - cubemap/commitdiff
Make the Munin plugin count downloading fragments as equivalent to the stream.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 17 Apr 2018 16:10:06 +0000 (18:10 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 17 Apr 2018 16:10:06 +0000 (18:10 +0200)
This doesn't really fix the full issue of counting HLS clients, but at least
it's a start.

munin/cubemap

index 8079d6e4d750b86e92ed8f595a535046b76d5503..b2929823ea5b08bcb8427cfec1e040bb009859d4 100755 (executable)
@@ -46,6 +46,7 @@ while (<$stats>) {
        chomp;
        my ($ip, $fd, $mark, $stream, $connected_time, $bytes_sent, $loss_bytes, $loss_events) = 
                /^(\S+) (\d+) (\d+) (\S+) (\d+) (\d+) (\d+) (\d+)/ or die "Invalid stats format";
        chomp;
        my ($ip, $fd, $mark, $stream, $connected_time, $bytes_sent, $loss_bytes, $loss_events) = 
                /^(\S+) (\d+) (\d+) (\S+) (\d+) (\d+) (\d+) (\d+)/ or die "Invalid stats format";
+       $stream =~ s/\?frag=.*//;
        ++$streams{$stream};
        ++$total;
 }
        ++$streams{$stream};
        ++$total;
 }