Writing Monitors for the Event Monitoring Service (December 1999)

72 Chapter3
Creating a Resource Monitor
Defining the Resource Dictionary Hierarchy
Wildcarding
The SAM interface to EMS allows users to select all resource instances
in a resource class, if all instances are of the same type. For example, the
resource class /vg/vg_name/lv/status/* contains a resource instance
to monitor the status of every logical volume defined in the volume group
represented by vg_name. In the SAM interface to EMS (EMS
framework), users may select an asterisked (*) list item to create a
monitor request for all logical volumes defined in a volume group at once.
Wildcards can be used any time all resource instances in a subclass are
of the same type. If the type is RM_ENUMERATED_TYPE, all resource
instances must have the same set of state names and values. See the
section, “EMS Resource Types” for information on RM_ENUMERATED_TYPE.
If you want to allow your users to use wildcards within the SAM
interface to EMS, design your monitor so that all the resource instances
are of the same type and are located in the same resource subclass.
If you do not want users to specify wildcard characters in SAM for
resource instances of the same type, put the resources in different
resource subclasses. For example, you may have a resource instance that
monitors CPU usage and another that monitors average run queues.
They might be the same type, but you would not want users to be able to
specify them together with a wildcard character. In this case, putting
them in different resource subclasses prevents wildcarding. However, it
is just as reasonable to group different resources with the same type if it
does not create a conflict elsewhere.
Syntax
Resource class and instance information share a common format in the
dictionary file. Each description is a multiline record of keywords and
information. Keywords begin all lines except those lines following a
continuation symbol (\). No more than one keyword is allowed on a line.
All white space at the beginning of each line is removed during parsing.
The # character (except when it is found in a quoted string) indicates the
beginning of a comment, which extends to the end of the line.
Four keywords are used to describe a resource, although some may be
omitted if not appropriate.