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

SSH ZenPack Development Tutorial 2

VERSION 5  Click to view document history
Created on: May 6, 2010 4:01 PM by Matt Ray - Last Modified:  May 10, 2010 7:54 PM by Matt Ray

This is the second 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.2 release of this ZenPack adds support for modeling the CPU and memory information for the Hardware tab.  2 new modelers were added for this release, zenoss.cmd.osx.cpu and zenoss.cmd.osx.memory and tests to go with them.

 

The cpu.py modeling plugin pulls the processor, speed, bus speed and L2 cache size.  The memory.py only pulls the main memory since OS X dynamically allocates and uses swap, making tracking the allocated size unwieldy and potentially useless.

 

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
  4. Browse to the newly created /Server/SSH/OSX device class
  5. Click on the zProperties and the zCollectorPlugins
    Screen shot 2010-05-06 at 3.45.38 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-05-06 at 3.50.16 PM.png
  9. Navigate to the Hardware tab:
    Screen shot 2010-05-06 at 3.51.49 PM.png
    Comments (0)