Adding Event Fields

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

ZenPacks can add new event fields. You might ask what the benefit is to adding event fields because you can simply add whatever fields you want to events as you send them in, or as you transform them. The benefits are mainly for influencing the behavior of the web interface. Once you register a new event field it becomes available to be shown, filtered and sorted on the event console. You can't do this for ad-hoc fields.

You register new fields by adding EventDetailItem sections to zep/zep.json within your ZenPack as follows.

    "EventDetailItem" : [
            "name" : "Example",
            "key" : "example_field",
            "type" : 1

The name will be used as a column header for the event console. The key will be the field's name that you'd set or access from an event source or transform. The type field is one of the following.

EventDetailItem Types

  1. String
  2. Integer
  3. Float
  4. Long
  5. Double
  6. IP Address
  7. Path