Create a Custom collector with a custom KPI
Step 1: Create a Custom collector
- Go the the class builder (transaction SE24).
- Fill the name of a class:
/DVD/MON_CL_COL_TEMPLATE.
- Copy the class
/DVD/MON_CL_COL_TEMPLATE
(CTRL + F5). - Fill a name of your Custom collector class starting with a capital Z* or Y*.
- Display your class and Activate it.
Step 2: Add your Custom collector to the Insights collector list
- From the main screen go to the Settings > Collector settings (or transaction /DVD/MON_COL).
- In Collectors, click New Entries.
- 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 (DI-1904) 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 | ||||
---|---|---|---|---|
|
- Open your Custom collector class in Class builder.
- Go to the method
/DVD/MON_IF_COLLECTOR~COLLECT_DATA.
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
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()
.
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-1904) Parameters of Collectors.
Create a parameter for a custom collector
- From the main screen go to the Settings > Collector settings (or transaction /DVD/MON_COL).
- Select your Custom collector name
- Double-click Parameters.
- Click New Entries
- Fill your Parameter name and its Value
- 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().
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
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.
Instead of '/DVD/MON_OUTPUT_TABLE'
use your own created Detail table name. For more information about Detail tables, see (DI-1904) 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-1904) 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( ).
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. |