kpi(3.3)
The You may configure kpi objects to perform additional calculations based on metrics, e g ratios or sums of ratios. The following JSON schema describes the data format of the The When When The incoming data is sorted into time periods based on the timestamp value of the A flooring algorithm is applied to timestamps in order to select the start time of a period: Note! When the value of Example - Expressions "Plain" metric: Ratio: Sum of Ratios: In the case of division by zero, the value of the output of the expression will be positive infinity, negative infinity, or NaN (Not a Number) as defined in the JVM specification. Example - JSON Representationkpi
objects describe how metrics are linked to dimensions and threshold levels.kpi
object type:kpi
object type has the following properties:Property Description node node
must contain an array of strings that constitutes a path to a node in a tree
object. The first value in the array must match the name of a tree object, and the subsequent values must match the name of the descendant nodes in the tree
object.immediateAlarm immediateAlarm
is set to false
, exceeded threshold levels will be indicated in a KPIOutput
UDR at the end of a period. The UDR field outputType
will be set to 0. This is the default behavior.immediateAlarm
is set to true, a KPIOutput
UDR with outputType
1 will be generated at the time of detection. Exceeded threshold levels will also be indicated in the output that is generated at the end of the period. Immediate alarm data are sent by Spark to the Kafka topic kpi-alarm
.windowSize KDR
UDRs. The KPIs are calculated and generated according to these periods.windowSize
defines the length of the periods in the same time unit as the KDR timestamp.period start = kdr.timestamp - (kdr.timestamp mod windowSize)
aggregated-output
is false
, kpi
objects in your service model may have different window sizes. However, when the value of aggregated-output
is true, all kpi
objects in the model must have the same window size.threshold threshold
may contain the name of a threshold
object.expr expr
must contain an arithmetic expression based on metric
objects. You can use the expression to calculate e.g. ratios or sums of ratios."expr": "AvgLength"
"expr": "TotalAttempts/TotalSuccessful"
"expr": "(Type1Attempts/Type1Successful)+(Type2Attempts/Type2Successful)"
"kpi": {
"Region.AL": {
"node": [
"tree1",
"Region"
],
"windowSize": 60,
"threshold": "Region.AL",
"expr": "AvgLength"
}
}