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:
- Download the ZenPack from the Mac OS X page or to build the ZenPack: make ZenPacks.community.OSX
- Install the ZenPack
- zopectl restart
- Browse to the newly created /Server/SSH/OSX device class
- Click on the zProperties and the zCollectorPlugins
- You can run the unit tests against with: runtests --type unit ZenPacks.community.OSX
Add an OSX device to the /Server/SSH/OSX device class with the zCommandUsername and zCommandPassword set or the zKeyPath
- Model the device
- Navigate to the Hardware tab: