You are here: Fladi.at>Projects Web>Icecast2ForCacti (03 Jul 2009, fladischermichael)EditAttach

Icecast2ForCacti

Software provided to help monitoring Icecast2 servers with Cacti.

Download

Latest release: i24c-0.2.tar.bz2

Installation

Prepare Icecast2 server

Move the file cacti.xsl to the web path of your Icecast2 server. The path is defined in the Icecast2 configuration file in the <webroot/> element. For GNU/Debian this path is set to /usr/share/icecast2/web by default. Calling http://<server>:8000/cacti.xsl should now show XML output with <cacti> as the root element.

Install icecast2.py

The Python script icecast2.py must be placed in the scripts directory (<path_cacti>/scripts/) which can be found at /usr/share/cacti/site/scripts/ for GNU/Debian. This may vary for your installation of Cacti. A working Python installation with libxml2 and urllib2 is required to run this script.

Install icecast2.xml

The query definition file icecast2.xml must be placed in the script_queries directory (<path_cacti>/resource/script_queries/) which can be found at /usr/share/cacti/site/resource/script_queries for GNU/Debian. This may vary for your installation of Cacti.

Install templates for Cacti

Import the template_icecast2.xml file in Cacti. I recommend you to use your own RRAs instead of the ones shipped with this template.

Add data query to device

Select a device which runs an Icecast2 server and add the Icecast2 data query. You can now create listener and traffic graphs for each stream served by this server.

Known issues

  • Only works with ICecast2 running on 8000. If the port differs it can be changed in the icecast2.py Python script. Since there seems to be no way to pass custom parameters from the device to the data query the port Icecast2 is listening has to be the same for all monitored instances.
  • The cacti.xsl on the Icecast2 server is readable without authentication. Usually this posses no threat but may be an issue for security freaks smile

Sourcecode

The most recent trunk of code is available at Subversion repository: http://subversion.fladi.at/scratchpad/FladischerMichael/trunk/Icecast2%20for%20Cacti/
Topic revision: r1 - 03 Jul 2009 - 11:12:51 - fladischermichael
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Fladi.at? Send feedback