From 58fd038fae6be906f9316f3bddf76ee03f16223d Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:46:39 +0100 Subject: [PATCH 1/6] "Migrating from Monaco to Terraform for management zone: CD_IISC-IR-Intelligent-Reminder" --- .../cd_iisc-ir-intelligent-reminder_int.tf | 38 ++ .../cd_iisc-ir-intelligent-reminder_int.tf | 330 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder_test.tf | 330 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder.tf | 20 ++ 4 files changed, 718 insertions(+) create mode 100644 CN_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf create mode 100644 CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf create mode 100644 CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf create mode 100644 CN_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf diff --git a/CN_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf b/CN_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf new file mode 100644 index 00000000..530175d9 --- /dev/null +++ b/CN_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_IISC-IR-Intelligent-Reminder_INT.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQ1NzE4ZWE3MC0wMTFiLTNjYzctODQ3My00NTYyYjU3ODNhNWK-71TeFdrerQ +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_INT"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_alerting" "CD_IISC-IR-Intelligent-Reminder_INT" { + name = "CD_IISC-IR-Intelligent-Reminder INT" + management_zone = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_INT.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Environment:INT" ] + } + } +} \ No newline at end of file diff --git a/CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf b/CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf new file mode 100644 index 00000000..68a4859e --- /dev/null +++ b/CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf @@ -0,0 +1,330 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_INT.id = 3c45d224-44b4-47e8-b0cb-fb34b6099d0c +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_INT"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_INT" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder INT" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_INT.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_INT.id + } + } + } + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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/CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf b/CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf new file mode 100644 index 00000000..13c4c608 --- /dev/null +++ b/CN_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf @@ -0,0 +1,330 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_TEST.id = bbcd7161-38a9-4eb6-92ec-f0fa15efe3be +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_TEST"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_TEST" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder TEST" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_TEST.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_TEST.id + } + } + } + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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/CN_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf b/CN_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf new file mode 100644 index 00000000..da843ae9 --- /dev/null +++ b/CN_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf @@ -0,0 +1,20 @@ +# DEFINE dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder.id = 5160446042214578578 +resource "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder" { + name = "CD_IISC-IR-Intelligent-Reminder" + entity_selector_based_rule { + enabled = true + selector = "type(PROCESS_GROUP_INSTANCE),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(Service),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"compass-id:iisc-ir\"))" + } + entity_selector_based_rule { + enabled = true + selector = "type(HOST),tag(\"compass-id:iisc-ir\")" + } +} From 84d61c997716d87cf10f6c9b23812e6f4641ce56 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:52:12 +0100 Subject: [PATCH 2/6] "Migrating from Monaco to Terraform for management zone: CD_IISC-IR-Intelligent-Reminder" --- .../cd_iisc-ir-intelligent-reminder_prod.tf | 38 ++ .../cd_iisc-ir-intelligent-reminder_e2e.tf | 330 +++++++++++++++++ .../cd_iisc-ir-intelligent-reminder_prod.tf | 333 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder.tf | 20 ++ 4 files changed, 721 insertions(+) create mode 100644 CN_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf create mode 100644 CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf create mode 100644 CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf create mode 100644 CN_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf diff --git a/CN_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf b/CN_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf new file mode 100644 index 00000000..4180de1c --- /dev/null +++ b/CN_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_IISC-IR-Intelligent-Reminder_PROD.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQwYWUyZmZlMi05ZGQ4LTM2NDUtYTBlMS05OTFjMWI4ZWQxYTC-71TeFdrerQ +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_PROD"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_alerting" "CD_IISC-IR-Intelligent-Reminder_PROD" { + name = "CD_IISC-IR-Intelligent-Reminder PROD" + management_zone = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Environment:PROD" ] + } + } +} \ No newline at end of file diff --git a/CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf b/CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf new file mode 100644 index 00000000..1316a59a --- /dev/null +++ b/CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf @@ -0,0 +1,330 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_E2E.id = 3cdd5beb-6412-4ce4-9c32-9ba93370cdb3 +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_E2E"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_E2E" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder E2E" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.id + } + } + } + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf b/CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf new file mode 100644 index 00000000..7f06d510 --- /dev/null +++ b/CN_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf @@ -0,0 +1,333 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_PROD.id = 37388a25-791f-4de4-b2f6-3f6a95c04372 +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_PROD"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_PROD" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder PROD" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + unknowns = jsonencode({ + "popularity": 1 + }) + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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:PROD" ] + } + } + } + } + } + tile { + name = "Problems" + configured = true + tile_type = "OPEN_PROBLEMS" + bounds { + height = 152 + left = 950 + top = 38 + width = 152 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.id + } + } + } + tile { + name = "Overall Health" + configured = true + tile_type = "HEADER" + bounds { + height = 38 + left = 38 + top = 0 + width = 1064 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.id + } + } + } + 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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "SERVICES" + bounds { + height = 152 + left = 342 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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:PROD" ] + } + } + } + } + } + tile { + name = "" + chart_visible = true + configured = true + tile_type = "HOSTS" + bounds { + height = 152 + left = 38 + top = 38 + width = 190 + } + filter { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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:PROD" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/CN_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf b/CN_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf new file mode 100644 index 00000000..b99cd121 --- /dev/null +++ b/CN_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf @@ -0,0 +1,20 @@ +# DEFINE dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder.id = -7184007153663986275 +resource "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder" { + name = "CD_IISC-IR-Intelligent-Reminder" + entity_selector_based_rule { + enabled = true + selector = "type(PROCESS_GROUP_INSTANCE),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(Service),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"compass-id:iisc-ir\"))" + } + entity_selector_based_rule { + enabled = true + selector = "type(HOST),tag(\"compass-id:iisc-ir\")" + } +} From 29592f60c9edbcda0223cfa8b84dcd8dd10cde4b Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:56:58 +0100 Subject: [PATCH 3/6] "Migrating from Monaco to Terraform for management zone: CD_IISC-IR-Intelligent-Reminder" --- .../cd_iisc-ir-intelligent-reminder_int.tf | 38 ++ .../cd_iisc-ir-intelligent-reminder_int.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder_test.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder.tf | 20 + 4 files changed, 772 insertions(+) create mode 100644 EMEA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf create mode 100644 EMEA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf create mode 100644 EMEA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf create mode 100644 EMEA_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf diff --git a/EMEA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf b/EMEA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf new file mode 100644 index 00000000..22989f54 --- /dev/null +++ b/EMEA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_IISC-IR-Intelligent-Reminder_INT.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQ1MWE5YjlkNC0yMzNkLTMzMzEtYjhlNi0wZWM4OWQxNzAxMGG-71TeFdrerQ +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_INT"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_alerting" "CD_IISC-IR-Intelligent-Reminder_INT" { + name = "CD_IISC-IR-Intelligent-Reminder INT" + management_zone = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_INT.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Environment:INT" ] + } + } +} \ No newline at end of file diff --git a/EMEA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf b/EMEA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf new file mode 100644 index 00000000..03086520 --- /dev/null +++ b/EMEA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_INT.id = 16eb89c6-5eba-4ba8-8e97-31be694ea754 +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_INT"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_INT" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder INT" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_iisc-ir-intelligent-reminder_test.tf b/EMEA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf new file mode 100644 index 00000000..d4509e48 --- /dev/null +++ b/EMEA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_TEST.id = 5e9b3e24-0a87-40f2-b820-7804ea5a3035 +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_TEST"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_TEST" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder TEST" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_iisc-ir-intelligent-reminder.tf b/EMEA_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf new file mode 100644 index 00000000..6ca70c8a --- /dev/null +++ b/EMEA_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf @@ -0,0 +1,20 @@ +# DEFINE dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder.id = 3032162799311731751 +resource "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder" { + name = "CD_IISC-IR-Intelligent-Reminder" + entity_selector_based_rule { + enabled = true + selector = "type(HOST),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(Service),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"compass-id:iisc-ir\"))" + } + entity_selector_based_rule { + enabled = true + selector = "type(PROCESS_GROUP_INSTANCE),tag(\"compass-id:iisc-ir\")" + } +} From b2addd485e5016536bafda10a11ff6004de0fb57 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 19:05:45 +0100 Subject: [PATCH 4/6] "Migrating from Monaco to Terraform for management zone: CD_IISC-IR-Intelligent-Reminder" --- .../cd_iisc-ir-intelligent-reminder_prod.tf | 38 ++ .../cd_iisc-ir-intelligent-reminder_e2e.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder_prod.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder.tf | 20 + 4 files changed, 772 insertions(+) create mode 100644 EMEA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf create mode 100644 EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf create mode 100644 EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf create mode 100644 EMEA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf diff --git a/EMEA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf b/EMEA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf new file mode 100644 index 00000000..5a633094 --- /dev/null +++ b/EMEA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_IISC-IR-Intelligent-Reminder_PROD.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQyZDgxMmViNy1kMTc4LTMzN2QtOWYwZS1hYWE3N2M0YWRlOTK-71TeFdrerQ +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_PROD"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_alerting" "CD_IISC-IR-Intelligent-Reminder_PROD" { + name = "CD_IISC-IR-Intelligent-Reminder PROD" + management_zone = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Environment:PROD" ] + } + } +} \ No newline at end of file diff --git a/EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf b/EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf new file mode 100644 index 00000000..2e00b927 --- /dev/null +++ b/EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_E2E.id = a0d3e8ee-58bf-4db4-8d1e-9ddbab624ef1 +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_E2E"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_E2E" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder E2E" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf b/EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf new file mode 100644 index 00000000..f7623afc --- /dev/null +++ b/EMEA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_PROD.id = 03628c42-1099-4643-bc13-334df08319f1 +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_PROD"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_PROD" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder PROD" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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:PROD" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/EMEA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf b/EMEA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf new file mode 100644 index 00000000..609e721f --- /dev/null +++ b/EMEA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf @@ -0,0 +1,20 @@ +# DEFINE dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder.id = -2989233302809068144 +resource "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder" { + name = "CD_IISC-IR-Intelligent-Reminder" + entity_selector_based_rule { + enabled = true + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"compass-id:iisc-ir\"))" + } + entity_selector_based_rule { + enabled = true + selector = "type(PROCESS_GROUP_INSTANCE),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(HOST),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(Service),tag(\"compass-id:iisc-ir\")" + } +} From e9182fed08917a07e6b5af0211910f375f28c50a Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 19:09:02 +0100 Subject: [PATCH 5/6] "Migrating from Monaco to Terraform for management zone: CD_IISC-IR-Intelligent-Reminder" --- .../cd_iisc-ir-intelligent-reminder_int.tf | 38 ++ .../cd_iisc-ir-intelligent-reminder_int.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder_test.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder.tf | 20 + 4 files changed, 772 insertions(+) create mode 100644 NA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf create mode 100644 NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf create mode 100644 NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf create mode 100644 NA_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf diff --git a/NA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf b/NA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf new file mode 100644 index 00000000..7e3a42c2 --- /dev/null +++ b/NA_PREPROD/alerting/cd_iisc-ir-intelligent-reminder_int.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_IISC-IR-Intelligent-Reminder_INT.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACRlMzNmMmE4OS0yNWY0LTM0NWEtOGZlMC1hNzM5Mjc4N2E5MDa-71TeFdrerQ +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_INT"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_alerting" "CD_IISC-IR-Intelligent-Reminder_INT" { + name = "CD_IISC-IR-Intelligent-Reminder INT" + management_zone = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_INT.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Environment:INT" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Environment:INT" ] + } + } +} \ No newline at end of file diff --git a/NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf b/NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf new file mode 100644 index 00000000..0b8fce81 --- /dev/null +++ b/NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_int.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_INT.id = f51bfb74-ceaf-4617-9ff2-0a9698818ffe +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_INT"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_INT" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder INT" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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/NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf b/NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf new file mode 100644 index 00000000..a3fa000e --- /dev/null +++ b/NA_PREPROD/dashboard/cd_iisc-ir-intelligent-reminder_test.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_TEST.id = bf6ad674-dbec-40a0-a285-a86b95b4539c +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_TEST"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_TEST" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder TEST" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_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/NA_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf b/NA_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf new file mode 100644 index 00000000..5814d8a6 --- /dev/null +++ b/NA_PREPROD/management_zone/cd_iisc-ir-intelligent-reminder.tf @@ -0,0 +1,20 @@ +# DEFINE dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder.id = 4983886865451137773 +resource "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder" { + name = "CD_IISC-IR-Intelligent-Reminder" + entity_selector_based_rule { + enabled = true + selector = "type(Service),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(PROCESS_GROUP_INSTANCE),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"compass-id:iisc-ir\"))" + } + entity_selector_based_rule { + enabled = true + selector = "type(HOST),tag(\"compass-id:iisc-ir\")" + } +} From 5740e4620d63a8d6ea93b8de0606841edde5a63d Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 19:12:14 +0100 Subject: [PATCH 6/6] "Migrating from Monaco to Terraform for management zone: CD_IISC-IR-Intelligent-Reminder" --- .../cd_iisc-ir-intelligent-reminder_prod.tf | 38 ++ .../cd_iisc-ir-intelligent-reminder_e2e.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder_prod.tf | 357 ++++++++++++++++++ .../cd_iisc-ir-intelligent-reminder.tf | 20 + 4 files changed, 772 insertions(+) create mode 100644 NA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf create mode 100644 NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf create mode 100644 NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf create mode 100644 NA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf diff --git a/NA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf b/NA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf new file mode 100644 index 00000000..1cf117de --- /dev/null +++ b/NA_PROD/alerting/cd_iisc-ir-intelligent-reminder_prod.tf @@ -0,0 +1,38 @@ +# DEFINE dynatrace_alerting.CD_IISC-IR-Intelligent-Reminder_PROD.id = vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQxNDMyZWU3Yi00NmEzLTNjNmQtYWU2ZS05MDMyYTFhYWU4NTe-71TeFdrerQ +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_PROD"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_alerting" "CD_IISC-IR-Intelligent-Reminder_PROD" { + name = "CD_IISC-IR-Intelligent-Reminder PROD" + management_zone = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.id + rules { + rule { + delay_in_minutes = 0 + include_mode = "INCLUDE_ALL" + severity_level = "AVAILABILITY" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "CUSTOM_ALERT" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 10 + include_mode = "INCLUDE_ALL" + severity_level = "ERRORS" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "PERFORMANCE" + tags = [ "Environment:PROD" ] + } + rule { + delay_in_minutes = 30 + include_mode = "INCLUDE_ALL" + severity_level = "RESOURCE_CONTENTION" + tags = [ "Environment:PROD" ] + } + } +} \ No newline at end of file diff --git a/NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf b/NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf new file mode 100644 index 00000000..a29fd1e3 --- /dev/null +++ b/NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_e2e.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_E2E.id = 96d31306-c1ea-4f8a-b89d-75a5bbb4b97f +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_E2E"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_E2E" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder E2E" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_E2E.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:E2E" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf b/NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf new file mode 100644 index 00000000..6c6105ea --- /dev/null +++ b/NA_PROD/dashboard/cd_iisc-ir-intelligent-reminder_prod.tf @@ -0,0 +1,357 @@ +# DEFINE dynatrace_dashboard.CD_IISC-IR-Intelligent-Reminder_PROD.id = 7ac7d7e2-e071-4b1d-9989-f116577c7c67 +data "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder_PROD"{ name="CD_IISC-IR-Intelligent-Reminder" } +resource "dynatrace_dashboard" "CD_IISC-IR-Intelligent-Reminder_PROD" { + dashboard_metadata { + name = "CD_IISC-IR-Intelligent-Reminder PROD" + owner = "Ignacio.Goldman@partner.bmwgroup.com" + preset = true + shared = true + tags = [ "CD_IISC-IR-Intelligent-Reminder" ] + 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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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: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 { + management_zone { + name = "CD_IISC-IR-Intelligent-Reminder" + id = data.dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder_PROD.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:PROD" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/NA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf b/NA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf new file mode 100644 index 00000000..1544c0ba --- /dev/null +++ b/NA_PROD/management_zone/cd_iisc-ir-intelligent-reminder.tf @@ -0,0 +1,20 @@ +# DEFINE dynatrace_management_zone.CD_IISC-IR-Intelligent-Reminder.id = 7545746762202758512 +resource "dynatrace_management_zone" "CD_IISC-IR-Intelligent-Reminder" { + name = "CD_IISC-IR-Intelligent-Reminder" + entity_selector_based_rule { + enabled = true + selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"compass-id:iisc-ir\"))" + } + entity_selector_based_rule { + enabled = true + selector = "type(PROCESS_GROUP_INSTANCE),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(HOST),tag(\"compass-id:iisc-ir\")" + } + entity_selector_based_rule { + enabled = true + selector = "type(Service),tag(\"compass-id:iisc-ir\")" + } +}