Create a custom pull metric connector

A custom pull metric connector requires a script, connector definition, and connector instance to retrieve raw metric information from an external source.

Before you begin

Role required: evt_mgmt_admin

Ensure that the Operational Intelligence plugin is activated, see Request Operational Intelligence.

Prepare the prescribed requirements, see Collect raw metric information from a custom metric connector instance.

About this task

The custom metric connector makes remote API calls to an external source to get raw metric data. The connector then writes or sends that data to the instance using the handleMetric() function.

Procedure

  1. Create a custom MID Server script include. As an example, you can use the MetricCollector script that is provided with the base instance.
  2. Navigate to MID Server > Script Includes and click New.
    1. In the Name field, specify the name.
    2. Select Active.
    3. In the Script field, enter the custom metric collector script. Use JavaScript to compose this script.
  3. Complete the form as appropriate, and then click Submit.
  4. Configure a dedicated MID Server. For more information, see Configure a MID Server for Operational Intelligence.
  5. Navigate to Event Management > Event Connectors (Pull) > Connector Definitions and click New.
    1. In the Name field, specify the name.
    2. Select the Collect metrics option.
    3. Right-click the form header and select Save.
    4. In the JavaScript to run field, select the newly created custom MID Server script file.
  6. In the Connector Parameters area, specify the parameters for all additional information needed for the connector, for example, topics that you want to subscribe to.
  7. In the Connector Definition to MID Server Capabilities area, specify the details of the MID Server. Use a dedicated MID Server with ServiceAnalytics as a supported application, and with the ITOA Metrics capability. For more information, see Configure a MID Server for Operational Intelligence.
  8. Complete the form as required, then click Submit.
  9. Navigate to Event Management > Event Connectors (Pull) > Connector Instances and click New.
    Note: Remember to specify values for parameters that you defined.
    1. In the Name field, specify the name.
    2. In the Connector definition field, select the newly created custom metric connector definition.
    3. Select the Metrics collection option.
    4. In the Metrics collection schedule field, specify the number of seconds for the metrics collection schedule job to wait before it repeats.
    5. Right-click the form header and select Save.
    6. Complete the form as required, then click Save.
  10. Click Test Connector to verify the connection between the MID Server and the custom metric connector.
  11. Click Active.
  12. Click Update.

What to do next

  • To confirm or debug the custom metric connector script, use debug printouts to the MID Server log.
  • To monitor incoming events using the custom metric connector instance, navigate to ECC > Queue and filter on ConnectorProbe.