The service model describes your data, which KPIs to generate and how to calculate them. A JSON representation is used to describe the model, which includes the following top-level objects: dimension tree metric kpi threshold (optional)
Configure the service model in a KPI profile. To create a new KPI profile profile, click the New Configuration button in the Build view, and then select KPI Profile.
Dimension and Tree ObjectsStart with the dimension and tree objects. The dimensions describe the fields of your data that are used for grouping and the tree the relation between them. The identifying fields in the input data are region and country . A region has one or more countries. The data type is sales . In the dimension object we specify each of our identifying fields as separate objects, with the datatype and field.
Configuring Dimensions and Tree JSON
xmlDimensions
MetricsDefine the metrics using the amount field in the input data: totalSales - For total sales, sum up the amount for each record by using the sum function on the expression expr , which contains the amount field. avgSales - For average sales use the avg function instead of sum .numSales - To count the number of records, use the conditional function isSet in the expression. This function evaluates to 1 if there is a value in amount or 0 if there is no value. Use the function sum to sum up the 1s and 0s.
Configuring Metrics JSON
EclipseMetrics
KPIsDefine the KPIs. The expected output is the total sales, average sales, and number of sales per region and country in 60 second periods. Use the property node to describe where in the topology the KPI should be calculated and windowSize to set the period length. Use the names of the metrics defined above in the expr property.
Configuring KPIs JSON
KPIs
Completing and Saving the ProfileSelect the Aggregated Output checkbox and set the Window Size to 60, and Save the profile with the name "SalesModel" in the folder "kpisales". JSON - Complete Model
Complete Model
|