Extending Zenoss
Contents
Introduction
There are a number of mechanisms that can be used to extend Zenoss. By far the most popular mechanism is via ZenPacks, which interface to a certain extent with Zenoss Core internals, and add new device support and capabilities to Zenoss itself. Using this approach requires writing code in Python and the Zenoss internal Python APIs.
Another mechanism is via our JSON API, which allows for language-agnostic extensions to be written.
ZenPack Development
The easiest way to start working with Zenoss is to work on developing your own ZenPack. Here are the various steps involved:
- First, learn what a ZenPack is (click on me!).
- Next, consult a ZenPack tutorial, which will guide you through the learning curve. Here are three recommended resources:
- ZenPack Development Guide, by Chet Luther
- This guide documents the process of creating a ZenPack that uses SNMP to monitor a new kind of device and covers Zenoss thru 4.x. Excellent resource for SNMP ZenPack best practices.
- Creating Zenoss ZenPacks for Zenoss 3, by Jane Curry
- Essentially a book, Jane's comprehensive guide on creating ZenPacks may be the best place to start for beginners. Nearly all of it applies to 4.x ZenPacks as well.
- Developing a Command Parser-Based ZenPack, by David Petzel
- This compact guide documents the process of creating a ZenPack that runs a remote command to collect information. The documentation is up-to-date.
- Once you have working ZenPack and you want to share it with the world, you will want to list it in our ZenPack directory. See the following links:
- Using GitHub For Your ZenPack
- We recommend the use of GitHub and git for managing your ZenPack source code. Our auto-build system works well with GitHub.
- Releasing your ZenPack
- This page documents the steps to release your ZenPack to the world.
- GitHub ZenPack Template - A skeleton you can use for developing your own ZenPack.
API Changes
ExtJS 3/4
As Zenoss improves, certain aspects of our API can change. The most notable API change between Zenoss Core 3.x and 4.x is the move from ExtJS 3 to 4. ExtJS is a JavaScript framework that we use for our user interface. If you have a custom component grid in your ZenPack, then your ZenPack will probably need to be updated to work with the new Zenoss. You can find documentation on how to do this here:
Reference Documentation
The best way to learn how to extend Zenoss is to follow tutorials and look at simple example code. However, we also offer reference documentation for both Zenoss source code as well as our JSON API that you may find useful in some circumstances.
Zenoss Source Code Reference Documentation
Zenoss Source Code reference documentation is available in epydoc format, which consists of HTML documentation generated from our Python source code docstrings. This documentation defines Zenoss internal interfaces that can be used to extend Zenoss. Please use this for reference only -- learn how to extend Zenoss by following one of several ZenPack tutorials that are available.
Zenoss JSON API
The Zenoss JSON API is also available in epydoc format, and documents the various routers that can be queried in a language-agnostic way.
In this archive:
- JSONAPIQuickstart.txt - Consult this document to get started
- apidoc/* - Contains the core API documentation, both in PDF and HTML
- java/Main.java - Main stub to exercise the Java JsonApi example class
- java/JsonApi.java - Example class to handle interactions with Zenoss JSON API in Java
- python/api_example.py - Example class to handle interactions with Zenoss JSON API in Python
- python/event_curses.py - Example curses-based Zenoss 'Event Console'