Availability Guide for Application Design

Instrumenting an Application for Availability
Availability Guide for Application Design525637-004
8-34
DSM Management Services
What Are EMS Filters and How Are They Used?
Filters provide a mechanism for reducing message noise. They filter out messages that
are of no interest to management applications that read messages from the distributor
with which the filter is associated.
The event log file is read by all the EMS distributor processes configured onto or
started on the system. The consumer, printing, and forwarding distributors can use a
filter to determine whether to pass an event message to its destination (or
destinations). The distributor selects only the messages it wants by comparing each
message to this filter. If a printing or consumer distributor does not use a filter, all
events are passed through. Forwarding distributors do not pass events until a filter is
loaded.
For example, you can design a forwarding distributor that forwards only critical event
messages, a printing distributor that prints only action event messages, and a
consumer distributor that returns only PATHMON event messages. EMS filters allow
you to reduce message traffic within a system and over a network by placing part of
the program logic as close to the source of event messages as possible. Rejected
messages are skipped; selected messages proceed to their destination.
You can use two kinds of filters for selecting events in a forwarding, printing, or
consumer distributor. You can use a filter table or a compiled filter.
Writing an EMS Filter Table
Filter tables provide an efficient filtering mechanism that also minimizes the complexity
of filter installation. Because filter tables are not compiled, filter tables are easy to
maintain. They are particularly useful when events need to be filtered by simple criteria
such as event number and subsystem ID, and when there is a need for frequent and
fast online update of filter content.
Writing a Compiled EMS Filter
Compiled filters are useful when the filtration criteria are less straightforward. To create
a compiled filter, you must create an edit file containing the filter-language constructs
that express your selection criteria. You then use the filter-language compiler to
generate an object file suitable for loading to the distributor.
You can use a combination of filter tables and compiled filters. Once a filter
specification is loaded, the distributor uses it to decide whether to pass each event
message to its destination.
Sample filters provided with the EMS FastStart or EMS Analyzer products provide a
starting point for developing a compiled filter. These products can also help in testing
filters you have written.
For full details on using filter tables or on the filter-language compiler, refer to the EMS
Manual.