1 Getting Started with Plug-in Development

This chapter contains the following sections:

About the Plug-in Creation Process

Creating a plug-in involves the following steps, all of which are covered in this book:

  1. Designing your plug-in.
  2. Developing the plug-in, which includes creating the requisite metadata files that enable the plug-in functionality.
  3. Staging the plug-in.
  4. Validating the plug-in.
  5. Packaging the plug-in as an archive (.opar) file.
  6. Importing the plug-in into Enterprise Manager Cloud Control.
  7. Deploying the plug-in to Oracle Management Service.
  8. Adding a target from your environment to initiate target monitoring. The plug-in files required by the Management Agent to monitor the target will be pushed to the Agent at this time.
  9. Testing the plug-in to verify that it is behaving as expected.

As you continue to modify your plug-in metadata, you can upload your new metadata files to Enterprise Manager without re-deploying the plug-in archive using the Metadata Registration Service. See Updating Deployed Metadata Files Using the Metadata Registration Service (MRS) for instructions on using this service.

In addition, to keep track of each updated version of your plug-in, you should incrementally update the plug-in version as follows in the following plug-in metadata files:

  • In the PluginVersion attribute in the plugin.xml file that describes the plug-in to Oracle Management Service the plug-in is deployed to. See Creating the plugin.xml File.

  • In the Version attribute in the plugin_registry.xml file that describes the plug-in to Management Agents the plug-in is deployed to. See Creating the plugin_registry.xml File.

About the Extensibility Development Kit (EDK)

A key component of the Enterprise Manager Cloud Control architecture is the Extensibility framework. To enable Oracle partners to extend the Enterprise Manager platform, an Extensibility Development Kit (EDK) is provided with the product.

The EDK is a collection of tools, utilities, and documentation, including:

  • Enterprise Manager Extensibility documentation: Provide general guidelines for programming Enterprise Manager plug-ins

  • Reference Implementation: Provides a reference code implementation, code snippets, and so on for various Enterprise Manager features

  • Build time tools to verify EDK conformance: A tool that you can use to validate and report any violations, with respect to Enterprise Manager Extensibility guidelines

  • Packaging Tool: A tool to package the plug-in components tool (empdk)

  • Verification Tool: A tool to validate plug-in code components and to report violations (if any).

Enterprise Manager EDK includes a command line utility called empdk. Use this utility to package or validate a plug-in archive. For information associated with the empdk commands and their options, see Validating the Plug-in.

After you download the EDK, unzip it on your local system, and change your current directory to the location where you unpacked the EDK. The EDK contains reference documentation and guides to help you with plug-in development as well as the API reference you might need to integrate while developing plug-ins.

For information about downloading the EDK, see Installing the Extensibility Development Kit (EDK).

Contents of the EDK

The EDK archive contains the following directories:

  • /bin

    Contains the empdk utility, which you use to:

    • Validate the structure of your plug-in

    • Package your plug-in

    • Convert the metadata for existing (pre-Cloud Control 12) plug-ins to the new metadata formats

  • /doc

    Contains the Oracle Enterprise Manager Extensibility Programmer's Guide and Programmer's Reference, as well as the EDK API Reference documentation, including documentation on Management Views. Review overview.html for links to the documentation provided.

    You can also access the EDK API Reference documentation directly through its index page (sdk_api_ref.html).

  • /lib

    Contains internal libraries used by the EDK.

  • /oui

    Contains internal libraries used by the EDK.

  • /samples

    Contains a complete reference implementation of a plug-in, packaged as demo_hostsample.zip. The sample metadata files included should be used as examples of the files referenced throughout the EDK documentation.

    View the README packaged with the archive for instructions on building, deploying, and using the sample plug-in.

Other utilities referenced in this documentation, including EM CLI and EM CTL, are installed with Enterprise Manager and are typically deployed to the Oracle Management Service (OMS) host.

Installing the Extensibility Development Kit (EDK)

Before you begin developing plug-ins, install the Extensibility Development Kit (EDK).

Note:

Before installing the EDK, you must have the following:

  • Latest version of the EDK ZIP archive from the Self Update console. (To access the Self Update console, from the Cloud Control console, select Setup, then Extensibility, and then Self Update.)

  • Java version 1.7.0_51 or later

  • Local system running Solaris, Linux, HP-UX, AIX, or Windows with New Technology File System (NTFS)

To install the EDK:

  1. Download the EDK ZIP archive to your local system using one of the following options:

    • Enterprise Manager Cloud Control

      1. Log in to Enterprise Manager Cloud Control.

      2. From the Setup menu, select Extensibility, then select Development Kit.

        The Extensibility Development Kit (EDK) page appears.

      3. Under Installing the EDK, select Download the Extensibility Development Kit to your workstation.

      4. Save 13.1.0.0.0_edk_partner.zip to your local system.

    • Enterprise Manager Command Line Utility (EM CLI)

      Note:

      For information about setting up EM CLI, see Setting Up the EM CLI Utility.

      Open a command prompt and run the following command:

      emcli get_ext_dev_kit
      

      This command downloads the EDK zip archive to the same directory from where you ran the command and does not require any parameters.

  2. Set your JAVA_HOME environment variable and ensure that it is part of your PATH. For example:

    setenv JAVA_HOME /usr/local/packages/j2sdk1.7.0_51
    
    setenv PATH $JAVA_HOME/bin:$PATH
    
  3. Unpackage the downloaded EDK ZIP archive to a directory on your local system. For example:

    Unzip 13.1.0.0.0_edk_partner.zip
    

    This command creates the following directories under the directory (release_edk_partner) where you unpackaged the EDK ZIP archive:

    release_edk_partner
                       |
                        bin
                        doc
                        lib
                        oui
                        samples
                        README
    

    For more information about the directory contents, see Contents of the EDK.

Designing the Plug-in

Before creating your plug-in, you must first determine what information needs to be collected to monitor and manage the target type. This involves:

  • Identifying performance and configuration metrics that should be collected.

  • Determining how often each metric should be collected. Oracle recommends that the collection frequency for any metric should not be less than once every five minutes.

  • Based on customer-specific operational practices, specifying default warnings and critical thresholds on these metrics. Whenever a threshold is crossed, Enterprise Manager generates an alert, informing administrators of potential problems.

Creating a Basic Plug-in

Ideally, begin by creating a basic monitoring plug-in that includes the basic required metadata:

  • The target type definition file, which defines:

    • A required "Response" metric group, which includes a status metric and a performance metric.

    • Credentials needed to authenticate with the target.

    For more information, see Creating Target Metadata Files.

  • A default collection file defining the frequency at which metrics and configuration data will be collected. For more information, see Creating the Default Collection File.

  • Developing Oracle Business Intelligence Publisher (BI Publisher) reports to display collected target data.

    For more information, see Developing BI Publisher Reports.

Once created, you will validate and package your plug-in. See Validating, Packaging, and Deploying the Plug-in for instructions.

As the final step, deploy your plug-in to Enterprise Manager Cloud Control and begin testing to ensure that data for the Response metric is being returned.

Note:

The EDK provides a sample host plug-in. This contains examples of all features mentioned previously. For more information, see the README bundled with the sample plug-in.

Creating an Intermediate Plug-in

When you have created a basic plug-in, you might want to enhance the plug-in's capabilities by adding more complex functionality.

  • Add more complex metrics.

    For more information, see Defining Advanced Metrics.

  • Provide the ability to collect configuration data for the target, which is used to create a "snapshot" of the target's configuration at a specific point in time.

    For more information, see Collecting Target Configuration Data.

  • Create a metadata-based metadata custom user interface, which will essentially add a custom target home page for displaying target metrics to Enterprise Manager.

    For more information, see Defining a Management User Interface.

  • Defining target associations, which can be used to create topology models of the targets managed by the plug-in.

    For more information, see Using Derived Associations.

  • Define a job type that executes specific tasks specific to the target type.

    For more information, see Adding Job Types.

Creating an Advanced Plug-in

When you have successfully created and validated your basic or intermediate plug-in, you might want to enhance it with advanced features. Among the enhancements to consider:

  • Adding the ability to automatically discover newly-added instances of the target type managed by the plug-in.

    For more information, see Defining Target Discovery.

  • Building a Flex-based custom management user interface. This page will be accessed with other target home pages through the Cloud Control console.

    For more information, see Defining a Management User Interface.

  • Define compliance standards and monitoring rules specific to the target type.

    For more information, see Adding Compliance Standards.