#!/bin/sh # -*- sh -*- : << =cut =head1 NAME icecast yp stats - Plugin to monitor Icecast YP stats =head1 CONFIGURATION No configuration =head1 AUTHOR Unknown author =head1 LICENSE Unknown license =head1 BUGS =over 4 =item SuSE: passive connections rejected At least one SuSE netstat appears to report "passive connections rejected because of time stamp" We have never seen that, patch requested. =back =head1 MAGIC MARKERS #%# family=auto #%# capabilities=autoconf =cut . $MUNIN_LIBDIR/plugins/plugin.sh if [ "$1" = "autoconf" ]; then # if ( netstat -s 2>/dev/null >/dev/null ); then # echo yes # exit 0 # else # if [ $? -eq 127 ] # then # echo "no (netstat program not found)" # exit 0 # else # echo no # exit 0 # fi # fi echo yes exit 0 fi if [ "$1" = "config" ]; then echo 'graph_title Icecast YP stream stats' echo 'graph_args --base 1000 -l 0' echo 'graph_vlabel active stations' echo 'graph_category yp' # echo 'graph_period second' echo 'graph_info This graph shows the activity of stations in YP.' echo 'total.label total' echo 'total.type GAUGE' echo 'total.min 0' echo 'total.info The total number of streams listed.' echo 'vorbis.label vorbis' echo 'vorbis.type GAUGE' echo 'vorbis.min 0' echo 'vorbis.info The number of vorbis streams listed.' echo 'opus.label opus' echo 'opus.type GAUGE' echo 'opus.min 0' echo 'opus.info The number of opus streams listed.' echo 'theora.label theora' echo 'theora.type GAUGE' echo 'theora.min 0' echo 'theora.info The number of theora streams listed.' echo 'webm.label WebM' echo 'webm.type GAUGE' echo 'webm.min 0' echo 'webm.info The number of WebM streams listed.' echo 'mp3.label mp3' echo 'mp3.type GAUGE' echo 'mp3.min 0' echo 'mp3.info The number of MP3 streams listed.' echo 'aac.label AAC' echo 'aac.type GAUGE' echo 'aac.min 0' echo 'aac.info The number of AAC streams listed.' echo 'aacp.label AAC+' echo 'aacp.type GAUGE' echo 'aacp.min 0' echo 'aacp.info The number of AAC+ streams listed.' echo 'nsv.label NSV' echo 'nsv.type GAUGE' echo 'nsv.min 0' echo 'nsv.info The number of NSV streams listed.' echo 'other.label other' echo 'other.type GAUGE' echo 'other.min 0' echo 'other.info The number of other streams listed.' echo 'radionomy.label radionomy' echo 'radionomy.type GAUGE' echo 'radionomy.min 0' echo 'radionomy.info The number of Radionomy streams listed.' echo 'totalmr.label total minus Radionomy' echo 'totalmr.type GAUGE' echo 'totalmr.min 0' echo 'totalmr.info The number of streams listed, excluding Radionomy.' exit 0 fi ENVIRONMENT=prod php5 /var/www/dir.xiph.org/munin/munin_streams.php #netstat -s | awk ' #/active connections ope/ { print "active.value " $1 } #/passive connection ope/ { print "passive.value " $1 } #/failed connection/ { print "failed.value " $1 } #/connection resets/ { print "resets.value " $1 } #/connections established/ { print "established.value " $1 }'