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 8079d6e..b292982 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";
+       $stream =~ s/\?frag=.*//;
        ++$streams{$stream};
        ++$total;
 }