The first steps in writing an agent schema are defining the "attributes" (for example, variables, counters, state and error information) that you want your agent to collect, and naming and selecting data types for the attributes. Table 11-1 , lists the defined data types.
agent sync description "synchronous interface stats" serial 1 rpcid 100104 ( ... |
"
11.3.4 Defining an
Agent Enumeration
If any
of the attributes of any agent are enumerated types, the enumeration should
be defined in the agent schema. An agent schema may define zero or more agent-specific
enumerations. The scope of an agent-specific enumeration is confined to the
agent. The format is as follows:
enum <enumerationName> ( integer "<enumeration text>" ... ) |
enum boolean ( 0 "False" 1 "True" ) |
11.3.5 Defining
a Group and Table
A
group or table description consists of the group or table name, optional
descriptive text, and a list of attributes. Group and table descriptions
have the following syntax:
{ group | table } <groupname> [ description "<descriptive text>" ] ( <attribute description> ... ) |
agent sync description "synchronous interface stats" serial 1 rpcid 100104 ( table mode description "synchronous interface" ( ... ) table data description "I/O statistics" ( ... ) |
11.3.6
Defining an Attribute
An attribute description consists of an attribute type specification (see
Table 11-1 on page 11-3
), the attribute name, and optional descriptive text. Attribute descriptions
have the following syntax
read/write <type name> [ description "<descriptive text>" ] [ units <unit type> ] |
:
string[32] ifname
description "transmit clock source" |
11.3.7 Defining an Agent Error
If an agent wishes to return agent-specific errors, they should be defined
in the agentErrors section of the agent schema. This section defines a table
of error numbers and associated error messages specific to a particular agent.
The error numbers are represented by integers and the error messages are
descriptive text enclosed in double quotes. Defining errors in the schema
file localizes error messages to aid in making agents multinational.
The agentErrors section has the following syntax:
agentErrors (
|
agentErrors (
1 "No synchronous interface on this host" 2 "Error in SIOCGIFCONG ioctl system call" |
Agent schema may also be read into the Console using the File button Load option.
map "<req_obj_field1>=<prop_field1>[,<req_obj_field2>=<prop_field2>]" |
The map entry immediately follows the "agent description"--see the following
example:
agent XYZagent |
For instance, consider an element of the following type:
NOTE - The mapping occurs when the Property Sheet is brought up for
a new request or when a "Quick Dump" request is launched. It does not occur
when an existing request is modified.
record component.notASun (
string[32] Name # Name of the system string[32] Real_Name # Its real name
|