The first idea for this section is here! Monitoring the plays of a Podcast Channel.IntroductionIvoox
is a Podcast's website. A lot of Radio shows and other kind of audio documents are posted there by their creators.
The users create one Podcast Channel and post the audio files when he wants. Each audio file has a plays counter updated every hour.
We're going to monitor a full podcast channel with Pandora FMS to have all the plays statistics available without enter the site.Purpose
In this example we're going to monitor the plays of the Podcast Channel "Islas Ozores
": A stupid comedy radio show of one of our team members :P.Procedure
- Create an agent in Pandora FMS (We named it 'podcast-islas-ozores')
- Create a perl script in the server that parse all the current audio file names and their number of plays. We configure it with the main podcast URL.
From this string, we parse the name and URL of the current audio files.
From each URL and investigating the Ivoox source code, we discovered the URL that contains the plays data: In example for audio file URL http://www.ivoox.com/islas-ozores-s02-e06-26oct2011-union-madrid-audios-mp3_rf_861842_1.html the URL of the plays data is http://www.ivoox.com/pestanas_rk_estadisticas_861842_1.html. Is easy to see that we can extrapolate this procedure with the ID of each audio file: 861842 for this case.
This script obtains all the audio files names for this channel and their number of plays. Then build a XML file with our agent name ('podcast-islas-ozores') and a module for each audio file with the name of the file as name, the data of type 'generic numeric' and the current number of plays as data. Then copy this XML file to data_in path of the Pandora Installation.
The scripts returns 'OK' to know if it has been finished the execution.
Download the script
- Create a plug-in module that execute the script with a 3600 seconds (1 hour) interval.
Finally we can view in a Pandora FMS agent all the audio files plays easily.
This method is improvable adding parameters to script to do it more generic, building visual maps and reports with graphs, configuring alerts etc. But is a good beginning to work on it.