HP-UX Event ManagerProgrammer's Guide

2 Event Manager Events
This chapter discusses EVM events. It also describes how to design these events and templates
to capture specific events generated on the system. This chapter addresses the following topics:
“EVM Event Content” (page 15)
“Designing a Set of Events” (page 22)
“Designing Event Templates” (page 24)
EVM Event Content
The format, type, and purpose of the data carried in events varies widely. In a simple case, an
event is a simple text message. In a more complicated case, an event can be a complex set of
binary data that requires an understanding of its format to be able to translate it. For two
co-operating applications, an event can be a simple binary flag or count.
NOTE: However, an event is not required to carry data. In some cases, transmitting only a
particular event type from poster to subscriber may be all that the subscriber needs to recognize
that a particular status change has occurred.
Event data is complicated because it has to be translated in to various formats. For an event to
be human readable, it must be possible to combine numeric data with explanatory text. At the
same time, the information in the same event may need to be seen as binary data by a subscribing
process. In addition, it may also be necessary to have the human-readable form in multiple
languages.
The EVM data mechanism enables data to be carried in any way that is appropriate to the event.
The constructs that provide this capability are the EVM format data item (one of EVM's standard
data items) and the EVM variable data items.
Event data structures contain following types of data items:
Standard data items A fixed set of items with predefined names.
Variable data items Items whose names and types are typically defined by the event
designer.
When you create an event, you can include any number of data items. When you post the event,
EVM automatically adds certain environmental standard data items, such as the host name and
the timestamp.
Standard Data Items
Standard data items are data items that are commonly required in an event and are understood
(and may be acted upon) by EVM. The names of standard data items are specified as enumerated
constants; consequently, the names themselves do not take up a significant amount of space in
an event.
Some standard data items are inserted in an event by the application that posts the event or by
the template for the event. Others are automatically inserted, per requirements, by EVM
components. You can extract any data item from an event.
Table 2-1 lists the items that require special attention. The standard data items are described in
EvmEvent(5).
Table 2-1 Standard Data Items
DescriptionData Item
Specifies the name of the event.Event name (Event Name Data Item)
Specifies the event message string.Format (Event Format Data Item)
EVM Event Content 15