slo-generator/templates/terraform-template.j2

35 lines
1.2 KiB
Django/Jinja

module {{ module }} {
source = {{ source }}
name = {{ slo_name }}
description = {{ description }}
#entity selector object
filter = {{ 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(
~"{{ service }}~"
)
),entityName.in(
~"{{ keyRequest }}~"
)")))):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
}