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

SSH ZenPack Development Tutorial 4

VERSION 2  Click to view document history
Created on: May 12, 2010 10:17 PM by Matt Ray - Last Modified:  May 13, 2010 2:33 PM by Matt Ray

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


 

The 0.4 release of this ZenPack is the first that actually monitors, adding support for Uptime on the Status tab and the Load Average performance graph on the Perf tab.  The changes for this release are mostly contained within the object.xml.  Unlike the modeling plugins, there was not a need to write custom parsers for the data returned; the built-in uptime parser from Products.ZenRRD.parsers.uptime correctly parses the output from OS X's /usr/bin/uptime.  The Device template is defined with an uptime Data Source, a high load Threshold and a Load Average Graph Definition.  The Data Source pulls the following DataPoints with the uptime parser: laLoadInt1, laLoadInt5 (aliased to loadAverage5min), laLoadInt15, sysUpTime.  The Threshold is set to a Warning severity at '1.2'.  The Graph Definition graphs the Threshold and the 3 Data Points.

 

The directory structure has been updated, with changes marked in green:

    *unless noted, the __init__.py files are empty

     

    For using this ZenPack:

    1. Download the ZenPack from the Mac OS X page or to build the ZenPack: make ZenPacks.community.OSX
    2. Install the ZenPack
    3. zopectl restart; zenhub restart
    4. Browse to the newly created /Server/SSH/OSX device class
    5. You can run the unit tests against with: runtests ZenPacks.community.OSX
    6. Add an OSX device to the /Server/SSH/OSX device class with the zCommandUsername and zCommandPassword set or the zKeyPath

    7. Model the device
      Screen shot 2010-05-10 at 6.30.22 PM.png
    8. Wait approximately 10 minutes and navigate to the Status Tab:
      Screen shot 2010-05-13 at 1.26.56 PM.png
    9. Navigate to the Perf Tab:
      render.png
    Comments (0)