Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide is only for expert users who want to implement their own collector. The Custom collector is created in ABAP.

The Custom collectors enable you to create custom KPIs, which are collected according to logic you defined in the Custom collector. Below are instructions how to create the Custom collector with the custom KPI, which consist of these steps:

Table of Contents
maxLevel2

To check what is a collector, see (DI-2005) Collectors.

Page Tree
root(DI-2005) Collectors

Create a Custom collector with a custom KPI

Step 1: Create a Custom collector

  1. Go the the class builder (transaction SE24).
  2. Fill the name of a class: /DVD/MON_CL_COL_TEMPLATE.
  3. Copy the class /DVD/MON_CL_COL_TEMPLATE (CTRL + F5).
  4. Fill a name of your Custom collector class starting with a capital Z* or Y*.
  5. Display your class and Activate it. 

Step 2: Add your Custom collector to the Insights collector list

  1. From the main screen go to the Settings > Collector settings (or transaction /DVD/MON_COL).
  2. In Collectors, click New Entries.
  3. Fill in your Custom collector name with its description (License key should stay empty).  

Step 3: Define a custom KPI

Define the custom KPI as is described in the chapter Define a Custom KPI. After you created the KPI definition, return to this page to complete the creation of Custom collector. 

Note

During the definition of a custom KPI, fill in the field KPI collector with the technical name of your created Custom collector in the previous steps. 

Step 4: Implement the logic of a Custom collector
Anchor
Implement the logic of a Custom collector
Implement the logic of a Custom collector

  1. Open your Custom collector class in Class builder.
  2. Go to the method /DVD/MON_IF_COLLECTOR~COLLECT_DATA. 
  3. Implement the method /DVD/MON_IF_COLLECTOR~COLLECT_DATA.

    Note

    If you copied the class /DVD/MON_CL_COL_TEMPLATE, this method will included comments, which help you identify which parts of the code are mandatory and which optional for the implementation of the features of the Custom collector. 

    During the implementation of the calculation logic for a KPI, you may use the following features of the collector:

Features of a Custom collector

Parameters (optional) 
Anchor
Custom collector parameters
Custom collector parameters

In the case you have set parameters for your custom collector, you can obtain the parameter values by using collector method get_parameter()

Image Modified

Instead of 'MY_PARAMETER_NAME' use your own parameter name, defined for your custom collector. More information about collector parameters can be found in (DI-2005) Parameters of Collectors

Create a parameter for a custom collector

  1. From the main screen go to the Settings > Collector settings (or transaction /DVD/MON_COL).
  2. Select your Custom collector name
  3. Double-click Parameters.
  4. Click New Entries
  5. Fill your Parameter name and its Value
  6. Save (CTRL + S)

Input table (optional)

You can define Input values for your collectors which are sent from the central system to this collector. To obtain these inputs in your collector, you have to use collector's method get_inputs(). 

Image Modified

Instead of '/DVD/MON_TT_INPUT_TABLE' use your own created table for input values.

Detail table (optional)
Anchor
Detail table for a custom collector
Detail table for a custom collector

You can define Detail tables for your custom collector. Detail table stores additional information about collected KPIs.

Image Modified

Instead of '/DVD/MON_OUTPUT_TABLE' use your own created Detail table name. For more information about Detail tables, see (DI-2005) KPI Details Displayed in a Detail Table.

In the case you would like to create your own Detail table for your custom collector, see the chapter (DI-2005) Create a Detail Table for a Custom KPI Assigned to a Custom Collector.

KPI values (mandatory)

You must implement the logic of your custom KPI calculation in the collector. You can calculate and save multiple KPIs by one collector. To display the KPI values in Insights, you must save them for each KPI using the collector's method add_kpi( ). 

Image Modified

Instead of 'MY_KPI_01/MY_KPI_02' use your own custom KPI names.

After you finished and activated the implemented logic of your Custom collector, the next step is specify the monitoring profile of a KPI, as described in the chapter Define a Monitoring Profile for a KPI.

Tip

The complete setup of custom KPI collection is described in the The Complete Process of Custom KPI Creation and Data Collection.