HP-UX Event ManagerProgrammer's Guide

Figure 2-1 Posted Event and Template Merging
If the same data item is supplied in both the template and the posted event, the posted value is
used in the merged event.
The merge process yields a binary event structure that contains a combination of the data items
from the posted event and the template. The merged event is distributed to subscribers in its
binary form, not as a formatted message, and subscribers must use the EVM API functions to
format the event for display or to extract information from it. For more information about API
functions, see “The EVM Programming Interface” (page 31).
Installing Template Files Location, Naming, Ownership, and Permission
Requirements
Event template files must normally be installed as part of the product or application installation
process. System templates are stored in subdirectories under /usr/share/evm/templates,
while third-party product and local application templates must be stored under the local template
directory, /var/evm/adm/templates. To enable the EVM daemon to locate the additional
templates, a link is provided from the system template directory to the local directory.
To add templates for a product or local application, the application's installation process must
create an appropriately named subdirectory of the local template directory and install its templates
in the new directory. EVM's template search policy follows symbolic links. Hence, you must also
install the templates in a directory more closely associated with the application, and connect it
to the local directory with a link.
Template files must have the suffix .evt, must be owned by root or bin, and must have one
of the following access permissions: 0600, 0400, 0640, or 0440. In addition, ensure that the new
directory is given appropriate permissions.
After you install the file, enter (as superuser) the evmreload -d command to cause EVM to
recognize the new templates, and then check for any errors. For more information about this
command, see evmreload(1M).
Checking Event Template Registration
You can determine whether your templates are registered by using evmwatch with the -i option.
For example, the following command lists the names of all event templates registered for the
myapp application:
evmwatch -i -f "[name myco.myprod.myapp]" | evmshow -t "@name"
Use the -d option of evmshow to display the template details.
Designing Event Templates 27