Database Reference
In-Depth Information
Listing 10-19. ECM Metadata Snippet
<METADATAS>
<METADATA SNAP_TYPE="HostSample3Snap" TARGET_TYPE="sample_host3" VER="1">
<METADATA_UI_NAME>Hostsample Configuration Data</METADATA_UI_NAME>
<TABLE NAME="MGMT_EMX_HS_SYSTEM" SINGLE_ROW="Y">
<UI_NAME>Hostsample System Configuration</UI_NAME>
<COLUMN NAME="hostname" TYPE="STRING" TYPE_FORMAT="256" IS_KEY="N">Hostname</COLUMN>
<COLUMN NAME="version" TYPE="STRING" TYPE_FORMAT="256" IS_KEY="N">Version</COLUMN>
</TABLE>
...
<TABLE NAME="MGMT_EMX_HS_NET" SINGLE_ROW="N">
<UI_NAME>Hostsample Network Configuration</UI_NAME>
<COLUMN NAME="net_interface" TYPE="STRING" TYPE_FORMAT="32" IS_KEY="Y">Interface</COLUMN>
<COLUMN NAME="net_mtu" TYPE="NUMBER" IS_KEY="N">Maximum Transmission Unit (bytes)</COLUMN>
<COLUMN NAME="net_flag" TYPE="STRING" TYPE_FORMAT="16" IS_KEY="N">Flag</COLUMN>
</TABLE>
</METADATA>
</METADATAS>
The ECM metadata contains the root element METADATAS , which is just a container for one or more snapshots
defined by the METADATA element. One metadata element must match to one CollectionItem in the default collection
metadata that I will define later. Think of it as a configuration snapshot.
Each configuration snapshot defines one or more tables, where each table matches to a configuration metric
defined in the target type metadata. All configuration metrics also must be included in the matching CollectionItem
in the default collection metadata. Columns between configuration tables and configuration metrics must, of
course, match. Multirow tables are marked with the SINGLE_ROW="N" attribute and must contain at least one column
marked as key by using IS_KEY="Y" . Because you are comfortable with metadata definitions, I won't go through
each attribute. Most of them are self-explanatory, and you can find full details in Chapter 6 of the Extensibility
Programmer's Reference .
Note that you need to increment the version of the ECM metadata ( VER attribute) every time it's changed, just as
for the target type metadata.
The documentation refers to the generate_ecm_resources utility that's presumably a part of the EDK. This utility
is supposed to generate a configuration metric template as well as an associated default collection template, so that
all table names, columns names, and other items are matching—which I found can be quite confusing to create from
scratch. Unfortunately, the utility is missing in the latest EDK distribution that I used (the one coming with the 12.1.0.2
version of EM12c), so I couldn't take advantage of it.
Configuration metrics for the target type metadata need to be created, as shown in Listing 10-20. Note that the
listing provides only relevant snippets because the fetchlet configuration in the QueryDescriptor elements is already
familiar to you as well as Display elements. The complete XML definitions are available in the EDK sample plug-ins.
Listing 10-20. Configuration Metrics Snippet
<Metric NAME="HostConfig" TYPE="RAW" CONFIG="TRUE">
<TableDescriptor TABLE_NAME="MGMT_EMX_HS_SYSTEM">
<ColumnDescriptor NAME="hostname" COLUMN_NAME="hostname" TYPE="STRING" IS_KEY="FALSE"/>
<ColumnDescriptor NAME="version" COLUMN_NAME="version" TYPE="STRING" IS_KEY="FALSE"/>
</TableDescriptor>
<QueryDescriptor ...>...</QueryDescriptor>
</Metric>
...
 
Search WWH ::




Custom Search