ZenPack YAML file
The ZenPack YAML file, zenpack.yaml
, contains a ZenPack specification.
The name
field is required and the following fields are optional:
- zProperties
- device_classes
- classes
- class_relationships
- link_providers
- event_classes
- process_class_organizers
The name
field must begin with ZenPacks
and the full stop character (.
).
By convention, the second part is the name of the organization responsible for
the ZenPack. For example, ZenPacks.acme.Widgeter
.
Example
Here is a file with every optional field.
zenpack.yaml
name: ZenPacks.acme.Widgeter
zProperties:
zWidgeterEnable: {}
device_classes:
/Server/ACME/Widgeter: {}
classes:
ACMEWidgeter:
base: [zenpacklib.Device]
ACMEWidget:
base: [zenpacklib.Component]
class_relationships:
- Widgeter 1:MC Widget
link_providers:
Virtual Machine:
link_class: ZenPacks.example.XenServer
catalog: device
device_class: /Server/XenServer
queries: [vm_id:manageIp]
XenServer:
global_search: True
queries: [manageIp:vm_id]
event_classes:
/Status/Acme:
remove: false
description: Acme event class
mappings:
Widget:
eventClassKey: WidgetEvent
sequence: 10
remove: true
transform: |
if evt.message.find('Error reading value for') >= 0:
evt._action = 'drop'
process_class_organizers:
Widget:
description: Organizer for Widget process classes
process_classes:
widget:
description: Widget process class
includeRegex: sbin\/widget
excludeRegex: "\\b(vim|tail|grep|tar|cat|bash)\\b"
replaceRegex: .*
replacement: Widget