Writing Monitors for the Event Monitoring Service (December 1999)
70 Chapter3
Creating a Resource Monitor
Defining the Resource Dictionary Hierarchy
current value and therefore cannot be polled by EMS.
Default is S (state).
NOTE Although, once installed the resource dictionary files and entries may be
reviewed, generally they will not be changed. However, it is permissible
to make changes to an installed resource dictionary file. For example, an
initiating option may need to be changed. To document the options
available for your monitor, add a man page for your resource monitor.
Provide a cross-reference to the resource dictionary file in the man page
for the monitor’s users.
Resource Discovery
Although the resource dictionary files are generally static, since they are
created when a monitor is installed, a resource dictionary can specify the
path to resource classes that the Registrar can dynamically interpret.
The following example process uses a resource class called
/applications/foo defined in the resource dictionary:
• A client application sends a request to the Registrar for a list of
resources beneath /applications/foo.
• The Registrar forwards the request to the resource monitor for that
resource class.
• The monitor checks the system to determine what resources exist in
that class
• The monitor replies with the list of resources.
• When another client requests the same information five minutes
later, the monitor checks the system again.
• If the list of foo applications had changed, the monitor returns the
new list to the client.
There are two ways to write your resource dictionary entry:
• For resource classes that contain a frequently changing set of
resource instances, enter the resource class in the resource dictionary,
and write the resource monitor to return the list of resource instances