[Checkins] SVN: Products.ZNagios/trunk/ Imported ZNagios from the Gocept SVN and add package boilerplate
Hanno Schlichting
plone at hannosch.info
Wed Feb 25 10:13:16 EST 2009
Log message for revision 97260:
Imported ZNagios from the Gocept SVN and add package boilerplate
Changed:
_U Products.ZNagios/trunk/
A Products.ZNagios/trunk/CHANGES.txt
A Products.ZNagios/trunk/Products/
A Products.ZNagios/trunk/Products/ZNagios/
A Products.ZNagios/trunk/Products/ZNagios/__init__.py
A Products.ZNagios/trunk/Products/ZNagios/check_zope.py
A Products.ZNagios/trunk/Products/ZNagios/munin_client.py
A Products.ZNagios/trunk/Products/ZNagios/zeo_munin.py
A Products.ZNagios/trunk/Products/ZNagios/zope.cfg
A Products.ZNagios/trunk/Products/__init__.py
A Products.ZNagios/trunk/README.txt
A Products.ZNagios/trunk/buildout.cfg
A Products.ZNagios/trunk/docs/
A Products.ZNagios/trunk/docs/COPYRIGHT.txt
A Products.ZNagios/trunk/docs/LICENSE.txt
A Products.ZNagios/trunk/setup.py
-=-
Property changes on: Products.ZNagios/trunk
___________________________________________________________________
Added: svn:ignore
+ develop-eggs
eggs
fake-eggs
bin
parts
downloads
var
build
dist
local.cfg
*.egg-info
.installed.cfg
*.pyc
.Python
include
lib
Added: Products.ZNagios/trunk/CHANGES.txt
===================================================================
--- Products.ZNagios/trunk/CHANGES.txt (rev 0)
+++ Products.ZNagios/trunk/CHANGES.txt 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,26 @@
+Changelog
+=========
+
+0.3 - unreleased
+----------------
+
+- Added package infrastructure.
+ [hannosch]
+
+- Moved the source code from https://svn.gocept.com/repos/gocept/ZNagios/trunk
+ to the svn.zope.org repository at revision 29315.
+ [hannosch]
+
+0.2 - 2008-05-26
+----------------
+
+- Remove hard-coded authorization string.
+ [ctheune]
+
+- A script for reading data from a ZEO monitor server.
+ [ctheune]
+
+- Added basic munin support.
+ [ctheune]
+
+- Original implementation.
Property changes on: Products.ZNagios/trunk/CHANGES.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: Products.ZNagios/trunk/Products
___________________________________________________________________
Added: svn:ignore
+ *.pyc
*.pyo
Added: Products.ZNagios/trunk/Products/ZNagios/__init__.py
===================================================================
--- Products.ZNagios/trunk/Products/ZNagios/__init__.py (rev 0)
+++ Products.ZNagios/trunk/Products/ZNagios/__init__.py 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,130 @@
+# Copyright (c) 2004-2008 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id: __init__.py 5611 2008-02-29 09:43:31Z ctheune $
+#
+# ZNagios, (C) gocept gmbh & co. kg 2004-2008
+
+import DateTime
+import OFS.Application
+import Zope.App.startup
+import time
+
+
+# Delta used for taking delta measurements and normalization
+MUNIN_TIME_DELTA = 60*5
+
+
+def get_refcount(self):
+ """Determine the total amount of object reference counts."""
+ all = self.Control_Panel.DebugInfo.refcount()
+ size = 0
+ for v, n in all:
+ size += v
+ return size
+
+
+def get_activity(db):
+ now = float(DateTime.DateTime())
+ request = dict(chart_start=now-MUNIN_TIME_DELTA,
+ chart_end=now)
+ return db.getActivityChartData(200, request)
+
+
+def nagios(self):
+ """A method to allow nagios checks with a bit more information.
+
+ Returns a dictionary line-by-line with the following keys:
+
+ """
+ result = ""
+
+ # Uptime
+ result += "uptime: %s\n" % self.Control_Panel.process_time().strip()
+
+ # Database size
+ size = self.Control_Panel.db_size()
+ if size[-1] == "k":
+ size = float(size[:-1]) * 1024
+ else:
+ size = float(size[:-1]) * 1048576
+ result += "database: %s\n" % int(size)
+
+ # references
+ size = get_refcount(self)
+ result += "references: %s\n" % size
+
+ # error_log
+ errors = self.error_log._getLog()
+
+ i = 0
+ for error in errors:
+ result += "error%i: %s, %s, %s, %s, %s\n" % (i, error['type'], error['value'],
+ error['username'], error['userid'], error['url'])
+ i += 1
+ return result
+
+
+def munin(self):
+ """Return munin-compatible statistic data."""
+ data = {}
+
+ # Uptime
+ # ... in seconds since startup
+ data['uptime'] = int(time.time())-self.Control_Panel.process_start
+
+ # Reference counts
+ # ... total number of objects referenced
+ data['refcount-total'] = get_refcount(self)
+
+ main_db = self.Control_Panel.Database['main']
+ # Database size
+ # ... in bytes
+ data['db-bytes'] = main_db._getDB()._storage.getSize()
+ # ... in number of objects
+ data['db-objects'] = main_db.database_size()
+
+ # Cache information (whole process)
+ # ... total number of objects in all caches
+ data['db-cache-total-size'] = main_db.cache_length()
+
+ # Cache information (per connection/thread)
+ # ... target size
+ data['db-cache-target-size'] = main_db.cache_size()
+ for i, connection in enumerate(main_db.cache_detail_length()):
+ # ... active objects for the connect
+ data['db-cache-conn%s-active-objects' % i] = connection['ngsize']
+ # ... total objects (active and inactive) for the connection
+ data['db-cache-conn%s-total-objects' % i] = connection['size']
+
+ # Activity information
+ # measured for the last 5 minutes, normalized per second
+ activity = get_activity(main_db)
+ # ... loads per second in the last 5 minutes
+ data['db-loads'] = activity['total_load_count'] / MUNIN_TIME_DELTA
+ # ... stores per second in the last 5 minutes
+ data['db-stores'] = activity['total_store_count'] / MUNIN_TIME_DELTA
+ # ... number of connections to the DB per second in the last 5 minutes
+ data['db-connections'] = activity['total_connections'] / MUNIN_TIME_DELTA
+
+ # Error information
+ # ... number of errors in the log
+ data['errors-total'] = len(self.error_log._getLog())
+ # ... number of all conflict errors since startup
+ data['conflicts-total'] = Zope.App.startup.conflict_errors
+ # ... number of all unresolved conflict errors since startup
+ data['conflicts-unresolved'] = Zope.App.startup.unresolved_conflict_errors
+
+ # RRDTool: everything's a float
+ for key, value in data.items():
+ data[key] = float(value)
+
+ self.REQUEST.RESPONSE.setHeader('Content-Type', 'text/plain')
+ return "\n".join("%s: %s" % (k, v) for k, v in data.items())
+
+
+OFS.Application.Application.nagios = nagios
+OFS.Application.Application.nagios__roles__ = None
+
+
+OFS.Application.Application.munin = munin
+OFS.Application.Application.munin__roles = None
Property changes on: Products.ZNagios/trunk/Products/ZNagios/__init__.py
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/Products/ZNagios/check_zope.py
===================================================================
--- Products.ZNagios/trunk/Products/ZNagios/check_zope.py (rev 0)
+++ Products.ZNagios/trunk/Products/ZNagios/check_zope.py 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,174 @@
+#!/usr/bin/python
+# Copyright (c) 2004-2006 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id: check_zope.py 3913 2006-04-05 06:01:15Z ctheune $
+#
+# check_zope - A plugin for netsaint/nagios to check the status of a Zope server
+
+import os
+import sys
+import string
+import getopt
+import urllib2, base64
+
+version = '0.2'
+
+nagiosStateOk = 0
+nagiosStateWarning = 1
+nagiosStateCritical = 2
+nagiosStateUnknown = 3
+
+verbosity = 0
+hostName = ''
+port = 0
+criticalDatabase = 0
+criticalReferences = 0
+childPid = 0
+timeout = 15
+authentication = ''
+ignoreErrors = 0
+
+def printUsage():
+ print 'Usage: check_zope -H <hostname> -p <port> -d <critical database ' \
+ 'size> -r <critical reference count>'
+ print ' [-a <username>:<password>] [-t <timeout>] [-v ' \
+ '<verbosity level>]'
+
+def printHelp():
+ printUsage()
+ print ''
+ print 'Options:'
+ print '-H, --hostname=HOST'
+ print ' The hostname of the Zope server you want to check'
+ print '-p, --port=PORT'
+ print ' The port where the Zope server listens'
+ print '-d, --database=SIZE'
+ print ' Size of the root database to be considered critical'
+ print '-r, --references=COUNT'
+ print ' Count of references to be considered critical'
+ print '-a, --authentication=NAME'
+ print ' URL-suitable authentication token like user:password'
+ print '-i, --ignore-errors'
+ print ' Ignore errors that are in the error log'
+ sys.exit(nagiosStateUnknown)
+
+try:
+ optlist, args = getopt.getopt(sys.argv[1:], 'iVhH:p:d:r:a:v?',
+ ['version', 'help', 'hostname=', 'port=', 'database=',
+ 'references=', 'authentication=', 'ignore-errors'])
+except getopt.GetoptError, errorStr:
+ print errorStr
+ printUsage()
+ sys.exit(nagiosStateUnknown)
+
+if len(args) != 0:
+ printUsage()
+ sys.exit(nagiosStateUnknown)
+
+for opt, arg in optlist:
+ if opt in ('-V', '--version'):
+ print 'check_zope %s' % (version)
+ sys.exit(nagiosStateUnknown)
+ elif opt in ('-i', '--ignore-errors'):
+ ignoreErrors = 1
+ elif opt in ('-h', '--help'):
+ printHelp()
+ sys.exit(nagiosStateUnknown)
+ elif opt in ('-H', '--hostname'):
+ hostName = arg
+ elif opt in ('-a', '--authentication'):
+ authentication = arg
+ elif opt in ('-p', '--port'):
+ port = int(arg or port)
+ elif opt in ('-d', '--database'):
+ criticalDatabase = int(arg or criticalDatabase)
+ elif opt in ('-r', '--references'):
+ criticalReferences = int(arg or criticalReferences)
+ elif opt in ('-v', '--verbose'):
+ # Plugin guidelines require this, but we don't have anything extra to
+ # report
+ verbosity = int(arg or 0)
+ elif opt == '-?':
+ printUsage()
+ sys.exit(nagiosStateUnknown)
+
+if hostName == '':
+ print 'No hostname specified.'
+ printUsage()
+ sys.exit(nagiosStateUnknown)
+
+url = "http://%s@%s:%s/Control_Panel/nagios"
+
+outputMsg = ''
+exitCode = nagiosStateOk
+
+try:
+ if port == 80 or not port:
+ url = 'http://%s/Control_Panel/nagios' % hostName
+ else:
+ url = 'http://%s:%s/Control_Panel/nagios' % (hostName, port)
+ request = urllib2.Request(url)
+ base64string = base64.encodestring('%s' % (authentication))[:-1]
+ request.add_header("Authorization", "Basic %s" % base64string)
+ htmlFile = urllib2.urlopen(request)
+ data = htmlFile.readlines()
+except Exception, e:
+ print e
+ sys.exit(nagiosStateCritical)
+
+result = {}
+# Blindly convert this to our dict:
+for x in data:
+ x = x[:-1]
+ split = x.split(": ")
+ if len(split) == 2:
+ key, value = split
+ result[key] = value
+
+# Check for database size
+if criticalDatabase and not result.has_key('database'):
+ print "Zope didn't report database status"
+ sys.exit(nagiosStateUnknown)
+
+try:
+ database_size = int(result['database'])
+except ValueError:
+ print "Zope reported weird database status:", result['database']
+ sys.exit(nagiosStateUnknown)
+
+if criticalDatabase and database_size > criticalDatabase:
+ print "Zope database is too large:", database_size
+ sys.exit(nagiosStateCritical)
+
+# Check reference count
+
+if criticalReferences and not result.has_key('references'):
+ print "Zope didn't report reference count"
+ sys.exit(nagiosStateUnknown)
+try:
+ references = int(result['references'])
+except ValueError:
+ print "Zope reported weird reference count:", result['references']
+ sys.exit(nagiosStateUnknown)
+
+if criticalReferences and references > criticalReferences:
+ print "Zope references are too high:", references
+ sys.exit(nagiosStateCritical)
+
+# Check errors
+if not ignoreErrors:
+ i = 0
+ errors = []
+ while result.has_key("error%i" % i):
+ errors.append(result["error%i" % i])
+ i += 1
+ if errors:
+ print "Error:", errors[0]
+ sys.exit(nagiosStateCritical)
+
+# Provide uptime
+uptime = result.get('uptime', 'unknown')
+
+print 'Up: %s Refcount: %s ZODB: %s Mb Errors: None' % (uptime, references, database_size/(1024*1024))
+
+sys.exit(nagiosStateOk)
Property changes on: Products.ZNagios/trunk/Products/ZNagios/check_zope.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/Products/ZNagios/munin_client.py
===================================================================
--- Products.ZNagios/trunk/Products/ZNagios/munin_client.py (rev 0)
+++ Products.ZNagios/trunk/Products/ZNagios/munin_client.py 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,149 @@
+#!/usr/bin/python
+# -*- coding: latin-1 -*-
+# Copyright (c) 2008 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id$
+"""munin client script for ZNagios.
+
+Reads the Zope server URL from sys.env['MUNIN_ZOPE_HOST_<index>']
+where the index is the number appended to the script's name when called.
+
+"""
+
+import os.path
+import urllib2
+import base64
+import sys
+
+if len(sys.argv) == 1:
+ cmd = 'fetch'
+else:
+ cmd = sys.argv[1]
+
+if cmd == '':
+ cmd = 'fetch'
+
+script_name = os.path.basename(sys.argv[0])
+_, graph, server_index = script_name.split('_')
+
+URL = os.environ['MUNIN_ZOPE_HOST_%s' % server_index]
+AUTHORIZATION = os.environ.get('MUNIN_ZOPE_AUTHENTICATE_%s' % server_index)
+
+class GraphBase(object):
+
+ def _prepare_fetch(self):
+
+ request = urllib2.Request(URL)
+ if AUTHORIZATION:
+ request.add_header('Authorization', 'Basic %s' %
+ base64.encodestring(AUTHORIZATION))
+ result = urllib2.urlopen(request).readlines()
+ self.data = {}
+ for line in result:
+ key, value = line.split(':')
+ self.data[key] = float(value)
+
+ def fetch(self):
+ self._prepare_fetch()
+ self.do_fetch()
+
+
+class SimpleGraph(GraphBase):
+
+ title = ''
+ name = ''
+ key = ''
+
+ def do_fetch(self):
+ print "%s.value %s" % (self.name, self.data[self.key])
+
+ def config(self):
+ print "graph_title %s (Zope %s)" % (self.title, server_index)
+ print "graph_vlabel %s" % (self.name)
+ print "graph_category Zope"
+ print "graph_info %s of Zope %s " % (self.title, server_index)
+ print "%s.label %s" % (self.name, self.name)
+
+
+class SimpleMultiGraph(GraphBase):
+
+ title = ''
+ vlabel = ''
+ keys = []
+ names = []
+
+ def do_fetch(self):
+ for key, name in zip(self.keys, self.names):
+ print "%s.value %s" % (name, self.data[key])
+
+ def config(self):
+ print "graph_title %s (Zope %s)" % (self.title, server_index)
+ print "graph_vlabel %s" % (self.vlabel)
+ print "graph_category Zope"
+ print "graph_info %s of the Zope %s " % (self.title, server_index)
+ for name in self.names:
+ print "%s.label %s" % (name, name)
+
+
+class uptime(SimpleGraph):
+
+ key = name = 'uptime'
+ title = 'Uptime'
+
+
+class refcount(SimpleGraph):
+
+ key = 'refcount-total'
+ name = 'refcount'
+ title = 'Reference count'
+
+
+class errors(SimpleMultiGraph):
+
+ keys = ['errors-total', 'conflicts-total', 'conflicts-unresolved']
+ names = ['errors', 'conflicts', 'conflicts_unresolved']
+ title = vlabel = 'Errors'
+
+class activity(SimpleMultiGraph):
+
+ keys = ['db-loads', 'db-stores', 'db-connections']
+ names = ['loads', 'stores', 'connections']
+ title = 'Activity'
+ vlabel = 'Operations'
+
+class cachetotals(SimpleGraph):
+
+ key = 'db-cache-total-size'
+ name = 'cache_size'
+ title = 'Total cache size'
+
+class cacheconnections(GraphBase):
+
+ def do_fetch(self):
+ i = 0
+ while True:
+ active = self.data.get('db-cache-conn%s-active-objects' % i)
+ if active is None:
+ break
+ total = self.data['db-cache-conn%s-total-objects' % i]
+ print "active%s.value %s" % (i, active)
+ print "total%s.value %s" % (i, total)
+ i += 1
+
+ def config(self):
+ self._prepare_fetch()
+ print "graph_title Per connection caches (Zope %s)" % server_index
+ print "graph_vlabel Connections"
+ print "graph_category Zope"
+ print "graph_info Per connection caches of Zope %s "% server_index
+ print "active0.label Connection 1: Active objects"
+ print "active1.label Connection 2: Active objects"
+ print "active2.label Connection 3: Active objects"
+ print "active3.label Connection 4: Active objects"
+ print "total0.label Connection 1: Total objects"
+ print "total1.label Connection 2: Total objects"
+ print "total2.label Connection 2: Total objects"
+ print "total3.label Connection 3: Total objects"
+
+graph = locals()[graph]()
+getattr(graph, cmd)()
Property changes on: Products.ZNagios/trunk/Products/ZNagios/munin_client.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/Products/ZNagios/zeo_munin.py
===================================================================
--- Products.ZNagios/trunk/Products/ZNagios/zeo_munin.py (rev 0)
+++ Products.ZNagios/trunk/Products/ZNagios/zeo_munin.py 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,117 @@
+#!/usr/bin/python
+# -*- coding: latin-1 -*-
+# Copyright (c) 2008 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id$
+"""Munin client script for ZEO monitor servers.
+
+Reads the ZEO server host and port from sys.env['MUNIN_ZEO_(HOST|PORT)_<index>']
+where the index is the number appended to the script's name when called.
+
+"""
+
+import os.path
+import telnetlib
+import base64
+import sys
+
+if len(sys.argv) == 1:
+ cmd = 'fetch'
+else:
+ cmd = sys.argv[1]
+
+if cmd == '':
+ cmd = 'fetch'
+
+script_name = os.path.basename(sys.argv[0])
+_, graph, server_index = script_name.split('_')
+
+HOST = os.environ['MUNIN_ZEO_HOST_%s' % server_index]
+PORT = os.environ['MUNIN_ZEO_PORT_%s' % server_index]
+
+
+class GraphBase(object):
+
+ def _prepare_fetch(self):
+ tn = telnetlib.Telnet(HOST, PORT)
+ result = tn.read_all()
+ result = tn.splitlines()
+ self.data = {}
+
+ # First line is a server signature
+ line = result.pop()
+ assert line.startswith('ZEO monitor server version 3.')
+ # Second line is a date
+ line = result.pop()
+ # Third line is empty
+ line = result.pop()
+ assert line == ''
+ # Fourth line is storage-signature
+ line = result.pop()
+ assert line == 'Storage: 1'
+ for line in result:
+ if line.startswith('Server started'):
+ continue
+ if line == '':
+ continue
+ key, value = line.split(':')
+ self.data[key.lower()] = float(value)
+
+ def fetch(self):
+ self._prepare_fetch()
+ self.do_fetch()
+
+
+class SimpleGraph(GraphBase):
+
+ title = ''
+ name = ''
+ key = ''
+
+ def do_fetch(self):
+ print "%s.value %s" % (self.name, self.data[self.key])
+
+ def config(self):
+ print "graph_title %s (Zope %s)" % (self.title, server_index)
+ print "graph_vlabel %s" % (self.name)
+ print "graph_category Zope"
+ print "graph_info %s of Zope %s " % (self.title, server_index)
+ print "%s.label %s" % (self.name, self.name)
+
+
+class SimpleMultiGraph(GraphBase):
+
+ title = ''
+ vlabel = ''
+ keys = []
+ names = []
+
+ def do_fetch(self):
+ for key, name in zip(self.keys, self.names):
+ print "%s.value %s" % (name, self.data[key])
+
+ def config(self):
+ print "graph_title %s (Zope %s)" % (self.title, server_index)
+ print "graph_vlabel %s" % (self.vlabel)
+ print "graph_category Zope"
+ print "graph_info %s of the Zope %s " % (self.title, server_index)
+ for name in self.names:
+ print "%s.label %s" % (name, name)
+
+
+
+class clients(SimpleGraph):
+
+ key = 'clients'
+ name = 'clients'
+ title = 'Connected clients'
+
+class verifying(SimpleGraph):
+
+ key = 'clients verifying'
+ name = 'verifying'
+ title = 'Clients verifying'
+
+
+graph = locals()[graph]()
+getattr(graph, cmd)()
Property changes on: Products.ZNagios/trunk/Products/ZNagios/zeo_munin.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/Products/ZNagios/zope.cfg
===================================================================
--- Products.ZNagios/trunk/Products/ZNagios/zope.cfg (rev 0)
+++ Products.ZNagios/trunk/Products/ZNagios/zope.cfg 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,9 @@
+define command{
+ command_name check_zope_simple
+ command_line /usr/lib/nagios/plugins/check_http -H $ARG1$ -p $ARG2$
+}
+
+define command{
+ command_name check_zope
+ command_line /usr/lib/nagios/plugins/check_zope -H $ARG1$ -p $ARG2$ -d $ARG3$ -r $ARG4$ -a $ARG5$
+}
Property changes on: Products.ZNagios/trunk/Products/ZNagios/zope.cfg
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/Products/__init__.py
===================================================================
--- Products.ZNagios/trunk/Products/__init__.py (rev 0)
+++ Products.ZNagios/trunk/Products/__init__.py 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Property changes on: Products.ZNagios/trunk/Products/__init__.py
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/README.txt
===================================================================
--- Products.ZNagios/trunk/README.txt (rev 0)
+++ Products.ZNagios/trunk/README.txt 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,59 @@
+Overview
+========
+
+ZNagios provides the ability for Nagios and munin to tap into the Zope2 server
+and retrieve status and performance data.
+
+Nagios data
+-----------
+
+- uptime
+- main database size
+- total reference count
+- errors in the root error log
+
+Munin data
+----------
+
+XXX
+
+Configure Nagios
+----------------
+
+Put a line like this in your nagios plugin configuration to make the plugin
+available:
+
+command[check_zope]=/path/to/check_zope.py -H $ARG1$ -p $ARG2$ -d $ARG3$
+-r $ARG4$ -a $ARG5$
+
+Put a line like this in your nagios host configuration to use the
+
+service[maggie]=Zope;0;24x7;10;5;5;gocept;10;24x7;1;1;1;;check_zope!localhost!8080!50000000!10000!admin:password
+
+Configure Nagios
+----------------
+
+To get the correct command configuration for "check_zope", copy the zope.cfg
+into your plugin config directory (debian: /usr/share/nagios/pluginconfig) or
+the commands.cfg in /etc/nagios/.
+
+Then you can make use of the check_zope command for services:
+
+define service{
+ use generic-service
+ host_name thezopehost
+ service_description Zope
+ check_command check_zope!thezopehost!8080!1000000000!500000!admin:password
+}
+
+Credits
+-------
+
+Originally written by Christian Theune <ct at gocept dot com>.
+
+Thanks for contributing ideas and code to:
+
+- Robrecht van Valkenburg (Pareto)
+- Martijn Pieters (Pareto)
+- Florian Schulze (independent)
+- Hanno Schlichting (Jarn)
Property changes on: Products.ZNagios/trunk/README.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/buildout.cfg
===================================================================
--- Products.ZNagios/trunk/buildout.cfg (rev 0)
+++ Products.ZNagios/trunk/buildout.cfg 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,23 @@
+[buildout]
+parts =
+ zope2
+ instance
+ test
+develop = .
+
+[zope2]
+recipe = plone.recipe.zope2install
+url = http://www.zope.org/Products/Zope/2.11.2/Zope-2.11.2-final.tgz
+
+[instance]
+recipe = plone.recipe.zope2instance
+zope2-location = ${zope2:location}
+user = admin:admin
+eggs =
+ Products.ZNagios
+
+[test]
+recipe = collective.recipe.z2testrunner
+zope2part = instance
+packages = ${instance:eggs}
+defaults = ['-c']
Property changes on: Products.ZNagios/trunk/buildout.cfg
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/docs/COPYRIGHT.txt
===================================================================
--- Products.ZNagios/trunk/docs/COPYRIGHT.txt (rev 0)
+++ Products.ZNagios/trunk/docs/COPYRIGHT.txt 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,9 @@
+Copyright (c) 2004-2009 gocept gmbh & co. kg and contributors.
+All Rights Reserved.
+
+This software is subject to the provisions of the Zope Public License,
+Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+FOR A PARTICULAR PURPOSE.
Property changes on: Products.ZNagios/trunk/docs/COPYRIGHT.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/docs/LICENSE.txt
===================================================================
--- Products.ZNagios/trunk/docs/LICENSE.txt (rev 0)
+++ Products.ZNagios/trunk/docs/LICENSE.txt 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,44 @@
+Zope Public License (ZPL) Version 2.1
+
+A copyright notice accompanies this license document that identifies the
+copyright holders.
+
+This license has been certified as open source. It has also been designated as
+GPL compatible by the Free Software Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions in source code must retain the accompanying copyright
+notice, this list of conditions, and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying copyright
+notice, this list of conditions, and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to endorse or promote
+products derived from this software without prior written permission from the
+copyright holders.
+
+4. The right to distribute this software or to use it for any purpose does not
+give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright
+holders. Use of them is covered by separate agreement with the copyright
+holders.
+
+5. If any files are modified, you must cause the modified files to carry
+prominent notices stating that you changed the files and the date of any
+change.
+
+Disclaimer
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
Property changes on: Products.ZNagios/trunk/docs/LICENSE.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Products.ZNagios/trunk/setup.py
===================================================================
--- Products.ZNagios/trunk/setup.py (rev 0)
+++ Products.ZNagios/trunk/setup.py 2009-02-25 15:13:16 UTC (rev 97260)
@@ -0,0 +1,30 @@
+from setuptools import setup, find_packages
+
+version = '0.3'
+
+setup(name='Products.ZNagios',
+ version=version,
+ description="ZNagios provides the ability for Nagios and munin to tap "
+ "into the Zope2 server and retrieve status and performance "
+ "data.",
+ long_description=open("README.txt").read() + "\n" +
+ open("CHANGES.txt").read(),
+ classifiers=[
+ "Framework :: Zope2",
+ "License :: OSI Approved :: Zope Public License",
+ "Programming Language :: Python",
+ ],
+ keywords='Zope CMF Plone i18n l10n flags',
+ author="Zope Corporation and contributors",
+ author_email="zope-dev at zope.org",
+ url='http://pypi.python.org/pypi/Products.ZNagios',
+ license='ZPL',
+ packages=find_packages(exclude=['ez_setup']),
+ namespace_packages=['Products'],
+ include_package_data=True,
+ zip_safe=False,
+ install_requires=[
+ 'setuptools',
+ # 'Zope2',
+ ],
+)
Property changes on: Products.ZNagios/trunk/setup.py
___________________________________________________________________
Added: svn:eol-style
+ native
More information about the Checkins
mailing list