moved around config & autoconf enabled
authorArthur Lutz <arthur.lutz@logilab.fr>
Tue, 01 Jul 2008 12:33:52 +0200
changeset 9 2b3a5abc218c
parent 8 80fc069b2082
child 10 3c0f45cec8e3
moved around config & autoconf enabled
README
zope_conflict_errors
zope_errors
zope_zeo_stats_
--- a/README	Mon Jun 30 17:47:03 2008 +0200
+++ b/README	Tue Jul 01 12:33:52 2008 +0200
@@ -1,7 +1,8 @@
 README for munin_zope_plugins
 =============================
 
-This project aims to ease the monitoring of zope servers. It is a set of munin plugins that monitor the following indicators : 
+This project aims to ease the monitoring of zope servers. It is a set
+of munin plugins that monitor the following indicators :
 
 * zope errors (from various error_logs)
 * zope conflict errors (from log files on server)
--- a/zope_conflict_errors	Mon Jun 30 17:47:03 2008 +0200
+++ b/zope_conflict_errors	Tue Jul 01 12:33:52 2008 +0200
@@ -15,23 +15,32 @@
 # You should have received a copy of the GNU General Public License along with
 # this program; if not, write to the Free Software Foundation, Inc.,
 # 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#%# family=contrib
+#%# capabilities=autoconf suggest
+
+# this should really go in plugins.conf
+# logs = ['/var/lib/zope/plone-site/event.log',]
+logs = []
+date_format = '%Y-%m-%dT%H:%M:%S'
+#end config
 
 from sys import argv
 from datetime import datetime
 import time
 
-logs = ['event.log']
-date_format = '%Y-%m-%dT%H:%M:%S'
 
-if len(argv) > 1 and argv[1] == 'config':
+if len(argv) > 1:
+    if argv[1] == 'config':
 
-    print """graph_title Zope Conflict Errors 
+        print """graph_title Zope Conflict Errors 
     graph_vlabel Count 
     graph_category Zope
     graph_info The number of conflict errors in event logs over the past 24h""".replace("\n    ","\n")
-    for i in range(0,len(logs)):
-        print """error_count%(i)s.label %(n)s error count"""% dict(i=i,
-                                                                   n=logs[i])
+        for i in range(0,len(logs)):
+            print """error_count%(i)s.label %(n)s error count"""% dict(i=i,
+                                                                       n=logs[i])
+    elif argv[1] == 'autoconf':
+        print 'yes'
 else:
     for i in range(0,len(logs)):
         log = logs[i]
--- a/zope_errors	Mon Jun 30 17:47:03 2008 +0200
+++ b/zope_errors	Tue Jul 01 12:33:52 2008 +0200
@@ -15,21 +15,27 @@
 # You should have received a copy of the GNU General Public License along with
 # this program; if not, write to the Free Software Foundation, Inc.,
 # 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#%# family=contrib
+#%# capabilities=autoconf suggest
 
 from sys import argv
 import httplib
-conns = []
 
 # this should really go in plugins.conf
 conn = httplib.HTTPConnection("localhost",9080)
-
+# add here the ids of your web sites after root
+sites = ['root', ]
+#end config
 
 url = "/munin_error_stats.py"
-sites = ['root', 'plone', 'portal']
 
-if len(argv) > 1 and argv[1] == 'config':
+if len(argv) > 1 and argv[1] == 'autoconf':
+    print 'yes'
+elif len(argv) > 1 and argv[1] == 'suggest':
+    print ''
+elif len(argv) > 1 and argv[1] == 'config':
 
-    print """graph_title Zope Errors 
+    print """graph_title Zope Errors over 24h
     graph_vlabel Count 
     graph_category Zope
     graph_info The number of errors in error_log over the past 24h""".replace("\n    ","\n")
--- a/zope_zeo_stats_	Mon Jun 30 17:47:03 2008 +0200
+++ b/zope_zeo_stats_	Tue Jul 01 12:33:52 2008 +0200
@@ -26,10 +26,8 @@
 #%# capabilities=autoconf suggest
 
 # config (should be in plugins.conf)
-
 ZEOHOST=localhost
 ZEOPORT=8101
-
 # end config
 
 PATH="$PATH:/usr/local/bin"