Zenoss Zeveloper's Guide Version

Zenoss Zeveloper's Guide Version

Zenoss, Inc. www.zenoss.com Copyright © 2008 Zenoss, Inc., 275 West St. Suite 204, Annapolis, MD 21401, U.S.A. All rights reserved. The Zenoss logo is a registered trademark of Zenoss, Inc. Zenoss and Open Enterprise Management are trademarks of Zenoss, Inc. in the U.S. and other countries. Flash is a registered trademark of Adobe Systems Incorporated. Java is a registered trademark of Sun Microsystems, Inc. Linux is a registered trademark of Linus Torvalds. SNMP Informant is a trademark of Garth K. Williams (Informant Systems, Inc.). Tomcat is a trademark of the Apache Software Foundation. Windows is a registered trademark of Microsoft Corporation in the United States and other countries. All other companies and products mentioned are trademarks and property of their respective owners. Zenoss Developer’s Guide for Version 2.3 Zenoss Developer’s Guide for Version 2.3 Table of Contents 1. Introduction ............................................................................................................................... 1 1.1. Overview ........................................................................................................................ 1 1.1.1. Model ................................................................................................................. 1 1.1.2. Availability .......................................................................................................... 1 1.1.3. Events ................................................................................................................. 1 1.1.4. Performance ......................................................................................................... 1 1.2. Detailed Architecture ........................................................................................................ 2 1.2.1. User Layer ........................................................................................................... 2 1.2.2. Data Layer ........................................................................................................... 2 1.2.3. Collection and Control Service Layer ........................................................................ 3 2. Getting Started ........................................................................................................................... 5 2.1. Working with the Source Code ........................................................................................... 5 2.1.1. Getting the Source Code ......................................................................................... 5 2.1.2. Keeping up-to-date with your checked-out code .......................................................... 5 2.1.3. Getting Patches ..................................................................................................... 6 2.1.4. Style Guidelines .................................................................................................... 6 2.1.5. Generating Diffs for new Fixes ................................................................................ 8 2.1.6. Submitting a Fix ................................................................................................... 8 2.2. Programming Techniques .................................................................................................. 8 2.2.1. Calling Methods Using REST .................................................................................. 8 2.3. zendmd: Command-line Access to the Device Management Database (DMD) ............................ 10 2.4. Programming Documentation ........................................................................................... 13 2.4.1. Python ............................................................................................................... 13 2.4.2. Zenoss API ......................................................................................................... 13 2.4.3. Other Resources .................................................................................................. 13 2.4.4. Contributing to the Documentation (Errors, Tips, HowTos) .......................................... 13 3. ZenPacks ................................................................................................................................. 14 3.1. Overview ...................................................................................................................... 14 3.2. Creating a ZenPack ........................................................................................................ 14 3.2.1. ZenPack Names ................................................................................................... 14 3.2.2. Specifying Dependencies ....................................................................................... 15 3.2.3. Locating ZenPack Source Outside of Zenoss ............................................................. 15 3.3. ZenPack Structure and Contents ........................................................................................ 15 3.4. Developing the ZenPack .................................................................................................. 17 3.4.1. Base ZenPack Class ............................................................................................. 17 3.4.2. Storing Objects in the ZODB ................................................................................. 18 3.4.3. Providing DataSource classes ................................................................................. 18 3.4.4. Providing daemons ............................................................................................... 19 3.4.5. setuptools and the zenpacksupport ........................................................................... 19 3.5. Building and Distributing ZenPacks ................................................................................... 20 3.5.1. Migrating between versions ................................................................................... 20 3.5.2. Converting older ZenPacks to ZenPack eggs ............................................................. 20 3.6. Where to Get More Information ........................................................................................ 21 4. Zenoss Datastores ..................................................................................................................... 22 4.1. Zope Object Database (ZODB) ......................................................................................... 22 4.2. MySQL Event database ................................................................................................... 23 4.2.1. Connecting to the Database ................................................................................... 24 4.3. Round-Robin Database .................................................................................................... 24 4.4. Python Pickle Files ......................................................................................................... 25 5. Events .................................................................................................................................... 26 5.1. Understanding an Event Entry .......................................................................................... 26 i 5.2. Sending an Event ........................................................................................................... 26 5.3. Adding an Event Class .................................................................................................... 27 5.3.1. Add to ZenEventClasses ....................................................................................... 27 5.3.2. Add the class to the import XML ........................................................................... 28 5.3.3. Write a migrate script ........................................................................................... 28 6. zProperty Management .............................................................................................................. 29 6.1. Adding a zProperty ........................................................................................................ 29 6.1.1. Adding a zProperty to an Event .............................................................................. 29 6.1.2. Adding a zProperty to a Device .............................................................................. 29 6.2. Migrating the zProperty Code ........................................................................................... 29 7. Device Management .................................................................................................................. 31 7.1. Adding Devices Programatically ....................................................................................... 31 7.1.1. Using a REST call ............................................................................................... 31 7.1.2. Using an XML-RPC Call from Python .................................................................... 31 7.1.3. XML-RPC Attributes ............................................................................................ 31 7.2. Editing Device Information .............................................................................................. 32 7.2.1. Using a REST call ............................................................................................... 32 7.2.2. Using an XML-RPC Call from Python ...................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    119 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us