Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

SSH ZenPack Development Tutorial 1

VERSION 6  Click to view document history
Created on: Apr 29, 2010 11:32 AM by Matt Ray - Last Modified:  May 10, 2010 10:24 PM by Matt Ray

This is the first part in a series of articles about writing an SSH-based ZenPack from scratch, the SSH ZenPack Development Tutorial Series.  This follows the development of the Mac OS X ZenPack.


 

The 0.1 release of this ZenPack provides OS and HW version modeling for the status page. To start development, I created a ZenPacks.community.OSX directory with the other Community ZenPacks I'd checked out from Subversion.  I looked at the LinuxMonitor ZenPack and referred to the How to Create an SSH ZenPack and How To Add a Test to an SSH Monitoring Zenpack articles for reference.

 

For the first version I wanted to add a modeler plugin and tests to run against it. The uname_a.py is the modeling plugin, it pulls the uname, hardware and OS type and the serial number.  It populates the device Status page and is a good start for seeing the interaction between modeling and the devices.

 

To this end I created the standard directory structure of consisting of the following files:

*unless noted, the __init__.py files are empty

 

For using this ZenPack:

  1. To build the ZenPack: make ZenPacks.community.OSX
  2. Install the ZenPack
  3. zopectl restart
  4. Browse to the newly created /Server/SSH/OSX device class
  5. Click on the zProperties and the zCollectorPlugins
    Screen shot 2010-04-27 at 5.36.51 PM.png
  6. You can run the unit tests against with: runtests --type unit ZenPacks.community.OSX
  7. Add an OSX device to the /Server/SSH/OSX device class with the zCommandUsername and zCommandPassword set or the zKeyPath

  8. Model the device
    Screen shot 2010-04-29 at 3.40.01 PM.png
  9. Navigate to the status page:
    Screen shot 2010-04-29 at 3.43.57 PM.png
Comments (0)