Writing Monitors for the Event Monitoring Service (December 1999)
Chapter 2 29
The EMS Application Programming Interface (API)
Functions
EMS Resource Types
Resources in the Event Monitoring Service must be defined to have one
of the types listed in Table 2-3:
Table 2-3 Resource Types
Type Description
RM_ENUMERATED_
TYPE
The resource is an Enumerated Type, which assumes
values from a predefined set of states. The states are
made up of state names and associated state values.
For example, a particular resource may assume the
values UP, DOWN, and INITIALIZING, and values
can be assigned to each of these states:
UP = 1, INITIALIZING = 2, and DOWN = 3
This example illustrates the recommended
convention, 1=UP, continuing to
n
=DOWN.
The Enumerated Type contains both the state name
and the state value.
The values for an enumerated type should be ordered
from best to worst, in ascending order, as in the above
example. That way, a monitor can test a value to
determine whether it is, for example, >UP, or
>=INITIALIZING.
The state names for Enumerated Types should be all
uppercase.
RM_ERROR_TYPE This type indicates that an error occurred when trying
to obtain a resource value. The associated value is
undefined.
RM_FLOAT64_TYPE The resource is a double-precision floating point
value.