44 lines
1.6 KiB
Django/Jinja
44 lines
1.6 KiB
Django/Jinja
module {{ module }} {
|
|
|
|
source = "../../_dynatrace-base-modules/dynatrace-service-level-objective"
|
|
|
|
name = "{{ slo_name }}"
|
|
|
|
description = "{{ description }}"
|
|
|
|
# entity selector object
|
|
filter = ""
|
|
|
|
# metric expression of the calculation as done in data explorer ui
|
|
metric_expression = <<EOT
|
|
(100)*((1)-({{ metric }}:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method),
|
|
fromRelationship.isServiceMethodOfService(
|
|
type(~"SERVICE~"),entityName.in(
|
|
~"{{ services }}~"
|
|
)
|
|
),entityName.in(
|
|
~"{{ keyRequests }}~"
|
|
)"))))):splitBy())
|
|
/
|
|
(builtin:service.keyRequest.count.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method),
|
|
fromRelationship.isServiceMethodOfService(
|
|
type(~"SERVICE~"),entityName.in(
|
|
~"{{ services }}~"
|
|
)
|
|
),entityName.in(
|
|
~"{{ keyRequests }}~"
|
|
)"))))):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 = {{ target }} # if not set(removed) it's defaulted to 98
|
|
warning = {{ warning }} # if not set(removed) it's defaulted to 99
|
|
|
|
}
|