HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)
e
evmtemplate(4) evmtemplate(4)
Posted Name Template Name Match?
myco.myprod.env myco.myprod.env Yes
myco.myprod.env.temp.high.70 myco.myprod.env Yes
myco.myotherprod myco.myprod No
myco.myotherprod myco.myotherprod.start No
The syntax of an event template file is identical to the syntax of a file given as input to the
evmpost com-
mand. The following keywords may be specified in a template file:
event This keyword introduces an event group. The body of the group is delimited by braces.
name event_name
Names the template event. The name must be made up of two or more components containing
only alphanumeric and underscore (_) characters, and separated by dot (
.) characters.
format format_specifier
Event format text. The format_specifier is a string that will be used to produce a formatted mes-
sage for display if the event is passed through the
evmshow command, or the EvmEventFor -
mat()
library function. See the evmshow(1) and EvmEventFormat(3) manpages.
If a format_specifier contains no special characters, it is displayed unchanged as the event’s mes-
sage text. For example, if
evmshow encounters an event containing the following simple
format_specifier, it displays the string exactly as specified:
EVM logger: Logger started
If the format_specifier contains variable-specifier in the form
$variable_name and either the
posted event or the template event contains a variable with that name, the variable_value will
be included in the formatted output in place of the variable-specifier. If no such variable is
present, the variable-specifier is included in the output. For example, if an event contains a vari-
able called
logname and the format_specifier:
EVM logger: Started eventlog $logname
then evmshow might display the event as:
EVM logger: Started eventlog /var/evm/evmlog/evmlog.20000228
If the format_specifier contains a data-item-specifier in the form
@item_name, the data-item-
specifier is replaced with the value of the corresponding data item from the event. For example,
if an event contains a variable called
message and the format_specifier is:
EVM user msg (@user_name): $message
then evmshow might display the event as:
EVM user msg (steve): Engineering group is off-site today
If the data item is not present in the event, a hyphen character (-) is output in its place. An
@
character that is not associated with a valid item name is unchanged in the output.
Any characters in the format_specifier that are not part of a variable_name or data-item-specifier
are output unchanged.
If no format_specifier is supplied in either the template file or the posted event, a default event
message is used when the event is formatted for display.
priority priority
Indicates the importance of the event, but does not affect the order of event distribution. The
priority must be an integer value in the range 0 (lowest) to 700. See the EvmEvent(5) manpage
for the meanings of specific priority values.
i18n_catalog i18n_cat
The name of an I18N catalog file holding text strings to be displayed in place of the strings con-
tained in the event. This item is used for internationalizing events. If it is omitted, the strings
contained in the event will be used when the event is formatted for display. Refer to the EVM
Programmer’s Guide for more information.
i18n_set_id i18n_set
Identifies the message set within the i18n_cat to be used for translation of all internationalized
strings in the event. This item is ignored if no i18n_cat is supplied.
HP-UX 11i Version 3: February 2007 − 2 − Hewlett-Packard Company 101