[xiph-commits] r18707 - in branches/dir.xiph.org/munin: . plugins

dm8tbr at svn.xiph.org dm8tbr at svn.xiph.org
Sun Nov 18 05:37:04 PST 2012


Author: dm8tbr
Date: 2012-11-18 05:37:03 -0800 (Sun, 18 Nov 2012)
New Revision: 18707

Modified:
   branches/dir.xiph.org/munin/munin_listeners.php
   branches/dir.xiph.org/munin/munin_streams.php
   branches/dir.xiph.org/munin/plugins/icecast_yp_listeners
   branches/dir.xiph.org/munin/plugins/icecast_yp_streams
Log:
Munin plugins for number of streams and number of listeners indexed by dir.xiph.org. Includes hacks to remove very unreliable radionomy listings for better system health insight.


Modified: branches/dir.xiph.org/munin/munin_listeners.php
===================================================================
--- branches/dir.xiph.org/munin/munin_listeners.php	2012-11-18 13:34:17 UTC (rev 18706)
+++ branches/dir.xiph.org/munin/munin_listeners.php	2012-11-18 13:37:03 UTC (rev 18707)
@@ -77,6 +77,17 @@
 $other = $db->singleQuery($query)->current('count');
 printf("other.value %s\n", $other);
 
-//echo("OK.\n");
+// RADIONOMY
+$where = "s.listen_url LIKE 'http://%.radionomy.com:80/%'";
+$query = sprintf($query_pattern, $where);
+$radionomy = $db->singleQuery($query)->current('count');
+printf("radionomy.value %s\n", $radionomy);
 
+// Total minus radionomy
+$where = "s.listen_url NOT LIKE 'http://%.radionomy.com:80/%'";
+$query = sprintf($query_pattern, $where);
+$totalmr = $db->singleQuery($query)->current('count');
+printf("totalmr.value %s\n", $totalmr);
+
+
 ?>

Modified: branches/dir.xiph.org/munin/munin_streams.php
===================================================================
--- branches/dir.xiph.org/munin/munin_streams.php	2012-11-18 13:34:17 UTC (rev 18706)
+++ branches/dir.xiph.org/munin/munin_streams.php	2012-11-18 13:37:03 UTC (rev 18707)
@@ -82,6 +82,12 @@
 $radionomy = $db->singleQuery($query)->current('count');
 printf("radionomy.value %s\n", $radionomy);
 
+// total minus radionomy
+$query = "SELECT COUNT(*) AS count FROM `server` WHERE `last_touched_from` NOT LIKE '52089%'";
+$totalmr = $db->singleQuery($query)->current('count');
+printf("totalmr.value %s\n", $totalmr);
+
+
 //echo("OK.\n");
 
 ?>

Modified: branches/dir.xiph.org/munin/plugins/icecast_yp_listeners
===================================================================
--- branches/dir.xiph.org/munin/plugins/icecast_yp_listeners	2012-11-18 13:34:17 UTC (rev 18706)
+++ branches/dir.xiph.org/munin/plugins/icecast_yp_listeners	2012-11-18 13:37:03 UTC (rev 18707)
@@ -108,6 +108,14 @@
 	echo 'other.type GAUGE'
 	echo 'other.min 0'
 	echo 'other.info The number of other stream listeners.'
+	echo 'radionomy.label radionomy'
+	echo 'radionomy.type GAUGE'
+	echo 'radionomy.min 0'
+	echo 'radionomy.info The number of other stream listeners.'
+	echo 'totalmr.label total minus radionomy'
+	echo 'totalmr.type GAUGE'
+	echo 'totalmr.min 0'
+	echo 'totalmr.info The total number of stream listeners, excluding Radionomy.'
 	exit 0
 fi
 

Modified: branches/dir.xiph.org/munin/plugins/icecast_yp_streams
===================================================================
--- branches/dir.xiph.org/munin/plugins/icecast_yp_streams	2012-11-18 13:34:17 UTC (rev 18706)
+++ branches/dir.xiph.org/munin/plugins/icecast_yp_streams	2012-11-18 13:37:03 UTC (rev 18707)
@@ -112,6 +112,10 @@
 	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
 



More information about the commits mailing list