From a4877fe2efd08582a7f6acb7bfcfaa3d8c4e8ec3 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:45:48 +0100 Subject: [PATCH 1/6] "Migrating from Monaco to Terraform for management zone: CD_b2v-com-fe" --- CN_PREPROD/alerting/cd_b2v-com-fe_int.tf | 38 +++ CN_PREPROD/dashboard/cd_b2v-com-fe_int.tf | 294 ++++++++++++++++++++ CN_PREPROD/dashboard/cd_b2v-com-fe_test.tf | 294 ++++++++++++++++++++ CN_PREPROD/management_zone/cd_b2v-com-fe.tf | 95 +++++++ 4 files changed, 721 insertions(+) create mode 100644 CN_PREPROD/alerting/cd_b2v-com-fe_int.tf create mode 100644 CN_PREPROD/dashboard/cd_b2v-com-fe_int.tf create mode 100644 CN_PREPROD/dashboard/cd_b2v-com-fe_test.tf create mode 100644 CN_PREPROD/management_zone/cd_b2v-com-fe.tf diff --git a/CN_PREPROD/alerting/cd_b2v-com-fe_int.tf b/CN_PREPROD/alerting/cd_b2v-com-fe_int.tf new file mode 100644 index 00000000..0a9ed091 --- /dev/null +++ b/CN_PREPROD/alerting/cd_b2v-com-fe_int.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_b2v-com-fe_INT.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQwMzJhYzczNC03MTQ1LTQwYWMtYTQxNC04NWY2MDc4MDYwN2W-71TeFdrerQ +data "dynatrace_management_zone" "CD_b2v-com-fe_INT"{ name="CD_b2v-com-fe" } +resource "dynatrace_alerting" "CD_b2v-com-fe_INT" { + name = "CD_b2v-com-fe INT" + management_zone = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Component:b2v-com-fe", "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Component:b2v-com-fe", "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Component:b2v-com-fe", "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Component:b2v-com-fe", "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } +} \ No newline at end of file diff --git a/CN_PREPROD/dashboard/cd_b2v-com-fe_int.tf b/CN_PREPROD/dashboard/cd_b2v-com-fe_int.tf new file mode 100644 index 00000000..d034687d --- /dev/null +++ b/CN_PREPROD/dashboard/cd_b2v-com-fe_int.tf @@ -0,0 +1,294 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_INT.id = c0a3c189-d5d6-4594-a6d3-b07a4f17119a +data "dynatrace_management_zone" "CD_b2v-com-fe_INT"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_INT" { + dashboard_metadata { + name = "CD_b2v-com-fe INT" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/CN_PREPROD/dashboard/cd_b2v-com-fe_test.tf b/CN_PREPROD/dashboard/cd_b2v-com-fe_test.tf new file mode 100644 index 00000000..eb946d23 --- /dev/null +++ b/CN_PREPROD/dashboard/cd_b2v-com-fe_test.tf @@ -0,0 +1,294 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_TEST.id = 10338c16-6156-4849-ae20-e35fce6e64cd +data "dynatrace_management_zone" "CD_b2v-com-fe_TEST"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_TEST" { + dashboard_metadata { + name = "CD_b2v-com-fe TEST" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/CN_PREPROD/management_zone/cd_b2v-com-fe.tf b/CN_PREPROD/management_zone/cd_b2v-com-fe.tf new file mode 100644 index 00000000..9f452270 --- /dev/null +++ b/CN_PREPROD/management_zone/cd_b2v-com-fe.tf @@ -0,0 +1,95 @@ +# DEFINE dynatrace_management_zone.CD_b2v-com-fe.id = 7493442234687447507 +resource "dynatrace_management_zone" "CD_b2v-com-fe" { + name = "CD_b2v-com-fe" + rules { + type = "CLOUD_APPLICATION" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "CLOUD_APPLICATION_NAMESPACE" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAMESPACE_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "PROCESS_GROUP" + enabled = true + propagation_types = [ "PROCESS_GROUP_TO_HOST" ] + conditions { + key { + type = "STATIC" + attribute = "PROCESS_GROUP_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "SERVICE" + enabled = true + propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ] + conditions { + key { + type = "STATIC" + attribute = "SERVICE_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } +} From e0a5045728f7ef35a2967ecef8830b3f7890acfd Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:51:24 +0100 Subject: [PATCH 2/6] "Migrating from Monaco to Terraform for management zone: CD_b2v-com-fe" --- CN_PROD/alerting/cd_b2v-com-fe_prod.tf | 38 +++ CN_PROD/dashboard/cd_b2v-com-fe_cn_e2e.tf | 326 +++++++++++++++++++++ CN_PROD/dashboard/cd_b2v-com-fe_cn_prod.tf | 326 +++++++++++++++++++++ CN_PROD/dashboard/cd_b2v-com-fe_e2e.tf | 294 +++++++++++++++++++ CN_PROD/dashboard/cd_b2v-com-fe_prod.tf | 294 +++++++++++++++++++ CN_PROD/management_zone/cd_b2v-com-fe.tf | 95 ++++++ 6 files changed, 1373 insertions(+) create mode 100644 CN_PROD/alerting/cd_b2v-com-fe_prod.tf create mode 100644 CN_PROD/dashboard/cd_b2v-com-fe_cn_e2e.tf create mode 100644 CN_PROD/dashboard/cd_b2v-com-fe_cn_prod.tf create mode 100644 CN_PROD/dashboard/cd_b2v-com-fe_e2e.tf create mode 100644 CN_PROD/dashboard/cd_b2v-com-fe_prod.tf create mode 100644 CN_PROD/management_zone/cd_b2v-com-fe.tf diff --git a/CN_PROD/alerting/cd_b2v-com-fe_prod.tf b/CN_PROD/alerting/cd_b2v-com-fe_prod.tf new file mode 100644 index 00000000..503087f9 --- /dev/null +++ b/CN_PROD/alerting/cd_b2v-com-fe_prod.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_b2v-com-fe_PROD.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQ0MWVkNTgyOC0xMzdlLTQ1MDQtOWI5My1iYzI3MDJiNmY3YTS-71TeFdrerQ +data "dynatrace_management_zone" "CD_b2v-com-fe_PROD"{ name="CD_b2v-com-fe" } +resource "dynatrace_alerting" "CD_b2v-com-fe_PROD" { + name = "CD_b2v-com-fe PROD" + management_zone = data.dynatrace_management_zone.CD_b2v-com-fe_PROD.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } +} \ No newline at end of file diff --git a/CN_PROD/dashboard/cd_b2v-com-fe_cn_e2e.tf b/CN_PROD/dashboard/cd_b2v-com-fe_cn_e2e.tf new file mode 100644 index 00000000..e53138bf --- /dev/null +++ b/CN_PROD/dashboard/cd_b2v-com-fe_cn_e2e.tf @@ -0,0 +1,326 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_CN_E2E.id = a087c6ec-1cb3-41a6-9901-66bf3e35a7e4 +data "dynatrace_management_zone" "CD_b2v-com-fe_CN_E2E"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_CN_E2E" { + dashboard_metadata { + name = "CD_b2v-com-fe CN E2E" + owner = "sebastian.sedziejowski@partner.bmwgroup.com" + # preset = false + shared = true + tags = [ "E2E", "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_CN_E2E.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + [Total requests per Application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=cd2cb2d3-67da-4598-8bb4-7a48bc0ce3bc) + + [Average response time per application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=c00d5c3e-3013-48f4-958d-2753cfdddd59) + + [Successful requests per application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=9bef7be0-9924-4276-868f-06aa3004394c) + + [Failed requests per application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=3803db02-b997-429a-9414-5ec70cf913de) + EOT + tile_type = "MARKDOWN" + bounds { + height = 190 + left = 38 + top = 912 + width = 418 + } + } +} +# DEFINE dynatrace_dashboard_sharing.CD_b2v-com-fe_CN_E2E.id = a087c6ec-1cb3-41a6-9901-66bf3e35a7e4 +resource "dynatrace_dashboard_sharing" "CD_b2v-com-fe_CN_E2E" { + enabled = true + dashboard_id = dynatrace_dashboard.CD_b2v-com-fe_CN_E2E.id + # preset = false + permissions { + permission { + type = "ALL" + level = "VIEW" + } + } +} \ No newline at end of file diff --git a/CN_PROD/dashboard/cd_b2v-com-fe_cn_prod.tf b/CN_PROD/dashboard/cd_b2v-com-fe_cn_prod.tf new file mode 100644 index 00000000..201b6476 --- /dev/null +++ b/CN_PROD/dashboard/cd_b2v-com-fe_cn_prod.tf @@ -0,0 +1,326 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_CN_PROD.id = 6388806c-f7ba-47c9-948d-1bb98090f0c3 +data "dynatrace_management_zone" "CD_b2v-com-fe_CN_PROD"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_CN_PROD" { + dashboard_metadata { + name = "CD_b2v-com-fe CN PROD" + owner = "sebastian.sedziejowski@partner.bmwgroup.com" + # preset = false + shared = true + tags = [ "PROD", "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-be", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_CN_PROD.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-be", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Environment:b2v-com-fe", "Component:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:b2v-com-fe", "Component:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Environment:b2v-com-fe", "Component:PROD" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + [Total requests per Application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=25a8b8a3-b8cf-4065-8ffa-a89eee172030) + + [Average response time per application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=e560d42c-a0f5-4a5e-b1c9-d90420a259f6) + + [Successful requests per application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=6f8b03f9-16a4-47c0-8867-13d07c5189b8) + + [Failed requests per application](https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=all&mdaId=94d693d3-3deb-4aca-af6e-8abebe8f6b8b) + EOT + tile_type = "MARKDOWN" + bounds { + height = 228 + left = 38 + top = 912 + width = 380 + } + } +} +# DEFINE dynatrace_dashboard_sharing.CD_b2v-com-fe_CN_PROD.id = 6388806c-f7ba-47c9-948d-1bb98090f0c3 +resource "dynatrace_dashboard_sharing" "CD_b2v-com-fe_CN_PROD" { + enabled = true + dashboard_id = dynatrace_dashboard.CD_b2v-com-fe_CN_PROD.id + # preset = false + permissions { + permission { + type = "ALL" + level = "VIEW" + } + } +} \ No newline at end of file diff --git a/CN_PROD/dashboard/cd_b2v-com-fe_e2e.tf b/CN_PROD/dashboard/cd_b2v-com-fe_e2e.tf new file mode 100644 index 00000000..0d213809 --- /dev/null +++ b/CN_PROD/dashboard/cd_b2v-com-fe_e2e.tf @@ -0,0 +1,294 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_E2E.id = f8754254-c0a6-4682-8c23-2cb267227f09 +data "dynatrace_management_zone" "CD_b2v-com-fe_E2E"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_E2E" { + dashboard_metadata { + name = "CD_b2v-com-fe E2E" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_E2E.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/CN_PROD/dashboard/cd_b2v-com-fe_prod.tf b/CN_PROD/dashboard/cd_b2v-com-fe_prod.tf new file mode 100644 index 00000000..151e9c55 --- /dev/null +++ b/CN_PROD/dashboard/cd_b2v-com-fe_prod.tf @@ -0,0 +1,294 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_PROD.id = d11fd3d0-d336-49ed-9d07-c5ba645f49e8 +data "dynatrace_management_zone" "CD_b2v-com-fe_PROD"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_PROD" { + dashboard_metadata { + name = "CD_b2v-com-fe PROD" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_PROD.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/CN_PROD/management_zone/cd_b2v-com-fe.tf b/CN_PROD/management_zone/cd_b2v-com-fe.tf new file mode 100644 index 00000000..d5c1f521 --- /dev/null +++ b/CN_PROD/management_zone/cd_b2v-com-fe.tf @@ -0,0 +1,95 @@ +# DEFINE dynatrace_management_zone.CD_b2v-com-fe.id = -8998806064540088441 +resource "dynatrace_management_zone" "CD_b2v-com-fe" { + name = "CD_b2v-com-fe" + rules { + type = "CLOUD_APPLICATION" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "CLOUD_APPLICATION_NAMESPACE" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAMESPACE_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "PROCESS_GROUP" + enabled = true + propagation_types = [ "PROCESS_GROUP_TO_HOST" ] + conditions { + key { + type = "STATIC" + attribute = "PROCESS_GROUP_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "SERVICE" + enabled = true + propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ] + conditions { + key { + type = "STATIC" + attribute = "SERVICE_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } +} From dcd2600f10f63b1970d3532ea45d56c75ce904a9 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:56:19 +0100 Subject: [PATCH 3/6] "Migrating from Monaco to Terraform for management zone: CD_b2v-com-fe" --- EMEA_PREPROD/dashboard/cd_b2v-com-fe_int.tf | 357 ++++++++++++++++++ EMEA_PREPROD/dashboard/cd_b2v-com-fe_test.tf | 357 ++++++++++++++++++ EMEA_PREPROD/management_zone/cd_b2v-com-fe.tf | 143 +++++++ 3 files changed, 857 insertions(+) create mode 100644 EMEA_PREPROD/dashboard/cd_b2v-com-fe_int.tf create mode 100644 EMEA_PREPROD/dashboard/cd_b2v-com-fe_test.tf create mode 100644 EMEA_PREPROD/management_zone/cd_b2v-com-fe.tf diff --git a/EMEA_PREPROD/dashboard/cd_b2v-com-fe_int.tf b/EMEA_PREPROD/dashboard/cd_b2v-com-fe_int.tf new file mode 100644 index 00000000..83c9196b --- /dev/null +++ b/EMEA_PREPROD/dashboard/cd_b2v-com-fe_int.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_INT.id = 19901464-0b15-4cf4-acaa-3c1e9000a458 +data "dynatrace_management_zone" "CD_b2v-com-fe_INT"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_INT" { + dashboard_metadata { + name = "CD_b2v-com-fe INT" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:INT" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:INT" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Environment:INT" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:INT" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Environment:INT" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/EMEA_PREPROD/dashboard/cd_b2v-com-fe_test.tf b/EMEA_PREPROD/dashboard/cd_b2v-com-fe_test.tf new file mode 100644 index 00000000..e1d7425d --- /dev/null +++ b/EMEA_PREPROD/dashboard/cd_b2v-com-fe_test.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_TEST.id = 543fa1a1-61f8-40d3-925b-20e4004cab9c +data "dynatrace_management_zone" "CD_b2v-com-fe_TEST"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_TEST" { + dashboard_metadata { + name = "CD_b2v-com-fe TEST" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:TEST" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:TEST" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Environment:TEST" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:TEST" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Environment:TEST" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/EMEA_PREPROD/management_zone/cd_b2v-com-fe.tf b/EMEA_PREPROD/management_zone/cd_b2v-com-fe.tf new file mode 100644 index 00000000..cd7af7a6 --- /dev/null +++ b/EMEA_PREPROD/management_zone/cd_b2v-com-fe.tf @@ -0,0 +1,143 @@ +# DEFINE dynatrace_management_zone.CD_b2v-com-fe.id = -8332545706995115388 +resource "dynatrace_management_zone" "CD_b2v-com-fe" { + name = "CD_b2v-com-fe" + entity_selector_based_rule { + # enabled = false + selector = "type(PROCESS_GROUP_INSTANCE),tag('msid:B2V-COM-FE')" + } + entity_selector_based_rule { + enabled = true + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"ms-id:B2V-COM-FE\"))" + } + entity_selector_based_rule { + # enabled = false + selector = "type(PROCESS_GROUP_INSTANCE),tag('ms-id:B2V-COM-FE')" + } + entity_selector_based_rule { + # enabled = false + selector = "type(HOST),tag('ms-id:B2V-COM-FE')" + } + entity_selector_based_rule { + enabled = true + selector = "type(PROCESS_GROUP_INSTANCE),tag(\"ms-id:B2V-COM-FE\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(HOST),tag(\"ms-id:B2V-COM-FE\")" + } + entity_selector_based_rule { + # enabled = false + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag('msid:B2V-COM-FE'))" + } + entity_selector_based_rule { + enabled = true + selector = "type(Service),tag(\"ms-id:B2V-COM-FE\")" + } + entity_selector_based_rule { + # enabled = false + selector = "type(HOST),tag('msid:B2V-COM-FE')" + } + entity_selector_based_rule { + # enabled = false + selector = "type(Service),tag('msid:B2V-COM-FE')" + } + entity_selector_based_rule { + # enabled = false + selector = "type(Service),tag('ms-id:B2V-COM-FE')" + } + entity_selector_based_rule { + # enabled = false + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag('ms-id:B2V-COM-FE'))" + } + rules { + type = "CLOUD_APPLICATION" + # enabled = false + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "CLOUD_APPLICATION_NAMESPACE" + # enabled = false + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAMESPACE_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "HOST" + # enabled = false + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "PROCESS_GROUP" + # enabled = false + propagation_types = [ "PROCESS_GROUP_TO_HOST" ] + conditions { + key { + type = "STATIC" + attribute = "PROCESS_GROUP_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "SERVICE" + # enabled = false + propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ] + conditions { + key { + type = "STATIC" + attribute = "SERVICE_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } +} From 5cec2768ebd3392cfbd5af5cbbe263dcb42daa12 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:59:09 +0100 Subject: [PATCH 4/6] "Migrating from Monaco to Terraform for management zone: CD_b2v-com-fe" --- EMEA_PROD/dashboard/cd_b2v-com-fe_e2e.tf | 324 ++++++++++ ..._b2v-com-fe_emea_e2e_orp_deprecated_crp.tf | 576 +++++++++++++++++ .../dashboard/cd_b2v-com-fe_emea_prod.tf | 592 ++++++++++++++++++ EMEA_PROD/dashboard/cd_b2v-com-fe_prod.tf | 324 ++++++++++ EMEA_PROD/management_zone/cd_b2v-com-fe.tf | 95 +++ 5 files changed, 1911 insertions(+) create mode 100644 EMEA_PROD/dashboard/cd_b2v-com-fe_e2e.tf create mode 100644 EMEA_PROD/dashboard/cd_b2v-com-fe_emea_e2e_orp_deprecated_crp.tf create mode 100644 EMEA_PROD/dashboard/cd_b2v-com-fe_emea_prod.tf create mode 100644 EMEA_PROD/dashboard/cd_b2v-com-fe_prod.tf create mode 100644 EMEA_PROD/management_zone/cd_b2v-com-fe.tf diff --git a/EMEA_PROD/dashboard/cd_b2v-com-fe_e2e.tf b/EMEA_PROD/dashboard/cd_b2v-com-fe_e2e.tf new file mode 100644 index 00000000..7926f05f --- /dev/null +++ b/EMEA_PROD/dashboard/cd_b2v-com-fe_e2e.tf @@ -0,0 +1,324 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_E2E.id = 2ae61ee5-4aa8-4129-b260-6147dc4f01a5 +data "dynatrace_management_zone" "CD_b2v-com-fe_E2E"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_E2E" { + dashboard_metadata { + name = "CD_b2v-com-fe E2E" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + unknowns = jsonencode({ + "popularity": 1 + }) + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_E2E.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/EMEA_PROD/dashboard/cd_b2v-com-fe_emea_e2e_orp_deprecated_crp.tf b/EMEA_PROD/dashboard/cd_b2v-com-fe_emea_e2e_orp_deprecated_crp.tf new file mode 100644 index 00000000..850eaeb8 --- /dev/null +++ b/EMEA_PROD/dashboard/cd_b2v-com-fe_emea_e2e_orp_deprecated_crp.tf @@ -0,0 +1,576 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp.id = d30335ad-d58e-4eec-b696-b3d6d73b08f8 +data "dynatrace_management_zone" "CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp" { + dashboard_metadata { + name = "CD_b2v-com-fe EMEA E2E(deprecated)" + owner = "Sebastian.Sedziejowski@partner.bmwgroup.com" + # preset = false + shared = true + tags = [ "E2E", "b2v-com-fe" ] + unknowns = jsonencode({ + "popularity": 1 + }) + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + [Total requests per Application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=c38a7cff-e5a9-4efc-ae8c-c9cbf53795b7) + + [Average response time per application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=d83cc26c-65ef-4d45-9720-bc78ded1ea5e) + + [Successful requests per application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=87a47590-cce6-4fa4-bff7-6409805137dc) + + [Failed requests per application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=b6ed4e3e-172e-43ef-8dcd-8644f028c891) + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 912 + width = 380 + } + } + tile { + name = "Failure rate (HTTP 4xx/5xx errors)" + configured = true + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + tile_type = "DATA_EXPLORER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false, + "metricExpressions": [ + "resolution=null\u0026(builtin:service.errors.fourxx.rate:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names,(builtin:service.errors.fivexx.rate:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names,(builtin:tech.mongodb.active_clients:filter(and(or(in(\"dt.entity.process_group_instance\",entitySelector(\"type(process_group_instance),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names" + ], + "queries": [ + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [ + { + "criteria": [ + { + "evaluator": "IN", + "value": "b2v-com-fe" + }, + { + "evaluator": "IN", + "value": "Environment:E2E" + } + ], + "filter": "dt.entity.service", + "filterOperator": "OR", + "filterType": "TAG", + "nestedFilters": [] + } + ] + }, + "id": "A", + "metric": "builtin:service.errors.fourxx.rate", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [], + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [ + { + "criteria": [ + { + "evaluator": "IN", + "value": "b2v-com-fe" + }, + { + "evaluator": "IN", + "value": "Environment:E2E" + } + ], + "filter": "dt.entity.service", + "filterOperator": "OR", + "filterType": "TAG", + "nestedFilters": [] + } + ] + }, + "id": "B", + "metric": "builtin:service.errors.fivexx.rate", + "rate": "NONE", + "spaceAggregation": "AVG", + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [ + { + "criteria": [ + { + "evaluator": "IN", + "value": "Component:b2v-com-fe" + } + ], + "filter": "dt.entity.process_group_instance", + "filterOperator": "OR", + "filterType": "TAG", + "nestedFilters": [] + } + ] + }, + "id": "C", + "metric": "builtin:tech.mongodb.active_clients", + "rate": "NONE", + "spaceAggregation": "AVG", + "timeAggregation": "DEFAULT" + } + ], + "visualConfig": { + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT", + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "B:", + "properties": { + "color": "DEFAULT", + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "C:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + } + ], + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "type": "GRAPH_CHART" + } + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp.id + } + } + } + tile { + name = "Response time, Request Count and Number of Errors" + configured = true + custom_name = "Response time, Request Count and Number of Errors" + tile_type = "DATA_EXPLORER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false, + "metricExpressions": [ + "resolution=null\u0026(builtin:service.response.time:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(10)):limit(100):names,(builtin:service.requestCount.total:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)):limit(100):names,(builtin:service.errors.total.count:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)):limit(100):names,(builtin:host.osService.availability:splitBy(\"dt.entity.host\"):avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names,(builtin:host.dns.errorCount:splitBy(\"dt.entity.host\",dnsServerIp,errorType):avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names" + ], + "queries": [ + { + "enabled": true, + "filterBy": { + "criteria": [], + "nestedFilters": [] + }, + "id": "A", + "metricSelector": "builtin:service.response.time:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(10)", + "rate": "NONE", + "spaceAggregation": "AVG", + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "nestedFilters": [] + }, + "id": "B", + "metricSelector": "builtin:service.requestCount.total:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)", + "rate": "NONE", + "spaceAggregation": "AVG", + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "nestedFilters": [] + }, + "id": "C", + "metricSelector": "builtin:service.errors.total.count:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:E2E~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)", + "rate": "NONE", + "spaceAggregation": "AVG", + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [] + }, + "id": "D", + "metric": "builtin:host.osService.availability", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [ + "dt.entity.host" + ], + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [] + }, + "id": "E", + "metric": "builtin:host.dns.errorCount", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [ + "dt.entity.host", + "dnsServerIp", + "errorType" + ], + "timeAggregation": "DEFAULT" + } + ], + "visualConfig": { + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "global": {}, + "rules": [ + { + "matcher": "A", + "properties": { + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "B", + "properties": { + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "C", + "properties": { + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "D", + "properties": { + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "E", + "properties": { + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "A:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "B:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "C:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "D:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "E:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + } + ], + "thresholds": [], + "type": "GRAPH_CHART" + } + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp.id + } + } + } +} +# DEFINE dynatrace_dashboard_sharing.CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp.id = d30335ad-d58e-4eec-b696-b3d6d73b08f8 +resource "dynatrace_dashboard_sharing" "CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp" { + enabled = true + dashboard_id = dynatrace_dashboard.CD_b2v-com-fe_EMEA_E2E_orp_deprecated_crp.id + # preset = false + permissions { + permission { + type = "ALL" + level = "VIEW" + } + permission { + type = "USER" + id = "aakansha.bhardwaj@partner.bmw.de" + level = "VIEW" + } + } +} \ No newline at end of file diff --git a/EMEA_PROD/dashboard/cd_b2v-com-fe_emea_prod.tf b/EMEA_PROD/dashboard/cd_b2v-com-fe_emea_prod.tf new file mode 100644 index 00000000..50313f28 --- /dev/null +++ b/EMEA_PROD/dashboard/cd_b2v-com-fe_emea_prod.tf @@ -0,0 +1,592 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_EMEA_PROD.id = 52ebed85-1d61-475f-aafc-9fe52dc5454b +data "dynatrace_management_zone" "CD_b2v-com-fe_EMEA_PROD"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_EMEA_PROD" { + dashboard_metadata { + name = "CD_b2v-com-fe EMEA PROD" + owner = "Sebastian.Sedziejowski@partner.bmwgroup.com" + # preset = false + shared = true + tags = [ "PROD", "EMEA", "b2v-com-fe" ] + unknowns = jsonencode({ + "popularity": 1 + }) + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_EMEA_PROD.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Response time, Request Count and Number of Errors" + configured = true + custom_name = "Response time, Request Count and Number of Errors" + tile_type = "DATA_EXPLORER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false, + "metricExpressions": [ + "resolution=null\u0026(builtin:service.response.time:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:PROD~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names,(builtin:service.requestCount.total:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:PROD~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)):limit(100):names,(builtin:service.errors.total.count:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:PROD~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)):limit(100):names,(builtin:host.osService.availability:splitBy(\"dt.entity.host\"):avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names,(builtin:host.dns.errorCount:splitBy(\"dt.entity.host\",dnsServerIp,errorType):avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names" + ], + "queries": [ + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [ + { + "criteria": [ + { + "evaluator": "IN", + "value": "Environment:PROD" + }, + { + "evaluator": "IN", + "value": "Component:b2v-com-fe" + } + ], + "filter": "dt.entity.service", + "filterOperator": "OR", + "filterType": "TAG", + "nestedFilters": [] + } + ] + }, + "id": "A", + "metric": "builtin:service.response.time", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [], + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "nestedFilters": [] + }, + "id": "B", + "metricSelector": "builtin:service.requestCount.total:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:PROD~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [], + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "nestedFilters": [] + }, + "id": "C", + "metricSelector": "builtin:service.errors.total.count:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:PROD~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():value:auto:sort(value(sum,descending)):limit(10)", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [], + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [] + }, + "id": "D", + "metric": "builtin:host.osService.availability", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [ + "dt.entity.host" + ], + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [] + }, + "id": "E", + "metric": "builtin:host.dns.errorCount", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [ + "dt.entity.host", + "dnsServerIp", + "errorType" + ], + "timeAggregation": "DEFAULT" + } + ], + "visualConfig": { + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "global": {}, + "rules": [ + { + "matcher": "A", + "properties": { + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "B", + "properties": { + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "C", + "properties": { + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "D", + "properties": { + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "E", + "properties": { + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "A:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "B:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "C:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "D:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + }, + { + "matcher": "E:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + } + ], + "thresholds": [], + "type": "GRAPH_CHART" + } + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_EMEA_PROD.id + } + } + } + tile { + name = "Failure rate (HTTP 4xx/5xx errors)" + configured = true + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + tile_type = "DATA_EXPLORER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false, + "metricExpressions": [ + "resolution=null\u0026(builtin:service.errors.fourxx.rate:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:PROD~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names,(builtin:service.errors.fivexx.rate:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Environment:PROD~\")\")),in(\"dt.entity.service\",entitySelector(\"type(service),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names,(builtin:tech.mongodb.active_clients:filter(and(or(in(\"dt.entity.process_group_instance\",entitySelector(\"type(process_group_instance),tag(~\"Component:b2v-com-fe~\")\"))))):splitBy():avg:auto:sort(value(avg,descending)):limit(20)):limit(100):names" + ], + "queries": [ + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [ + { + "criteria": [ + { + "evaluator": "IN", + "value": "Environment:PROD" + }, + { + "evaluator": "IN", + "value": "Component:b2v-com-fe" + } + ], + "filter": "dt.entity.service", + "filterOperator": "OR", + "filterType": "TAG", + "nestedFilters": [] + } + ] + }, + "id": "A", + "metric": "builtin:service.errors.fourxx.rate", + "rate": "NONE", + "spaceAggregation": "AVG", + "splitBy": [], + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [ + { + "criteria": [ + { + "evaluator": "IN", + "value": "Component:b2v-com-fe" + }, + { + "evaluator": "IN", + "value": "Environment:PROD" + } + ], + "filter": "dt.entity.service", + "filterOperator": "OR", + "filterType": "TAG", + "nestedFilters": [] + } + ] + }, + "id": "B", + "metric": "builtin:service.errors.fivexx.rate", + "rate": "NONE", + "spaceAggregation": "AVG", + "timeAggregation": "DEFAULT" + }, + { + "enabled": true, + "filterBy": { + "criteria": [], + "filterOperator": "AND", + "nestedFilters": [ + { + "criteria": [ + { + "evaluator": "IN", + "value": "Component:b2v-com-fe" + } + ], + "filter": "dt.entity.process_group_instance", + "filterOperator": "OR", + "filterType": "TAG", + "nestedFilters": [] + } + ] + }, + "id": "C", + "metric": "builtin:tech.mongodb.active_clients", + "rate": "NONE", + "spaceAggregation": "AVG", + "timeAggregation": "DEFAULT" + } + ], + "visualConfig": { + "axes": { + "xAxis": { + "visible": true + }, + "yAxes": [] + }, + "global": {}, + "rules": [ + { + "matcher": "A:", + "properties": { + "color": "DEFAULT", + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "B:", + "properties": { + "color": "DEFAULT", + "seriesType": "COLUMN" + }, + "seriesOverrides": [] + }, + { + "matcher": "C:", + "properties": { + "color": "DEFAULT", + "seriesType": "LINE" + }, + "seriesOverrides": [] + } + ], + "thresholds": [ + { + "axisTarget": "LEFT", + "rules": [ + { + "color": "#7dc540" + }, + { + "color": "#f5d30f" + }, + { + "color": "#dc172a" + } + ], + "visible": true + } + ], + "type": "GRAPH_CHART" + } + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_EMEA_PROD.id + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + [Total requests per Application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=476e06cc-d784-4cd9-9afb-09751df4ef31) + + [Average response time per application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=309c5639-0689-4805-8573-53357b2e56d0) + + [Sucessful requests per application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=79cc0b20-532e-4a4f-81b6-ca4979984113) + + [Failed requests per application](https://xxu26128.live.dynatrace.com/ui/diagnostictools/mda?gtf=-24h%20to%20now&gf=-5651984742855815750&mdaId=e3ca5c36-dd56-4ce9-8ee7-aea98668f26e) + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 912 + width = 380 + } + } +} +# DEFINE dynatrace_dashboard_sharing.CD_b2v-com-fe_EMEA_PROD.id = 52ebed85-1d61-475f-aafc-9fe52dc5454b +resource "dynatrace_dashboard_sharing" "CD_b2v-com-fe_EMEA_PROD" { + enabled = true + dashboard_id = dynatrace_dashboard.CD_b2v-com-fe_EMEA_PROD.id + # preset = false + permissions { + permission { + type = "ALL" + level = "VIEW" + } + } +} \ No newline at end of file diff --git a/EMEA_PROD/dashboard/cd_b2v-com-fe_prod.tf b/EMEA_PROD/dashboard/cd_b2v-com-fe_prod.tf new file mode 100644 index 00000000..9e19c016 --- /dev/null +++ b/EMEA_PROD/dashboard/cd_b2v-com-fe_prod.tf @@ -0,0 +1,324 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_PROD.id = b00152d1-ae2a-4570-a023-8f3f4c4a52b8 +data "dynatrace_management_zone" "CD_b2v-com-fe_PROD"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_PROD" { + dashboard_metadata { + name = "CD_b2v-com-fe PROD" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + unknowns = jsonencode({ + "popularity": 1 + }) + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_PROD.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/EMEA_PROD/management_zone/cd_b2v-com-fe.tf b/EMEA_PROD/management_zone/cd_b2v-com-fe.tf new file mode 100644 index 00000000..53979be1 --- /dev/null +++ b/EMEA_PROD/management_zone/cd_b2v-com-fe.tf @@ -0,0 +1,95 @@ +# DEFINE dynatrace_management_zone.CD_b2v-com-fe.id = -5651984742855815750 +resource "dynatrace_management_zone" "CD_b2v-com-fe" { + name = "CD_b2v-com-fe" + rules { + type = "CLOUD_APPLICATION" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "CLOUD_APPLICATION_NAMESPACE" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAMESPACE_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "PROCESS_GROUP" + enabled = true + propagation_types = [ "PROCESS_GROUP_TO_HOST" ] + conditions { + key { + type = "STATIC" + attribute = "PROCESS_GROUP_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "SERVICE" + enabled = true + propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ] + conditions { + key { + type = "STATIC" + attribute = "SERVICE_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } +} From de153374473a281ab8a364fe493be52aed4f76a0 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 19:08:17 +0100 Subject: [PATCH 5/6] "Migrating from Monaco to Terraform for management zone: CD_b2v-com-fe" --- NA_PREPROD/dashboard/cd_b2v-com-fe_int.tf | 321 ++++++++++++++++++++ NA_PREPROD/dashboard/cd_b2v-com-fe_test.tf | 321 ++++++++++++++++++++ NA_PREPROD/management_zone/cd_b2v-com-fe.tf | 95 ++++++ 3 files changed, 737 insertions(+) create mode 100644 NA_PREPROD/dashboard/cd_b2v-com-fe_int.tf create mode 100644 NA_PREPROD/dashboard/cd_b2v-com-fe_test.tf create mode 100644 NA_PREPROD/management_zone/cd_b2v-com-fe.tf diff --git a/NA_PREPROD/dashboard/cd_b2v-com-fe_int.tf b/NA_PREPROD/dashboard/cd_b2v-com-fe_int.tf new file mode 100644 index 00000000..81ec57b8 --- /dev/null +++ b/NA_PREPROD/dashboard/cd_b2v-com-fe_int.tf @@ -0,0 +1,321 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_INT.id = 16abea7b-171e-4bba-a4da-d41f51b6b2f8 +data "dynatrace_management_zone" "CD_b2v-com-fe_INT"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_INT" { + dashboard_metadata { + name = "CD_b2v-com-fe INT" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_INT.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:INT" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/NA_PREPROD/dashboard/cd_b2v-com-fe_test.tf b/NA_PREPROD/dashboard/cd_b2v-com-fe_test.tf new file mode 100644 index 00000000..27fa5331 --- /dev/null +++ b/NA_PREPROD/dashboard/cd_b2v-com-fe_test.tf @@ -0,0 +1,321 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_TEST.id = 59f4d49b-a6f0-4bb0-aaa6-5e79f6322c22 +data "dynatrace_management_zone" "CD_b2v-com-fe_TEST"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_TEST" { + dashboard_metadata { + name = "CD_b2v-com-fe TEST" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_TEST.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:TEST" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/NA_PREPROD/management_zone/cd_b2v-com-fe.tf b/NA_PREPROD/management_zone/cd_b2v-com-fe.tf new file mode 100644 index 00000000..bdc63873 --- /dev/null +++ b/NA_PREPROD/management_zone/cd_b2v-com-fe.tf @@ -0,0 +1,95 @@ +# DEFINE dynatrace_management_zone.CD_b2v-com-fe.id = 7860518032982145968 +resource "dynatrace_management_zone" "CD_b2v-com-fe" { + name = "CD_b2v-com-fe" + rules { + type = "CLOUD_APPLICATION" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "CLOUD_APPLICATION_NAMESPACE" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAMESPACE_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "PROCESS_GROUP" + enabled = true + propagation_types = [ "PROCESS_GROUP_TO_HOST" ] + conditions { + key { + type = "STATIC" + attribute = "PROCESS_GROUP_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "SERVICE" + enabled = true + propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ] + conditions { + key { + type = "STATIC" + attribute = "SERVICE_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } +} From 0f43e9da76fb2a3239e5a3faef1c223b4d24cd09 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 19:11:27 +0100 Subject: [PATCH 6/6] "Migrating from Monaco to Terraform for management zone: CD_b2v-com-fe" --- NA_PROD/dashboard/cd_b2v-com-fe_e2e.tf | 321 +++++++++++++++++++++++ NA_PROD/dashboard/cd_b2v-com-fe_prod.tf | 321 +++++++++++++++++++++++ NA_PROD/management_zone/cd_b2v-com-fe.tf | 95 +++++++ 3 files changed, 737 insertions(+) create mode 100644 NA_PROD/dashboard/cd_b2v-com-fe_e2e.tf create mode 100644 NA_PROD/dashboard/cd_b2v-com-fe_prod.tf create mode 100644 NA_PROD/management_zone/cd_b2v-com-fe.tf diff --git a/NA_PROD/dashboard/cd_b2v-com-fe_e2e.tf b/NA_PROD/dashboard/cd_b2v-com-fe_e2e.tf new file mode 100644 index 00000000..d0183ff3 --- /dev/null +++ b/NA_PROD/dashboard/cd_b2v-com-fe_e2e.tf @@ -0,0 +1,321 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_E2E.id = 26f93c4c-0b97-4835-b628-ed9fff8cad7f +data "dynatrace_management_zone" "CD_b2v-com-fe_E2E"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_E2E" { + dashboard_metadata { + name = "CD_b2v-com-fe E2E" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_E2E.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Environment:E2E", "Component:b2v-com-fe" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/NA_PROD/dashboard/cd_b2v-com-fe_prod.tf b/NA_PROD/dashboard/cd_b2v-com-fe_prod.tf new file mode 100644 index 00000000..bbfeefc1 --- /dev/null +++ b/NA_PROD/dashboard/cd_b2v-com-fe_prod.tf @@ -0,0 +1,321 @@ +# DEFINE dynatrace_dashboard.CD_b2v-com-fe_PROD.id = daf183c8-0982-46a9-b38c-0e132f8c280f +data "dynatrace_management_zone" "CD_b2v-com-fe_PROD"{ name="CD_b2v-com-fe" } +resource "dynatrace_dashboard" "CD_b2v-com-fe_PROD" { + dashboard_metadata { + name = "CD_b2v-com-fe PROD" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "b2v-com-fe" ] + filter { + timeframe = "-24h to now" + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 228 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Failure rate (HTTP 4xx/5xx errors)" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#ff0000" + key = "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956393463 + } + config { + custom_color = "#fff29a" + key = "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE" + last_modified = 1617956441725 + } + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fourxx.rate" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.fivexx.rate" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_b2v-com-fe" + id = data.dynatrace_management_zone.CD_b2v-com-fe_PROD.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 532 + width = 1064 + } + } + tile { + name = "Custom chart" + configured = true + tile_type = "CUSTOM_CHARTING" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 304 + left = 38 + top = 570 + width = 1064 + } + filter_config { + type = "MIXED" + custom_name = "Response time, Request Count and Number of Errors" + default_name = "Custom chart" + chart_config { + type = "TIMESERIES" + legend = true + result_metadata { + config { + custom_color = "#008cdb" + key = "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275720776 + } + config { + custom_color = "#b4e5f9" + key = "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE" + last_modified = 1595275686773 + } + config { + custom_color = "#ef651f" + key = "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE" + last_modified = 1595275955999 + } + } + series { + type = "LINE" + aggregation = "AVG" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.response.time" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.requestCount.total" + # sort_ascending = false + # sort_column = false + } + series { + type = "BAR" + aggregation = "NONE" + aggregation_rate = "TOTAL" + entity_type = "SERVICE" + metric = "builtin:service.errors.total.count" + # sort_ascending = false + sort_column = true + } + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "Markdown" + configured = true + markdown =<<-EOT + --- + + EOT + tile_type = "MARKDOWN" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 38 + left = 38 + top = 190 + width = 1064 + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "DATABASES_OVERVIEW" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 646 + top = 38 + width = 190 + } + filter_config { + type = "DATABASE" + custom_name = "Databases" + default_name = "Databases" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "DATABASE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter_config { + type = "SERVICE" + custom_name = "Services" + default_name = "Services" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "SERVICE" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + unknowns = jsonencode({ + "isAutoRefreshDisabled": false + }) + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter_config { + type = "HOST" + custom_name = "Hosts" + default_name = "Hosts" + chart_config { + type = "TIMESERIES" + legend = true + } + filters { + filter { + entity_type = "HOST" + match { + key = "AUTO_TAGS" + values = [ "Component:b2v-com-fe", "Environment:PROD" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/NA_PROD/management_zone/cd_b2v-com-fe.tf b/NA_PROD/management_zone/cd_b2v-com-fe.tf new file mode 100644 index 00000000..52b2a15e --- /dev/null +++ b/NA_PROD/management_zone/cd_b2v-com-fe.tf @@ -0,0 +1,95 @@ +# DEFINE dynatrace_management_zone.CD_b2v-com-fe.id = 5354690048511482357 +resource "dynatrace_management_zone" "CD_b2v-com-fe" { + name = "CD_b2v-com-fe" + rules { + type = "CLOUD_APPLICATION" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "CLOUD_APPLICATION_NAMESPACE" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAMESPACE_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "b2v-com-fe" + } + } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "PROCESS_GROUP" + enabled = true + propagation_types = [ "PROCESS_GROUP_TO_HOST" ] + conditions { + key { + type = "STATIC" + attribute = "PROCESS_GROUP_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } + rules { + type = "SERVICE" + enabled = true + propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ] + conditions { + key { + type = "STATIC" + attribute = "SERVICE_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "b2v-com-fe" + } + } + } + } +}