We have a LAN with 2x Cisco 4500's as gateways running HSRP. We're using Exterity HD IP Encoders to take HD video and put it onto the network as a multicast UDP stream (playable in VLC).
I have a fairely extensive Nagios setup on Linux and would like to find some way to check that:
- Multicast stream is on the network.
- Multicast stream isn't frozen, so check for audio or ...
- Confirm the source IP of the stream matches what we expect from the multicast address.
1 and 3 could be combined maybe.
My approach thus far:
Using SNMP on the Cisco HSRP gateway IP: Nagios sends 2 arguments, IP of the host (which should be the source of the multicast), i.e. 172.18.25.101 Second argument is IP of the stream ($mroute), i.e. 188.8.131.52
snmpwalk -v 2c -c changed 172.30.0.1 184.108.40.206.220.127.116.11.2.1.4 | grep $mroute | sed -e 's/.*IpAddress: //'
A few if's later, and I have, if the stream is on the network, if the multicast I sid for matches the host ip, or if not tells me where is is coming from. And exits correct for nagios.
Or so I thought. Generally it is working as expected, but randomly with some hosts the source IP is not expected and is something different, and when checking manually it is clearly not correct. I think maybe a topology change or something (we have quite a large network), and it's seen from the other gateway or... I'm not great on multicast sorry.
I'm pretty much stuck with the above part.
I then wanted to check that the video/audio was not frozen, I thought another check could be to use mplayer to dump the stream for 2 seconds to a file and do a check based on the size of the file. if it is very small then its probably frozen. But the stream will still send an image, so go with an audio check over a longer, say 10 second period. The more I thought about this, the more I thought "there must be a better way"...
IPTV is pretty big these days, how are people monitoring multicast streams.
Thanks very much.