From 30073ac24725aee40bc319df9442f0f1df4b0d71 Mon Sep 17 00:00:00 2001 From: rforstner Date: Mon, 4 Apr 2022 13:27:00 +0200 Subject: [PATCH 01/10] changed slo --- EMEA_PROD/slo/TP_Mobile_DigitalKey.tf | 6 +++--- EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf | 4 ++-- EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf | 8 ++++---- EMEA_PROD/slo/TP_Mobile_VehicleData.tf | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf b/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf index 58f2d0d..a6c0d57 100644 --- a/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf +++ b/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf @@ -1,9 +1,9 @@ -module TP_Mobile_Login { +module TP_Mobile_DigitalKey { source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - name = "TP_Mobile_Login" + name = "TP_Mobile_DigitalKey" description = "2.0 SLO Mobile" @@ -13,7 +13,7 @@ module TP_Mobile_Login { #metric expression of the calculation as done in data explorer ui metric_expression = <<-EOT (100)* -((builtin:service.keyRequest.errors.server.successCount:filter( +((1-)(builtin:service.keyRequest.errors.fivexx.count:filter( and( or( in( diff --git a/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf b/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf index 0f92ab2..65ffaad 100644 --- a/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf +++ b/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf @@ -13,7 +13,7 @@ module TP_Mobile_Send2VehicleLegacy { #metric expression of the calculation as done in data explorer ui metric_expression = <<-EOT (100)* -((builtin:service.keyRequest.errors.server.successCount:filter( +((builtin:service.errors.server.successCount:filter( and( or( in( @@ -26,7 +26,7 @@ module TP_Mobile_Send2VehicleLegacy { ) ) )):splitBy())/ -(builtin:service.keyRequest.count.server:filter( +(builtin:service.requestCount.total:filter( and( or( in( diff --git a/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf b/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf index bf809d3..6efdd25 100644 --- a/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf +++ b/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf @@ -26,8 +26,8 @@ module TP_Mobile_Send2VehicleMGU { ) ) ,entityName.in( - ~"/v2/motorist/[UUID]/trips", - ~"/v3/motorist/[UUID]/trips" + ~"/v2/motorist/[UUID]/trips~", + ~"/v3/motorist/[UUID]/trips~" )") ) ))):splitBy()) @@ -45,8 +45,8 @@ module TP_Mobile_Send2VehicleMGU { ) ) ,entityName.in( - ~"/v2/motorist/[UUID]/trips", - ~"/v3/motorist/[UUID]/trips" + ~"/v2/motorist/[UUID]/trips~", + ~"/v3/motorist/[UUID]/trips~" )") ) ))):splitBy()))" diff --git a/EMEA_PROD/slo/TP_Mobile_VehicleData.tf b/EMEA_PROD/slo/TP_Mobile_VehicleData.tf index a5372a1..cf1d195 100644 --- a/EMEA_PROD/slo/TP_Mobile_VehicleData.tf +++ b/EMEA_PROD/slo/TP_Mobile_VehicleData.tf @@ -51,7 +51,7 @@ module TP_Mobile_VehicleData { ~"GET /v1/vehicle/~" )") ) -))):splitBy())" +))):splitBy()))" EOT #if not set (removed) it's defaulted to "-1d" From f2ecde7ac912416fd7251c7c92a397ebf4f7208a Mon Sep 17 00:00:00 2001 From: rforstner Date: Mon, 4 Apr 2022 18:00:23 +0200 Subject: [PATCH 02/10] adding custom anomalies function --- .../custom_anomalies/TP_Mobile_VehicleData.tf | 9 +++++ EMEA_PROD/custom_anomalies/__main.tf | 38 +++++++++++++++++++ EMEA_PROD/slo/TP_Mobile_DigitalKey.tf | 2 +- EMEA_PROD/slo/TP_Mobile_VehicleData.tf | 5 +++ EMEA_PROD/slo/VDM_-_RSU_-_EMEA_E2E.tf | 2 +- EMEA_PROD/slo/VDM_-_RSU_-_EMEA_PROD.tf | 2 +- ...tte__RSU__-_Reliability_of_key_requests.tf | 3 +- .../dynatrace-service-level-objective.tf | 8 ++++ 8 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf create mode 100644 EMEA_PROD/custom_anomalies/__main.tf diff --git a/EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf b/EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf new file mode 100644 index 0000000..827c901 --- /dev/null +++ b/EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf @@ -0,0 +1,9 @@ +module TP_Mobile_VehicleData { + + source = "../../_dynatrace-base-modules/dynatrace-custom-anomalies" + + + name = "TP_Mobile_VehicleData" + + metric_selector = "${data.terraform_remote_state.slo.outputs.TP_Mobile_VehicleData_metric}" +} \ No newline at end of file diff --git a/EMEA_PROD/custom_anomalies/__main.tf b/EMEA_PROD/custom_anomalies/__main.tf new file mode 100644 index 0000000..57637a3 --- /dev/null +++ b/EMEA_PROD/custom_anomalies/__main.tf @@ -0,0 +1,38 @@ +terraform { + required_providers { + dynatrace = { + version = "1.11.0" + source = "dynatrace-oss/dynatrace" + } + } + + backend "s3" { + bucket = "coco-dynatrace-tfstate" + key = "EMEA_PROD/custom_anomalies/terraform.tfstate" + region = "eu-central-1" + dynamodb_table = "coco-dynatrace-tfstate" + encrypt = true + } + +} + +variable EMEA_PROD_ENV_URL {} +variable EMEA_PROD_API_TOKEN {} + + +provider "dynatrace" { + dt_env_url = "${var.EMEA_PROD_ENV_URL}" + dt_api_token = "${var.EMEA_PROD_API_TOKEN}" + +} + +data "terraform_remote_state" "slo" { + backend = "s3" + config = { + bucket = "coco-dynatrace-tfstate" + key = "EMEA_PROD/slo/terraform.tfstate" + region = "eu-central-1" + encrypt = true + dynamodb_table = "coco-dynatrace-tfstate" + } +} \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf b/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf index a6c0d57..bd0acb4 100644 --- a/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf +++ b/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf @@ -13,7 +13,7 @@ module TP_Mobile_DigitalKey { #metric expression of the calculation as done in data explorer ui metric_expression = <<-EOT (100)* -((1-)(builtin:service.keyRequest.errors.fivexx.count:filter( +((1)-(builtin:service.keyRequest.errors.fivexx.count:filter( and( or( in( diff --git a/EMEA_PROD/slo/TP_Mobile_VehicleData.tf b/EMEA_PROD/slo/TP_Mobile_VehicleData.tf index cf1d195..e4789d5 100644 --- a/EMEA_PROD/slo/TP_Mobile_VehicleData.tf +++ b/EMEA_PROD/slo/TP_Mobile_VehicleData.tf @@ -64,4 +64,9 @@ evaluation = "AGGREGATE" 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 } \ No newline at end of file diff --git a/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_E2E.tf b/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_E2E.tf index 01b2270..9ff4c15 100644 --- a/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_E2E.tf +++ b/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_E2E.tf @@ -10,7 +10,7 @@ module VDM_-_RSU_-_EMEA_E2E { #entity selector object - filter = "type(SERVICE_METHOD), entityId(\"SERVICE_METHOD-813D7B449863A9A0\",\"SERVICE_METHOD-8612BFC9B4209B21\",\"SERVICE_METHOD-D08B1FE048BED1B2\",\"SERVICE_METHOD-6C0299941A0E4C1E\",\"SERVICE_METHOD-D3B134F2B9885DB4\",\"SERVICE_METHOD-2FDB1E822AB158CB\",\"SERVICE_METHOD-BCF86BC6AE79F7B6\",\"SERVICE_METHOD-90A5C9D32DD1BD20\",\"SERVICE_METHOD-37FE8C49B7111F7C\",\"SERVICE_METHOD-1A77D5DCF7CE235E\",\"SERVICE_METHOD-E4E3286247AA8BEB\")" + filter = "type(SERVICE_METHOD), entityId(\"SERVICE_METHOD-838A33198DB71C3D\",\"SERVICE_METHOD-544D9A523951DD9D\",\"SERVICE_METHOD-C7C7E7E30134CC4D\",\"SERVICE_METHOD-F5D48F6F3C9BB5A5\",\"SERVICE_METHOD-8C07F6C47928DCE1\",\"SERVICE_METHOD-EC33958252EFBE2D\",\"SERVICE_METHOD-887AD0E6454A03AD\",\"SERVICE_METHOD-C6618A2B5214ED42\",\"SERVICE_METHOD-0700CD81C580BCFE\",\"SERVICE_METHOD-C2A96AF76A2B3357\",\"SERVICE_METHOD-415422AFEC4E5C30\")" #metric expression of the calculation as done in data explorer ui diff --git a/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_PROD.tf b/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_PROD.tf index cbfa8fe..88611ba 100644 --- a/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_PROD.tf +++ b/EMEA_PROD/slo/VDM_-_RSU_-_EMEA_PROD.tf @@ -10,7 +10,7 @@ module VDM_-_RSU_-_EMEA_PROD { #entity selector object - filter = "type(SERVICE_METHOD), entityId(\"SERVICE_METHOD-9AF7A9302E71A3BE\",\"SERVICE_METHOD-360C23BA44FD151A\",\"SERVICE_METHOD-BC4D2349C378287A\",\"SERVICE_METHOD-DD5CDB7B683E508E\",\"SERVICE_METHOD-A96EF549D37C4AD7\",\"SERVICE_METHOD-BBD8F64F76C87670\",\"SERVICE_METHOD-674F670A27DDAB92\",\"SERVICE_METHOD-892AFAED1C4C45C2\",\"SERVICE_METHOD-BDCD96EFA6AFF21F\",\"SERVICE_METHOD-7B91EB6EF6AAABD0\",\"SERVICE_METHOD-C291996956CD2A5E\")" + filter = "type(SERVICE_METHOD), entityId(\"SERVICE_METHOD-D326B245FDB9D1ED\",\"SERVICE_METHOD-9302D3E7A92ADDFA\",\"SERVICE_METHOD-906DE650C315D350\",\"SERVICE_METHOD-D8A1844CE8071821\",\"SERVICE_METHOD-0DA998BAE52F2411\",\"SERVICE_METHOD-A4E2775F8C482FAA\",\"SERVICE_METHOD-134EDF22BE9DD08C\",\"SERVICE_METHOD-F88AA0117B1EAFE8\",\"SERVICE_METHOD-66102B135997AC0F\",\"SERVICE_METHOD-09E14021A51BFE1E\",\"SERVICE_METHOD-2C35BCA5F6C89C41\")" #metric expression of the calculation as done in data explorer ui diff --git a/EMEA_PROD/slo/Wirkkette__RSU__-_Reliability_of_key_requests.tf b/EMEA_PROD/slo/Wirkkette__RSU__-_Reliability_of_key_requests.tf index 2720fd7..c3a86d9 100644 --- a/EMEA_PROD/slo/Wirkkette__RSU__-_Reliability_of_key_requests.tf +++ b/EMEA_PROD/slo/Wirkkette__RSU__-_Reliability_of_key_requests.tf @@ -10,7 +10,8 @@ module Wirkkette__RSU__-_Reliability_of_key_requests { #entity selector object - filter = "type(SERVICE_METHOD), entityId(\"SERVICE_METHOD-360C23BA44FD151A\",\"SERVICE_METHOD-9AF7A9302E71A3BE\",\"SERVICE_METHOD-BC4D2349C378287A\",\"SERVICE_METHOD-DD5CDB7B683E508E\",\"SERVICE_METHOD-BBD8F64F76C87670\",\"SERVICE_METHOD-674F670A27DDAB92\",\"SERVICE_METHOD-892AFAED1C4C45C2\",\"SERVICE_METHOD-7B91EB6EF6AAABD0\",\"SERVICE_METHOD-C291996956CD2A5E\",\"SERVICE_METHOD-A96EF549D37C4AD7\",\"SERVICE_METHOD-BDCD96EFA6AFF21F\")" + filter = "type(SERVICE_METHOD), entityId(\"SERVICE_METHOD-D326B245FDB9D1ED\",\"SERVICE_METHOD-9302D3E7A92ADDFA\",\"SERVICE_METHOD-906DE650C315D350\",\"SERVICE_METHOD-D8A1844CE8071821\",\"SERVICE_METHOD-0DA998BAE52F2411\",\"SERVICE_METHOD-A4E2775F8C482FAA\",\"SERVICE_METHOD-134EDF22BE9DD08C\",\"SERVICE_METHOD-F88AA0117B1EAFE8\",\"SERVICE_METHOD-66102B135997AC0F\",\"SERVICE_METHOD-09E14021A51BFE1E\",\"SERVICE_METHOD-2C35BCA5F6C89C41\")" + #filter = "type(SERVICE_METHOD), entityId(\"SERVICE_METHOD-360C23BA44FD151A\",\"SERVICE_METHOD-9AF7A9302E71A3BE\",\"SERVICE_METHOD-BC4D2349C378287A\",\"SERVICE_METHOD-DD5CDB7B683E508E\",\"SERVICE_METHOD-BBD8F64F76C87670\",\"SERVICE_METHOD-674F670A27DDAB92\",\"SERVICE_METHOD-892AFAED1C4C45C2\",\"SERVICE_METHOD-7B91EB6EF6AAABD0\",\"SERVICE_METHOD-C291996956CD2A5E\",\"SERVICE_METHOD-A96EF549D37C4AD7\",\"SERVICE_METHOD-BDCD96EFA6AFF21F\")" #metric expression of the calculation as done in data explorer ui diff --git a/_dynatrace-base-modules/dynatrace-service-level-objective/dynatrace-service-level-objective.tf b/_dynatrace-base-modules/dynatrace-service-level-objective/dynatrace-service-level-objective.tf index c8a27b3..f70c2ea 100644 --- a/_dynatrace-base-modules/dynatrace-service-level-objective/dynatrace-service-level-objective.tf +++ b/_dynatrace-base-modules/dynatrace-service-level-objective/dynatrace-service-level-objective.tf @@ -24,3 +24,11 @@ resource dynatrace_slo main { output "id" { value = dynatrace_slo.main.id } + +output "name" { + value = dynatrace_slo.main.name +} + +output "metric_expression" { + value = dynatrace_slo.main.metric_expression +} From 5d57a141989ef6b745bdfb22aae6f2ca86a95b48 Mon Sep 17 00:00:00 2001 From: rforstner Date: Mon, 4 Apr 2022 18:00:51 +0200 Subject: [PATCH 03/10] adding custom anomalies function --- .../dynatrace-custom-anomalies/_interface.tf | 23 ++++++++++++++++ .../dynatrace-custom-anomalies.tf | 26 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 _dynatrace-base-modules/dynatrace-custom-anomalies/_interface.tf create mode 100644 _dynatrace-base-modules/dynatrace-custom-anomalies/dynatrace-custom-anomalies.tf diff --git a/_dynatrace-base-modules/dynatrace-custom-anomalies/_interface.tf b/_dynatrace-base-modules/dynatrace-custom-anomalies/_interface.tf new file mode 100644 index 0000000..2b39ece --- /dev/null +++ b/_dynatrace-base-modules/dynatrace-custom-anomalies/_interface.tf @@ -0,0 +1,23 @@ +# General Variables +variable "name" { default = "" } +variable "description" { default = "The {metricname} value of {severity} was {alert_condition} your custom threshold of {threshold}." } +variable "ownerMail" { default = "" } + +variable "enabled" { default = true } //currently nothing else possible + +#Target and warning percentage of the SLO as integer +variable "severity" { default = "CUSTOM_ALERT" } + +#Metrics to be evaluated, must result in a percentage metric +variable "metric_selector" { default = "" } + +variable "alert_condition" { default = "BELOW" } +variable "alerting_on_missing_data" { default = true } +variable "dealerting_samples" { default = 15 } +variable "samples" { default = 15 } +variable "threshold" { default = 10 } +variable "unit" { default = "UNSPECIFIED" } +variable "violating_samples" { default = 5 } + + + diff --git a/_dynatrace-base-modules/dynatrace-custom-anomalies/dynatrace-custom-anomalies.tf b/_dynatrace-base-modules/dynatrace-custom-anomalies/dynatrace-custom-anomalies.tf new file mode 100644 index 0000000..24c2eab --- /dev/null +++ b/_dynatrace-base-modules/dynatrace-custom-anomalies/dynatrace-custom-anomalies.tf @@ -0,0 +1,26 @@ +terraform { +required_providers { + dynatrace = { + version = "1.11.0" + source = "dynatrace-oss/dynatrace" + } + } +} +resource dynatrace_custom_anomalies main { + name = "${var.name}" + description = "${var.description}" + enabled = "${var.enabled}" + metric_selector = trimspace("${var.metric_selector}") + severity = "${var.severity}" + strategy { + static { + alert_condition = "${var.alert_condition}" + alerting_on_missing_data = "${var.alerting_on_missing_data}" + dealerting_samples = "${var.dealerting_samples}" + samples = "${var.samples}" + threshold = "${var.threshold}" + unit = "${var.unit}" + violating_samples = "${var.violating_samples}" + } + } +} From 061ba4831621e50feb5a1585e53d2ca375635cd0 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 6 Apr 2022 13:38:38 +0200 Subject: [PATCH 04/10] updated SLOs --- .../calculated_service_metrics/main.tf | 26 ------------------- .../custom_anomalies/TP_Mobile_VehicleData.tf | 2 +- EMEA_PROD/slo/TP_Mobile_DigitalKey.tf | 5 +++- EMEA_PROD/slo/TP_Mobile_Login.tf | 5 +++- EMEA_PROD/slo/TP_Mobile_Mapping.tf | 6 ++++- EMEA_PROD/slo/TP_Mobile_PersonalFavorites.tf | 7 ++++- EMEA_PROD/slo/TP_Mobile_Remote360.tf | 6 ++++- EMEA_PROD/slo/TP_Mobile_RemoteServices.tf | 6 ++++- EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf | 6 ++++- EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf | 6 ++++- EMEA_PROD/slo/TP_Mobile_VehicleData.tf | 2 +- EMEA_PROD/slo/TP_Mobile_VehicleList.tf | 6 ++++- ...e_Features_V2_Error_Latency_2000ms_Rate.tf | 2 +- ...le_Features_V2_Error_Latency_500ms_Rate.tf | 2 +- ...le_Features_V2_Error_Latency_700ms_Rate.tf | 2 +- ...vice_-_Vehicle_Features_V2_Success_Rate.tf | 2 +- 16 files changed, 50 insertions(+), 41 deletions(-) delete mode 100644 EMEA_PREPROD/calculated_service_metrics/main.tf diff --git a/EMEA_PREPROD/calculated_service_metrics/main.tf b/EMEA_PREPROD/calculated_service_metrics/main.tf deleted file mode 100644 index b97a7ce..0000000 --- a/EMEA_PREPROD/calculated_service_metrics/main.tf +++ /dev/null @@ -1,26 +0,0 @@ -terraform { - required_providers { - dynatrace = { - version = "1.10.0" - source = "dynatrace-oss/dynatrace" - } - } - - backend "s3" { - bucket = "coco-dynatrace-tfstate" - key = "eupreprod/calculated_service_metrics/terraform.tfstate" - region = "eu-central-1" - dynamodb_table = "coco-dynatrace-tfstate" - encrypt = true - } - -} - -variable EMEA_PREPROD_ENV_URL {} -variable EMEA_PREPROD_API_TOKEN {} - - -provider "dynatrace" { - dt_env_url = "${var.EMEA_PREPROD_ENV_URL}" - dt_api_token = "${var.EMEA_PREPROD_API_TOKEN}" -} \ No newline at end of file diff --git a/EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf b/EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf index 827c901..c1ca3ef 100644 --- a/EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf +++ b/EMEA_PROD/custom_anomalies/TP_Mobile_VehicleData.tf @@ -6,4 +6,4 @@ module TP_Mobile_VehicleData { name = "TP_Mobile_VehicleData" metric_selector = "${data.terraform_remote_state.slo.outputs.TP_Mobile_VehicleData_metric}" -} \ No newline at end of file +} diff --git a/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf b/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf index bd0acb4..a43c09e 100644 --- a/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf +++ b/EMEA_PROD/slo/TP_Mobile_DigitalKey.tf @@ -56,7 +56,6 @@ module TP_Mobile_DigitalKey { )") ) ))):splitBy())) -" EOT #if not set (removed) it's defaulted to "-1d" @@ -69,4 +68,8 @@ evaluation = "AGGREGATE" 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_DigitalKey_metric" { + value = module.TP_Mobile_DigitalKey.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_Login.tf b/EMEA_PROD/slo/TP_Mobile_Login.tf index f7a9419..7a0bb0f 100644 --- a/EMEA_PROD/slo/TP_Mobile_Login.tf +++ b/EMEA_PROD/slo/TP_Mobile_Login.tf @@ -54,7 +54,6 @@ module TP_Mobile_Login { )") ) ))):splitBy())) -" EOT #if not set (removed) it's defaulted to "-1d" @@ -67,4 +66,8 @@ evaluation = "AGGREGATE" 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_Login_metric" { + value = module.TP_Mobile_Login.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_Mapping.tf b/EMEA_PROD/slo/TP_Mobile_Mapping.tf index df7b039..bde999b 100644 --- a/EMEA_PROD/slo/TP_Mobile_Mapping.tf +++ b/EMEA_PROD/slo/TP_Mobile_Mapping.tf @@ -59,7 +59,7 @@ module TP_Mobile_Mapping { ~"DELETE /api/v1/vehicles/~" )") ) -))):splitBy()))" +))):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" @@ -72,4 +72,8 @@ evaluation = "AGGREGATE" 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 } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_PersonalFavorites.tf b/EMEA_PROD/slo/TP_Mobile_PersonalFavorites.tf index 0775c21..fbf3cb8 100644 --- a/EMEA_PROD/slo/TP_Mobile_PersonalFavorites.tf +++ b/EMEA_PROD/slo/TP_Mobile_PersonalFavorites.tf @@ -63,7 +63,7 @@ module TP_Mobile_PersonalFavorites { ~"PUT /api/v2/favorites/homework/2~" )") ) -))):splitBy()))" +))):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" @@ -76,4 +76,9 @@ evaluation = "AGGREGATE" 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_PersonalFavorites_metric" { + value = module.TP_Mobile_PersonalFavorites.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_Remote360.tf b/EMEA_PROD/slo/TP_Mobile_Remote360.tf index e8ab5d5..3cdda12 100644 --- a/EMEA_PROD/slo/TP_Mobile_Remote360.tf +++ b/EMEA_PROD/slo/TP_Mobile_Remote360.tf @@ -61,7 +61,7 @@ module TP_Mobile_Remote360 { ~"GET /recordings/vehicle/$vin~" )") ) -))):splitBy()))" +))):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" @@ -74,4 +74,8 @@ evaluation = "AGGREGATE" 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_Remote360_metric" { + value = module.TP_Mobile_Remote360.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_RemoteServices.tf b/EMEA_PROD/slo/TP_Mobile_RemoteServices.tf index 67ee88f..09f1fe6 100644 --- a/EMEA_PROD/slo/TP_Mobile_RemoteServices.tf +++ b/EMEA_PROD/slo/TP_Mobile_RemoteServices.tf @@ -65,7 +65,7 @@ module TP_Mobile_RemoteServices { ~"GET /api/v2/presentation/remote-commands/eventStatus~" )") ) -))):splitBy()))" +))):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" @@ -78,4 +78,8 @@ evaluation = "AGGREGATE" 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_RemoteServices_metric" { + value = module.TP_Mobile_RemoteServices.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf b/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf index 65ffaad..a5219f9 100644 --- a/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf +++ b/EMEA_PROD/slo/TP_Mobile_Send2VehicleLegacy.tf @@ -38,7 +38,7 @@ module TP_Mobile_Send2VehicleLegacy { ") ) ) -)):splitBy()))" +)):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" @@ -51,4 +51,8 @@ evaluation = "AGGREGATE" 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_Send2VehicleLegacy_metric" { + value = module.TP_Mobile_Send2VehicleLegacy.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf b/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf index 6efdd25..ffa243d 100644 --- a/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf +++ b/EMEA_PROD/slo/TP_Mobile_Send2VehicleMGU.tf @@ -49,7 +49,7 @@ module TP_Mobile_Send2VehicleMGU { ~"/v3/motorist/[UUID]/trips~" )") ) -))):splitBy()))" +))):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" @@ -62,4 +62,8 @@ evaluation = "AGGREGATE" 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_Send2VehicleMGU_metric" { + value = module.TP_Mobile_Send2VehicleMGU.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/TP_Mobile_VehicleData.tf b/EMEA_PROD/slo/TP_Mobile_VehicleData.tf index e4789d5..17335a5 100644 --- a/EMEA_PROD/slo/TP_Mobile_VehicleData.tf +++ b/EMEA_PROD/slo/TP_Mobile_VehicleData.tf @@ -51,7 +51,7 @@ module TP_Mobile_VehicleData { ~"GET /v1/vehicle/~" )") ) -))):splitBy()))" +))):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" diff --git a/EMEA_PROD/slo/TP_Mobile_VehicleList.tf b/EMEA_PROD/slo/TP_Mobile_VehicleList.tf index f2578cd..a960632 100644 --- a/EMEA_PROD/slo/TP_Mobile_VehicleList.tf +++ b/EMEA_PROD/slo/TP_Mobile_VehicleList.tf @@ -45,7 +45,7 @@ module TP_Mobile_VehicleList { ~"GET /api/v1/vehicles~" )") ) -))):splitBy()))" +))):splitBy())) EOT #if not set (removed) it's defaulted to "-1d" @@ -58,4 +58,8 @@ evaluation = "AGGREGATE" 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_VehicleList_metric" { + value = module.TP_Mobile_VehicleList.metric_expression } \ No newline at end of file diff --git a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_2000ms_Rate.tf b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_2000ms_Rate.tf index 4c46d4d..d41b969 100644 --- a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_2000ms_Rate.tf +++ b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_2000ms_Rate.tf @@ -10,7 +10,7 @@ module VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_2000ms_Rate { #entity selector object - filter = "type(\"SERVICE_METHOD\")" + filter = "" #metric expression of the calculation as done in data explorer ui diff --git a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_500ms_Rate.tf b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_500ms_Rate.tf index 101b29c..4155822 100644 --- a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_500ms_Rate.tf +++ b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_500ms_Rate.tf @@ -10,7 +10,7 @@ module VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_500ms_Rate { #entity selector object - filter = "type(\"SERVICE_METHOD\")" + filter = "" #metric expression of the calculation as done in data explorer ui diff --git a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_700ms_Rate.tf b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_700ms_Rate.tf index 1e1e697..edef860 100644 --- a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_700ms_Rate.tf +++ b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_700ms_Rate.tf @@ -10,7 +10,7 @@ module VehicleFeaturesService_-_Vehicle_Features_V2_Error_Latency_700ms_Rate { #entity selector object - filter = "type(\"SERVICE_METHOD\")" + filter = "" #metric expression of the calculation as done in data explorer ui diff --git a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Success_Rate.tf b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Success_Rate.tf index 3eaa01b..38d33fe 100644 --- a/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Success_Rate.tf +++ b/EMEA_PROD/slo/VehicleFeaturesService_-_Vehicle_Features_V2_Success_Rate.tf @@ -10,7 +10,7 @@ module VehicleFeaturesService_-_Vehicle_Features_V2_Success_Rate { #entity selector object - filter = "type(\"SERVICE_METHOD\")" + filter = "" #metric expression of the calculation as done in data explorer ui From ee7191e1575cd31bb7fb266fbcb1834b922549ef Mon Sep 17 00:00:00 2001 From: Abadel Mohammed Date: Thu, 7 Apr 2022 16:16:20 +0200 Subject: [PATCH 05/10] modified DigitalKey Slo since service TrackApi was newly created --- ...ette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf b/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf index b105489..ee2c121 100644 --- a/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf +++ b/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf @@ -14,8 +14,8 @@ module Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests { #metric expression of the calculation as done in data explorer ui - metric_expression = "(100)*((1)-(builtin:service.keyRequest.errors.fivexx.count:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-9A8FBF8D27F9D30D~\",~\"SERVICE_METHOD-6F6D2E5C26B28D4D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10))/(builtin:service.keyRequest.count.server:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-9A8FBF8D27F9D30D~\",~\"SERVICE_METHOD-6F6D2E5C26B28D4D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10)))" - + metric_expression = "(100)*((1)-(builtin:service.keyRequest.errors.fivexx.count:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-EA852E5283881C68~\,"~\"SERVICE_METHOD-6FA84708A746BE9D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10))/(builtin:service.keyRequest.count.server:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-EA852E5283881C68~\",~\"SERVICE_METHOD-6FA84708A746BE9D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10)))" + #if not set (removed) it's defaulted to "-1d" timeframe = "-1d" From 41943afdadc0fe810371997dfc1bc7c7eb4a18d6 Mon Sep 17 00:00:00 2001 From: Mohammed Abadel Date: Thu, 7 Apr 2022 16:38:11 +0200 Subject: [PATCH 06/10] modified DigitalKey Slo since service TrackApi was newly created. 2nd attempt --- ...kkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf b/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf index ee2c121..faac135 100644 --- a/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf +++ b/EMEA_PROD/slo/Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests.tf @@ -14,7 +14,7 @@ module Wirkkette__DigitalKey__SMACC___-_Reliability_of_key_requests { #metric expression of the calculation as done in data explorer ui - metric_expression = "(100)*((1)-(builtin:service.keyRequest.errors.fivexx.count:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-EA852E5283881C68~\,"~\"SERVICE_METHOD-6FA84708A746BE9D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10))/(builtin:service.keyRequest.count.server:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-EA852E5283881C68~\",~\"SERVICE_METHOD-6FA84708A746BE9D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10)))" + metric_expression = "(100)*((1)-(builtin:service.keyRequest.errors.fivexx.count:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-EA852E5283881C68~\",~\"SERVICE_METHOD-6FA84708A746BE9D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10))/(builtin:service.keyRequest.count.server:filter(and(in(\"dt.entity.service_method\",entitySelector(\"type(service_method),entityId(~\"SERVICE_METHOD-EA852E5283881C68~\",~\"SERVICE_METHOD-6FA84708A746BE9D~\",~\"SERVICE_METHOD-C5331A994ED8A635~\",~\"SERVICE_METHOD-EFCBA1A015A4AD29~\")\")))):splitBy():avg:auto:sort(value(avg,descending)):limit(10)))" #if not set (removed) it's defaulted to "-1d" From 741bcb4844b162f4ede59725d614a55d6ab89ac0 Mon Sep 17 00:00:00 2001 From: rforstner Date: Thu, 7 Apr 2022 17:00:43 +0200 Subject: [PATCH 07/10] updated slo --- .../slo/VehicleService_-_Vehicle_State_Latency_1500ms_Rate.tf | 2 +- .../slo/VehicleService_-_Vehicle_State_Latency_3000ms_Rate.tf | 2 +- .../slo/VehicleService_-_Vehicle_State_Latency_500ms_Rate.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_1500ms_Rate.tf b/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_1500ms_Rate.tf index 799d527..5ddfcac 100644 --- a/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_1500ms_Rate.tf +++ b/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_1500ms_Rate.tf @@ -10,7 +10,7 @@ module VehicleService_-_Vehicle_State_Latency_1500ms_Rate { #entity selector object - filter = "type(\"SERVICE_METHOD\")" + filter = "" #metric expression of the calculation as done in data explorer ui diff --git a/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_3000ms_Rate.tf b/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_3000ms_Rate.tf index d5fc1b8..482eaa8 100644 --- a/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_3000ms_Rate.tf +++ b/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_3000ms_Rate.tf @@ -10,7 +10,7 @@ module VehicleService_-_Vehicle_State_Latency_3000ms_Rate { #entity selector object - filter = "type(\"SERVICE_METHOD\")" + filter = "" #metric expression of the calculation as done in data explorer ui diff --git a/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_500ms_Rate.tf b/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_500ms_Rate.tf index 7873238..a13d9e1 100644 --- a/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_500ms_Rate.tf +++ b/EMEA_PROD/slo/VehicleService_-_Vehicle_State_Latency_500ms_Rate.tf @@ -10,7 +10,7 @@ module VehicleService_-_Vehicle_State_Latency_500ms_Rate { #entity selector object - filter = "type(\"SERVICE_METHOD\")" + filter = "" #metric expression of the calculation as done in data explorer ui From 1ebff3ade4dee5f0ff730f9e385dbae054b7dc81 Mon Sep 17 00:00:00 2001 From: "SLW\\ARNAUA" Date: Fri, 8 Apr 2022 10:47:54 +0200 Subject: [PATCH 08/10] Creating SLO for OPMAAS-1459 --- .../ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf diff --git a/EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf b/EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf new file mode 100644 index 0000000..dc16df2 --- /dev/null +++ b/EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf @@ -0,0 +1,33 @@ +module ICES_-_FestiveModeAPI_-_EMEA_-_PROD { + + source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" + + + name = "ICES - AmbientMusicAPI - EMEA - PROD" + + description = "AmbientMusicAPI_Draft" + + + + #entity selector object + filter = "type(\"SERVICE\"),entityName(\"AmbientMusicApiImpl\"),tag(\"Environment:PROD\")" + + + #metric expression of the calculation as done in data explorer ui + metric_expression = "(100)*((1)-( builtin:service.errors.fivexx.rate:splitBy():avg:auto:sort(value(avg,descending)):limit(10))/( builtin:service.requestCount.total:splitBy():sum:auto:sort(value(sum,descending)):limit(10)))" + + + #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 From 325f7d503aa401f1de30a0f70927c12c7828a687 Mon Sep 17 00:00:00 2001 From: Mohammed Abadel Date: Fri, 8 Apr 2022 11:10:16 +0200 Subject: [PATCH 09/10] update AmbientMusicAPI --- EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf b/EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf index dc16df2..adb636d 100644 --- a/EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf +++ b/EMEA_PROD/slo/ICES_-_AmbientMusicAPI_-_EMEA_-_PROD.tf @@ -1,4 +1,4 @@ -module ICES_-_FestiveModeAPI_-_EMEA_-_PROD { +module ICES_-_AmbientMusicAPI_-_EMEA_-_PROD { source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" From a1e6be638005316f37466a7a368ecd49397db13e Mon Sep 17 00:00:00 2001 From: Mohammed Abadel Date: Mon, 11 Apr 2022 17:39:00 +0200 Subject: [PATCH 10/10] change describtion fields of some SLOs --- .../Wirkkette__News_Next__-_Reliability_of_key_requests.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EMEA_PROD/slo/Wirkkette__News_Next__-_Reliability_of_key_requests.tf b/EMEA_PROD/slo/Wirkkette__News_Next__-_Reliability_of_key_requests.tf index 27be62a..f8ccfff 100644 --- a/EMEA_PROD/slo/Wirkkette__News_Next__-_Reliability_of_key_requests.tf +++ b/EMEA_PROD/slo/Wirkkette__News_Next__-_Reliability_of_key_requests.tf @@ -1,9 +1,9 @@ -module Wirkkette__News_Next__-_Reliability_of_key_requests { +module Wirkkette__Podcast__Service__-_Reliability_of_key_requests { source = "../../_dynatrace-base-modules/dynatrace-service-level-objective" - name = "Wirkkette \"News Next\" - Reliability of key requests" + name = "Wirkkette \"Podcast Service\" - Reliability of key requests" description = "CoCo-QM-Report_Vehicle"