(DI-2208) Custom Collectors

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

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

To check what is a collector, see the chapter (DI-2208) Collectors.


Create a Custom collector with a custom KPI

Step 1: Create a Custom collector

  1. Go to the class builder (transaction SE24).
  2. Fill in the name of a class: /DVD/MON_CL_COL_TEMPLATE.
  3. Copy the class /DVD/MON_CL_COL_TEMPLATE (CTRL + F5).
  4. Fill in the 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 CrystalBridge® Monitoring 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 described in the chapter (DI-2208) Define a Custom KPI. After you created the KPI definition, return to this page to complete the creation of the Custom collector. 

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

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

    If you copied the class /DVD/MON_CL_COL_TEMPLATE, this method will include comments, that will help you to identify which parts of the code are mandatory for the implementation of selected 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) 

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


Instead of 'MY_PARAMETER_NAME' use your own parameter name, defined for your custom collector. More information about collector parameters can be found in the chapter (DI-2208) 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 the collector's method get_inputs().


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

Detail table (optional)

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

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

In case you would like to create your own Detail table for your custom collector, see the chapter 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 CrystalBridge® Monitoring, you must save them for each KPI using the collector's method add_kpi( ).


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 to specify the monitoring profile of a KPI, as described in the chapter (DI-2208) Define a Monitoring Profile for a KPI.

The complete setup of the custom KPI collection is described in the (DI-2208) The Complete Process of Custom KPI Creation and Data Collection.