Database Reference
In-Depth Information
The staging root contains plugin.xml , a plug-in definition containing the basic plug-in information required by
the OMS. The two mandatory subdirectories in the staging root are oms and agent . The oms directory contains all the
files used for deployment on the OMS, and the agent directory contains the files for deployment on the agent. You
can think of them as agent-side and OMS-side areas. You will see that some files must be included in both areas. The
plugin_registry.xml file is somewhat similar to the plugin.xml file in the staging root directory, but its content is
for deployment on the management agent. Think of plugin.xml and plugin_registry.xml together as the plug-in
definition. Note that a single plug-in may contain more than a single target type if it's designed to support a complex
system. For example, the Oracle Exadata Plug-in contains ten new target types.
Target type metadata is the key component of a plug-in. The XML target type metadata file is included in both the
OMS and the agent areas. I usually place the target type metadata file in <stage>/oms/metadata/targetType/ and
create a soft link to it from <stage>/agent/metadata/ since my development platform is Linux. While the name of
the file itself can be selected freely, the advised practice is to name it after the target type it defines and add the .xml
extension.
Default collection metadata is tightly coupled with the target type metadata and defines collection schedules and
collection-related attributes for all metrics including alert conditions. Just like the target type metadata, the default
collection metadata XML file is present in both OMS and agent areas, so I typically use a soft link as well. It's advisable
to name the file the same as the target type metadata XML file.
You will learn that there are many more files that you can include in the OMS-side area, but this is the bare
minimum you would normally see in any plug-in. Start each new plug-in by creating this basic directory tree.
Plug-in Metadata
A simplified version of plugin.xml is shown in Listing 10-5. You will find it in <stage>/plugin.xml . Remember that
the staging area of our first sample plug-in is <EDK>/samples/plugins/oracle.samples.xsh1/plugin_dist .
Listing 10-5. Plug-in Metadata plugin.xml for Simple Host Plugin 1
<?xml version = "1.0"?>
<Plugin xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "
xsi:schemaLocation=
" http://www.oracle.com/EnterpriseGridControl/plugin_metadata plugin_metadata.xsd"
xmlns=" http://www.oracle.com/EnterpriseGridControl/plugin_metadata " >
<PluginId vendorId="oracle" productId="samples" pluginTag="xsh1"/>
<PluginVersion value="12.1.0.0.0"/>
<PluginOMSOSAruId value="2000"/>
<ShortDescription>Sample Host Plugin 1</ShortDescription>
<Readme>Sample Host Plugin 1. See Book Expert Oracle Enterprise Manager 12c.</Readme>
<PluginAttributes Category="Others" DisplayName="Sample Host Plugin 1"/>
<TargetTypeList>
<TargetType name="sample_host1" isIncluded="TRUE"/>
</TargetTypeList>
</Plugin>
See the full plugin.xml file of the sample for more options, as well as the documentation, the Oracle Enterprise
Manager Cloud Control Extensibility Programmer's Reference (Chapter 2, Section 2.4). Even more options can be seen
in the plug-in metadata reference located at <EDK>/doc/partnersdk/mrs/emcore/pluginMetadata/ . Here, let's just
go through a few mandatory, basic elements. The bulky attributes xmlns:xsi, xsi:schemaLocation , and xmlns of the
root element Plugin have references to various namespaces and XML Schemas. Just make sure you keep them as is
from the sample template. The same applies to other XML files that we will use.
The PluginId consists of three parts separated by dots: vendorId.productId.pluginTag . The dot notation will
be used later in the agent-side definition. Vendor ID and Product ID can be up to eight characters long, while the
 
Search WWH ::




Custom Search