From 364d1fe9e2057881b40e89c5dbef6a5334eb8b99 Mon Sep 17 00:00:00 2001 From: ermisw Date: Wed, 11 May 2022 10:29:42 +0200 Subject: [PATCH] Perseus slo to all envs --- .../Perseus_Reliability_of_key_requests.tf | 74 +++++++++++++++++++ .../Perseus_Reliability_of_key_requests.tf | 74 +++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 CN_PROD/slo/Perseus_Reliability_of_key_requests.tf create mode 100644 EMEA_PROD/slo/Perseus_Reliability_of_key_requests.tf diff --git a/CN_PROD/slo/Perseus_Reliability_of_key_requests.tf b/CN_PROD/slo/Perseus_Reliability_of_key_requests.tf new file mode 100644 index 0000000..9fc95f4 --- /dev/null +++ b/CN_PROD/slo/Perseus_Reliability_of_key_requests.tf @@ -0,0 +1,74 @@ +module Perseus__-_Reliability_of_key_requests { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + + name = "Perseus - Reliability of key requests" + + description = "" + + + + #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( + ~"Perseus (/service) - cub-personalization - prod~" + ) + ) + ,entityName.in( + ~"GET /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"PUT /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"createAssociationForGcidAndVin~" + )") + ) +))):splitBy()) +/ +(builtin:service.keyRequest.count.server:filter( + and( + or( + in( + "dt.entity.service_method", + entitySelector( + "type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"Perseus (/service) - cub-personalization - prod~" + ) + ) + ,entityName.in( + ~"GET /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"PUT /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"createAssociationForGcidAndVin~" + )") + ) +))):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 + +} \ No newline at end of file diff --git a/EMEA_PROD/slo/Perseus_Reliability_of_key_requests.tf b/EMEA_PROD/slo/Perseus_Reliability_of_key_requests.tf new file mode 100644 index 0000000..9fc95f4 --- /dev/null +++ b/EMEA_PROD/slo/Perseus_Reliability_of_key_requests.tf @@ -0,0 +1,74 @@ +module Perseus__-_Reliability_of_key_requests { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + + name = "Perseus - Reliability of key requests" + + description = "" + + + + #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( + ~"Perseus (/service) - cub-personalization - prod~" + ) + ) + ,entityName.in( + ~"GET /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"PUT /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"createAssociationForGcidAndVin~" + )") + ) +))):splitBy()) +/ +(builtin:service.keyRequest.count.server:filter( + and( + or( + in( + "dt.entity.service_method", + entitySelector( + "type(service_method), + fromRelationship.isServiceMethodOfService( + type(~"SERVICE~"),entityName.in( + ~"Perseus (/service) - cub-personalization - prod~" + ) + ) + ,entityName.in( + ~"GET /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"PUT /service/api/vehicle/v1/gcid/[UUID]/vin//pds~", + ~"createAssociationForGcidAndVin~" + )") + ) +))):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 + +} \ No newline at end of file