This section describes the files and directory structures that make up most ZenPacks. A more detailed source of information about Python Eggs, entry points and other technical details of building eggs is found here.
The $ZENHOME/Products/ZenModel/ZenPackTemplate
directory contains the template files and directories used when Zenoss creates a ZenPack. If you decide to change these files, note that these changes will not be preserved across upgrades.
A ZenPack has the concept of a namespace, so that multiple people or organizations can create similar ZenPack names without their code colliding with each other. In this example, the name of the ZenPack is ZenPacks.
, where pkg
.zpid
pkg
is the package name and zpid
is the ZenPack id.
In the $ZENHOME/ZenPacks/
directory, you will find the directory ZenPacks.
with the following contents (abbreviated for clarity):pkg
.zpid
build build/bdist.linux-i686 build/lib build/lib/ZenPacks ... dist dist/ZenPacks.pkg
.zpid
-version_id
-py2.4.egg INSTALL.txt README.txt setup.py ZenPacks ZenPacks/__init__.py ZenPacks/pkg
ZenPacks/pkg
/__init__.py ZenPacks/pkg
/zpid
ZenPacks/pkg
/zpid
/__init__.py ZenPacks/pkg
/zpid
/daemons ZenPacks/pkg
/zpid
/datasources ZenPacks/pkg
/zpid
/datasources/__init__.py ZenPacks/pkg
/zpid
/lib ZenPacks/pkg
/zpid
/lib/__init__.py ZenPacks/pkg
/zpid
/libexec ZenPacks/pkg
/zpid
/migrate ZenPacks/pkg
/zpid
/migrate/__init__.py ZenPacks/pkg
/zpid
/modeler ZenPacks/pkg
/zpid
/modeler/__init__.py ZenPacks/pkg
/zpid
/modeler/plugins ZenPacks/pkg
/zpid
/modeler/plugins/__init__.py ZenPacks/pkg
/zpid
/objects ZenPacks/pkg
/zpid
/objects/objects.xml ZenPacks/pkg
/zpid
/parsers ZenPacks/pkg
/zpid
/parsers/__init__.py ZenPacks/pkg
/zpid
/reports ZenPacks/pkg
/zpid
/services(16) ZenPacks/pkg
/zpid
/services/__init__.py ZenPacks/pkg
/zpid
/skins(17) ZenPacks/pkg
/zpid
/skins/ZenPacks.pkg
.zpid
ZenPacks.pkg
.zpid
.egg-info(18) ZenPacks.pkg
.zpid
.egg-info/entry_points.txt ZenPacks.pkg
.zpid
.egg-info/namespace_packages.txt ZenPacks.pkg
.zpid
.egg-info/not-zip-safe ZenPacks.pkg
.zpid
.egg-info/PKG-INFO ZenPacks.pkg
.zpid
.egg-info/SOURCES.txt ZenPacks.pkg
.zpid
.egg-info/top_level.txt
This directory is created by Python when the ZenPack is exported to an egg file or when it is installed from source. This directory can safely be deleted at any time if you wish and need not be kept within any version control system. | |
This directory is created when the ZenPack is exported to an egg file. The egg file is initially created within here then copied to the | |
This file contains parameters for use by setuptools and distutils in creating eggs and doing source installs. Zenoss creates an appropriate Any time a ZenPack is saved or exported via the GUI Zenoss will modify certain values at the top of the | |
This directory mirrors the dotted name structure of your ZenPack name. For example, if your ZenPack name is | |
This is the directory whose name is that of the last part of your dotted ZenPack name. | |
This file contains any code that needs to be executed when the ZenPack is loaded. Zenoss loads all installed ZenPacks on startup. Typically this file contains a few lines that will register a skins directory if the ZenPack provides one. Also, if this class contains a class named ZenPack then on installation Zenoss will create an instance of that class rather than the base ZenPack class in the object database. | |
See below for more details on providing daemons in ZenPacks. | |
See below for more details on providing data source classes in ZenPacks. | |
This directory is intended to hold any 3rd party modules or other code your ZenPack depends on. A module named import ZenPacks.MyCompany.MyZenPack.lib.Foo | |
This directory is intended to hold plugins, such as Nagios-style or Cacti-style plugins. | |
See below for more details on migrating between versions of your ZenPack. | |
See below for more details on providing modeler plugins in ZenPacks. | |
Database objects such as Device Classes and Performance Templates that are added to the ZenPack via the GUI are exported to an | |
This directory contains any command parsers provided by the ZenPack. See the section that discusses new platform command parsers for more details. | |
This directory contains any report plugins provided by the ZenPack. | |
Zenoss daemons usually communicate with zenhub to retrieve their configuration, send events, and write performance data. If a ZenPack provides a daemon then it typically will also provide a ZenHub service for that daemon. See the section on ZenHub for further details. | |
This directory contains any skins directories that should be added to Zope. Note that this contains directories of skins, not the skin files themselves. If you include skins directories make sure that the | |
This directory contains files which describe the egg meta-data. This is created when the egg file is generated or the ZenPack is installed from source. This directory can safely be deleted at any time if you wish and need not be kept within any version control system. This file is updated every time a ZenPack is edited and saved. ZenPack developers should normally not edit this file manually. |