add config variables & doc
authorArthur Lutz <arthur.lutz@logilab.fr>
Mon, 30 Jun 2008 14:46:29 +0200
changeset 2 5132ebd0932b
parent 1 a59236443410
child 3 ea25521b42b5
add config variables & doc
zope_zeo_stats_
--- a/zope_zeo_stats_	Mon Jun 30 11:31:13 2008 +0200
+++ b/zope_zeo_stats_	Mon Jun 30 14:46:29 2008 +0200
@@ -1,20 +1,29 @@
 #! /bin/sh
 # arthur.lutz@logilab.fr   2008-06-25
 # graph the stats that we get from the monitor port of the zeo server
-
+#
+# First thing is to enable the monitor port in the .conf file for you zeo server
+#
 #%# family=contrib
 #%# capabilities=autoconf suggest
 
+# config (should be in plugins.conf)
+
+ZEOHOST=localhost
+ZEOPORT=8101
+
+# end config
 
 PATH="$PATH:/usr/local/bin"
 export PATH
 
+
 TYPE=`basename $0 | sed 's/^zope_zeo_stats_//g'`
 
 zeostat() {
 	#FIXME should store data in tmp file and then parse instead of connecting once per indicator
 	printf "$1.value "
-	telnet localhost 8101 2>&1 | sed 's/ //g' | egrep "$1:" | awk -F : '{print $2}'
+	telnet $ZEOHOST $ZEOPORT 2>&1 | sed 's/ //g' | egrep "$1:" | awk -F : '{print $2}'
 }
 
 case "$TYPE" in