Database Reference
In-Depth Information
Listing 10-11.
<InstanceProperty>
Element for Password
<InstanceProperty NAME="sample_host1_password" CREDENTIAL="TRUE" OPTIONAL="TRUE">
<Display>
<Label NLSID="host_password">Host Password</Label>
</Display>
</InstanceProperty>
The
NAME
attribute defines the handle you can use later to reference this property when defining metric
collections. Setting
CREDENTIAL
to
TRUE
ensures that this property is stored encrypted instead of as clear text,
making it more difficult to retrieve passwords by unauthorized users. The
HIDE_ENTRY="TRUE"
attribute makes
the EM12c console use a password-style input box in which stars are displayed instead of the real text entered in
the browser, for properties marked as credentials.
HIDE_ENTRY
is set to
TRUE
by default, so if you want to have the
username part of the credential displayed in clear text, you need to set this attribute to
FALSE
. Another attribute,
NEED_REENTER
, when set to
TRUE
will make the EM12c console display a dual entry for that property—something
you often see done for passwords.
The
OPTIONAL
attribute denotes properties that don't have to be defined and, thus, have some default value
acceptable in many cases. For example, the default value for the
USE_FAKE_DATA
attribute is an empty string, which
signals the plug-in to use real collected metrics.
You can also see that the
InstanceProperty
has a child
Display
element that is already familiar to you. In this
case, it defines how this property is displayed in the EM12c console. To see that in action, navigate to your Host
Sample 1 target and choose Target Setup
➤
Monitoring Configuration from the target's menu, as shown in Figure
10-9
.
Metrics
The set of metrics is the real meat of the target type metadata; they define what information is collected and how.
Metric
is the most important and arguably most complex element of the target type metadata. A target type can (and
normally does) contain multiple
Metric
child elements, and they all must be placed before the
InstanceProperties
element. Listing 10-12 shows the
Response
metric from the
sample_host1
target type.
Listing 10-12.
Response Metric Definition in XML
<Metric NAME="Response" TYPE="TABLE">
<Display>
<Label NLSID="hs_response_displayname">Response</Label>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="Load" TYPE="NUMBER" IS_KEY="FALSE">
<Display>
<Label NLSID="hs_response_cpuload">CPU Load</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Status" TYPE="NUMBER" IS_KEY="FALSE">
<Display>
<Label NLSID="hs_response_status">Status (up/down)</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="scriptsDir" SCOPE="SYSTEMGLOBAL">scriptsDir</Property>
<Property NAME="fake" SCOPE="INSTANCE" OPTIONAL="TRUE">USE_FAKE_DATA</Property>
<Property NAME="perlBin" SCOPE="SYSTEMGLOBAL">perlBin</Property>