44 lines
1.6 KiB
HCL
44 lines
1.6 KiB
HCL
module TP_Mobile_VehicleData {
|
|
|
|
source = "../../_dynatrace-base-modules/dynatrace-service-level-objective"
|
|
|
|
|
|
name = "TP_Mobile_VehicleData"
|
|
description = "2.0 SLO Mobile"
|
|
|
|
|
|
#entity selector object
|
|
filter = ""
|
|
|
|
#metric expression of the calculation as done in data explorer ui
|
|
metric_expression = <<EOT
|
|
(100)-(builtin:service.keyRequest.errors.fivexx.rate:filter(and(in("dt.entity.service_method",entitySelector("type(service_method),
|
|
fromRelationship.isServiceMethodOfService(
|
|
type(~"SERVICE~"),entityName.in(
|
|
~"btc-vehicle-composite-service - PROD~",
|
|
~"VehicleService - PROD~"
|
|
)
|
|
)
|
|
,entityName.in(
|
|
~"GET /api/v1/vehicles/<VIN>/state~",
|
|
~"GET /v1/vehicle/<VIN>~",
|
|
~"GET /v2/vehicle/<VIN>~"
|
|
)")))):splitBy())
|
|
EOT
|
|
|
|
#if not set (removed) it's defaulted to "-1d"
|
|
timeframe = "-1d"
|
|
|
|
#currently the only possible value
|
|
evaluation = "AGGREGATE"
|
|
|
|
#Target and warning percentage of the SLO as double
|
|
target = 98 #if not set(removed) it's defaulted to 98
|
|
warning = 99 #if not set(removed) it's defaulted to 99
|
|
|
|
}
|
|
|
|
|
|
output "TP_Mobile_VehicleData_metric" {
|
|
value = module.TP_Mobile_VehicleData.metric_expression
|
|
} |