Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Enable zc.monitor with Zope 2

Project Description


This package enable to monitoring of Zope 2 instance from the command line. It plugs zc.monitor ( and zc.z3monitor ( in Zope 2. zc.monitor use zc.ngi server and define another thread to handle monitoring. This way you should still be able to monitor your application even if the HTTPServer is hanging.

Zope config

Add this to your zope.conf to enable the zc.ngi server on the loopback interface on port 8888:

<product-config five.z2monitor>


This package has been tested with probes coming from different packages:

  • zc.z3monitor
  • Products.ZNagios
  • zc.monitorcache
  • zc.monitorlogstats
  • ztfy.monitor

To register your own probe, just define a new utility providing the zc.z3monitor.interfaces.IZ3MonitorPlugin interface. Like this:

   name="uptime" />

and the component should look like this:

def zc_uptime(connection, database='main'):
    """uptime of the zope instance in seconds"""
    app = App()
    elapsed = time.time() - app.Control_Panel.process_start
    print >> connection, elapsed

ZODB connection is always the first parameter. You can add your own parameters after.

Once you start your instance you should see something like:

INFO zc.ngi.async.server listening on ('', 8888)

The ngi server is started and you can look up values with netcat for example:

echo 'uptime' | nc -i 1 localhost 8888


If you configure your zope instance using buildout and the plone.recipe.zope2instance recipe ( To define the zc.z2monitor host and port use the zope-conf-additional option like this:

recipe = plone.recipe.zope2instance
http-address = 8080
user = admin:admin
eggs =
zcml =
zope-conf-additional =
  <product-config five.z2monitor>

Once the instance is running, you will be able to ask the available probes from the command line using:

bin/instance monitor dbinfo main

which is the equivalent to:

echo 'dbinfo main' | nc -i 1 <zc.monitor host> <zc.monitor port>

To know the registered probes, Use this command:

bin/instance monitor help


0.2 (2012-11-05)

  • Add entry point for plone.recipe.zope2instance
  • More documentation

0.1 (2012-11-05)

  • Initial implementation
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
five.z2monitor-0.2.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Nov 5, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting