91 lines
3.6 KiB
HCL
91 lines
3.6 KiB
HCL
module TP_Mobile_Mapping {
|
|
|
|
source = "../../_dynatrace-base-modules/dynatrace-service-level-objective"
|
|
|
|
|
|
name = "TP_Mobile_Mapping"
|
|
description = "CoCo-QM-Report_Mobile"
|
|
|
|
|
|
#entity selector object
|
|
filter = ""
|
|
|
|
#metric expression of the calculation as done in data explorer ui
|
|
metric_expression = <<-EOT
|
|
(100)*
|
|
((builtin:service.keyRequest.errors.server.successCount:filter(
|
|
and(
|
|
or(
|
|
in(
|
|
"dt.entity.service_method",
|
|
entitySelector(
|
|
"type(service_method),
|
|
fromRelationship.isServiceMethodOfService(
|
|
type(~"SERVICE~"),entityName.in(
|
|
~"btc-user-composite-service - PROD~",
|
|
~"vehicle-mapping-composite-service - PROD~"
|
|
)
|
|
)
|
|
,entityName.in(
|
|
~"GET /api/v2/presentation/users/validate~",
|
|
~"POST /api/v2/vehicles/<VIN>/primary~",
|
|
~"POST /api/v2/vehicles/<VIN>/primary/map~",
|
|
~"POST /api/v1/vehicles/<VIN>/validate-security-code~",
|
|
~"POST /api/v1/vehicles/<VIN>/resend-security-code~",
|
|
~"DELETE /api/v1/vehicles/<VIN>~",
|
|
~"POST /api/v3/mappings/create~",
|
|
~"POST /api/v3/mappings/continue~",
|
|
~"POST /api/v3/mappings/validate-security-code~",
|
|
~"POST /api/v3/mappings/resend-security-code~",
|
|
~"GET /api/v3/images/<image>~",
|
|
~"DELETE /api/v3/mappings~"
|
|
)")
|
|
)
|
|
))):splitBy())
|
|
/
|
|
(builtin:service.keyRequest.count.server:filter(
|
|
and(
|
|
or(
|
|
in(
|
|
"dt.entity.service_method",
|
|
entitySelector(
|
|
"type(service_method),
|
|
fromRelationship.isServiceMethodOfService(
|
|
type(~"SERVICE~"),entityName.in(
|
|
~"btc-user-composite-service - PROD~",
|
|
~"vehicle-mapping-composite-service - PROD~"
|
|
)
|
|
)
|
|
,entityName.in(
|
|
~"GET /api/v2/presentation/users/validate~",
|
|
~"POST /api/v2/vehicles/<VIN>/primary~",
|
|
~"POST /api/v2/vehicles/<VIN>/primary/map~",
|
|
~"POST /api/v1/vehicles/<VIN>/validate-security-code~",
|
|
~"POST /api/v1/vehicles/<VIN>/resend-security-code~",
|
|
~"DELETE /api/v1/vehicles/<VIN>~",
|
|
~"POST /api/v3/mappings/create~",
|
|
~"POST /api/v3/mappings/continue~",
|
|
~"POST /api/v3/mappings/validate-security-code~",
|
|
~"POST /api/v3/mappings/resend-security-code~",
|
|
~"GET /api/v3/images/<image>~",
|
|
~"DELETE /api/v3/mappings~"
|
|
)")
|
|
)
|
|
))):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_Mapping_metric" {
|
|
value = module.TP_Mobile_Mapping.metric_expression
|
|
} |