You can monitor the multicast audience and plot it with Munin
To get the audience, you have to ask your switch how much people are suscribed to each multicast group.
Note : This script use a static configuration, with the sap announces and the json information it is possible to make it dynamic. It's here as an example to help you create your own scripts
Example script for French DVB-T
#! /usr/bin/perl
################
no warnings;
#Script pour savoir le nombre de
#personnes qui regardent la TnT
#TODO : mettre un #!$ de snmp au lieu de telnet
#
#
###############
# Tout les trucs à la cons
# Bon commencons par toutes les infos nécessaires à munin pour la conf:
if ($ARGV[0] and $ARGV[0] eq "autoconf"){
print "yes\n";
exit 0;
}
if ($ARGV[0] and $ARGV[0] eq "config"){
print "graph_title Nombre de telespectateurs de la TnT\n";
print "graph_args --base 1000 -l 0 \n";
print "graph_vlabel Nombre de personnes\n";
print "graph_category Utilisateurs\n";
print "graph_info Ce graphe montre le nombre de spectateurs tnt.\n";
print "tf1.label TF1 \n";
print "tf1.draw LINE2\n";
print "france3.label France3 \n";
print "france3.draw LINE2\n";
print "canal.label Canal+ \n";
print "canal.draw LINE2\n";
print "france5.label France5 \n";
print "france5.draw LINE2\n";
print "m6.label M6 \n";
print "m6.draw LINE2\n";
print "arte.label ARTE \n";
print "arte.draw LINE2\n";
print "direct8.label Direct8 \n";
print "direct8.draw LINE2\n";
print "w9.label W9 \n";
print "w9.draw LINE2\n";
print "tmc.label TMC \n";
print "tmc.draw LINE2\n";
print "nt1.label NT1 \n";
print "nt1.draw LINE2\n";
print "nrj12.label NRJj12 \n";
print "nrj12.draw LINE2\n";
print "lcp.draw LCP \n";
print "lcp.draw LINE2\n";
print "france4.label France4 \n";
print "france4.draw LINE2\n";
print "bfm.label BFM \n";
print "bfm.draw LINE2\n";
print "itele.label ITV \n";
print "itele.draw LINE2\n";
print "europe2tv.label Virgin17 \n";
print "europe2tv.draw LINE2\n";
print "gulli.label Gulli \n";
print "gulli.draw LINE2\n";
print "tpsstar.label TPSStar \n";
print "tpsstar.draw LINE2\n";
print "parispremiere.label Paris 1ere \n";
print "parispremiere.draw LINE2\n";
print "canalsport.label Canal+Sport \n";
print "canalsport.draw LINE2\n";
print "vlc.label Vlc ouvert \n";
print "vlc.draw AREA\n";
exit 0;
}
# On commence le vrai script
use Net::Telnet::Cisco;
@hosts = ('switch_name1','switch_name2');
$pass = MDP_SWITCH;
my $h_stats;
$h_stats->{'239.195.255.255'} =
$h_stats->{'239.255.2.255'} =
$h_stats->{'239.255.2.1'} =
$h_stats->{'239.255.2.2'} =
$h_stats->{'239.255.2.3'} =
$h_stats->{'239.255.2.4'} =
$h_stats->{'239.255.2.5'} =
$h_stats->{'239.255.2.6'} =
$h_stats->{'239.255.2.7'} =
$h_stats->{'239.255.2.8'} =
$h_stats->{'239.255.2.9'} =
$h_stats->{'239.255.2.10'} =
$h_stats->{'239.255.2.11'} =
$h_stats->{'239.255.2.12'} =
$h_stats->{'239.255.2.13'} =
$h_stats->{'239.255.2.14'} =
$h_stats->{'239.255.2.15'} =
$h_stats->{'239.255.2.16'} =
$h_stats->{'239.255.2.17'} =
$h_stats->{'239.255.2.18'} =
$h_stats->{'239.255.2.24'} =
$h_stats->{'239.255.2.31'} =
$h_stats->{'239.255.2.32'} =
foreach $host (@hosts) {
my $session = Net::Telnet::Cisco->new(Host => $host);
$session->login('cisco',$pass);
@output = $session->cmd('sh ip igmp snooping group');
$session->close;
my ($curip, $ifs);
foreach $line (@output) {
if ($line =~ /^\d+\s+(\d+\.\d+\.\d+\.\d+)\s+igmp\s+(.*)/) {
$curip = $1;
$ifs = $2;
foreach (split(/,/,$ifs)) {
$h_stats->{$curip}++ if ($_ =~ /Fa/);
}
} elsif (($line !~ /igmp/) && ($line =~ m|\s+(.*Fa.*)|)) {
$ifs = $1;
foreach (split(/,/,$ifs)) {
$h_stats->{$curip}++ if ($_ =~ /Fa/);
}
}
}
}
print 'tf1.value '.$h_stats->{'239.255.2.1'}."\n";# TF1
print 'france2.value '.$h_stats->{'239.255.2.2'}."\n"; # France 2
print 'france3.value '.$h_stats->{'239.255.2.3'}."\n"; # France 3
print 'canal.value '.$h_stats->{'239.255.2.4'}."\n"; # Canal +
print 'france5.value '.$h_stats->{'239.255.2.5'}."\n"; # France 5
print 'm6.value '.$h_stats->{'239.255.2.6'}."\n"; # M6
print 'arte.value '.$h_stats->{'239.255.2.7'}."\n"; # Arte
print 'direct8.value '.$h_stats->{'239.255.2.8'}."\n"; # Direct 8
print 'w9.value '.$h_stats->{'239.255.2.9'}."\n" ;# W9
print 'tmc.value '.$h_stats->{'239.255.2.10'}."\n" ;# TMC
print 'nt1.value '.$h_stats->{'239.255.2.11'}."\n" ;# NT1
print 'nrj12.value '.$h_stats->{'239.255.2.12'}."\n" ;# NRJ 12
print 'lcp.value '.$h_stats->{'239.255.2.13'}."\n" ;# LCP
print 'france4.value '.$h_stats->{'239.255.2.14'}."\n" ;# France 4
print 'bfm.value '.$h_stats->{'239.255.2.15'}."\n" ;# BFM
print 'itele.value '.$h_stats->{'239.255.2.16'}."\n" ;# i>Tele
print 'europe2tv.value '.$h_stats->{'239.255.2.17'}."\n" ;# Europe 2 TV
print 'gulli.value '.$h_stats->{'239.255.2.18'}."\n"; # Gulli
print 'tpsstar.value '.$h_stats->{'239.255.2.24'}."\n"; # TPS Star
print 'parispremiere.value '.$h_stats->{'239.255.2.31'}."\n"; # Paris Premiere
print 'canalsport.value '.$h_stats->{'239.255.2.32'}."\n"; # Canal + Sport
print 'vlc.value '.$h_stats->{'239.195.255.255'}; # nombre de vlc ouvert