Writing Monitors for the Event Monitoring Service (December 1999)
Chapter 3 69
Creating a Resource Monitor
Defining the Resource Dictionary Hierarchy
Defining the Resource Dictionary Hierarchy
The resource dictionary directory is provided as part of the EMS product.
You provide a resource dictionary, or dictionary entry, for each resource
monitor you create.
The resource dictionary is installed as a set of files in the
/etc/opt/resmon/dictionary directory. A resource class that contains
zero (0) or more logical resources. A logical resource is defined as a
unique string that maps to one physical resource. Many logical resources
can map to the same physical resource, as indicated in Figure 3-1, “State
and Asynchronous Resource Class Example.”
To write a resource dictionary for your resource monitor, create a file
with the following information. Refer to the section, “Syntax” for specific
usage information.
# (comment) Optional. Add a reference to the man page that
accompanies your resource monitor.
DESCRIPTION Optional. Use this to briefly describe the resource
monitor and resources. This is a reference for this
resource dictionary file only.
MONITOR Required a minimum of one time in the monitor’s
dictionary file.This defines the filesystem path to the
binary file for the resource monitor. This defines the
command line that the Registrar uses when invoking
the resource monitor. Include resource monitor
command line options as needed in this line. Default is
resource class.
RESOURCE_NAME Required. This defines where the resources fit into the
EMS resource hierarchy. This is a logical address
relative to the other monitored resources. The
Registrar creates the directory tree from all the
resource dictionaries in the resource dictionary
directory. All the resources supplied by the monitor fit
into the resource hierarchy in the location defined by
the RESOURCE_NAME.
STATE_TYPE Defaulted. This defines the state of the resources being
monitored. The options are asynchronous (A), state (S),
or both (B). Asynchronous monitors do not maintain a