From 08bf3b18900fc1e227e4b7b74938ad4a4be894cd Mon Sep 17 00:00:00 2001 From: ermisw Date: Wed, 16 Mar 2022 10:43:12 +0100 Subject: [PATCH] recreated management zone --- .../CD_lsc-jr/dashboard/README.md | 15 +--- .../CD_lsc-jr/dashboard/dashboard.yaml | 30 ++----- .../CD_lsc-jr/dashboard/default.json | 62 ++++++++++---- .../CD_lsc-jr/management-zone/README.md | 76 +---------------- .../CD_lsc-jr/management-zone/default.json | 83 ++++--------------- .../management-zone/management-zone.yaml | 2 +- 6 files changed, 71 insertions(+), 197 deletions(-) diff --git a/BMW-Dynatrace-config/CD_lsc-jr/dashboard/README.md b/BMW-Dynatrace-config/CD_lsc-jr/dashboard/README.md index cdb514a3..2b6d5717 100644 --- a/BMW-Dynatrace-config/CD_lsc-jr/dashboard/README.md +++ b/BMW-Dynatrace-config/CD_lsc-jr/dashboard/README.md @@ -1,13 +1,4 @@ -## Update dashboard configuration -- Configuration changes (like in dashboards, alerting profiles) must be done via a pull request. Changing a dashboard just in the environment, will cause that it will be overwritten by Monaco. -- How to generate changes in your dashboards? - 1. Modify the dashboard within the Dynatrace UI with the intended changes. - 2. Copy the JSON of the dashboards. (Can be found under the dashboard settings) - 3. Paste the copied JSON under the Monaco JSON, overwrite it. - 4. Commit and pull request to merge the branch to the master: - ``` - git add - git commit -m " configuration changes" - git push -u origin - ``` \ No newline at end of file +### How to configure dashboards? + +Please refer to [this](https://atc.bmwgroup.net/confluence/display/OPMAAS/Documentation+%7C+Dashboards) page to configure your dashboards. \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_lsc-jr/dashboard/dashboard.yaml b/BMW-Dynatrace-config/CD_lsc-jr/dashboard/dashboard.yaml index b57ab26b..9f9e4574 100644 --- a/BMW-Dynatrace-config/CD_lsc-jr/dashboard/dashboard.yaml +++ b/BMW-Dynatrace-config/CD_lsc-jr/dashboard/dashboard.yaml @@ -5,83 +5,69 @@ config: - CDnewComponentTag-TEST: default.json #PROD dashboards for EMEA/NA/CN Prod -#Dry-run needed for all hubs CDnewComponentTag-PROD: - name: CD_lsc-jr PROD - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id - env: PROD - skipDeployment: "true" -#Configuration CDnewComponentTag-PROD.EMEA-Prod: - name: CD_lsc-jr PROD - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id -- tag: newComponentTag - env: PROD - skipDeployment: "false" CDnewComponentTag-PROD.NA-Prod: - name: CD_lsc-jr PROD - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id -- tag: newComponentTag - env: PROD - skipDeployment: "false" CDnewComponentTag-PROD.CN-Prod: - name: CD_lsc-jr PROD - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id -- tag: newComponentTag - env: PROD - skipDeployment: "false" -#E2E dashboards for EMEA/NA/CN E2E -#Dry-run needed for all hubs +#E2E dashboards for EMEA/NA/CN Prod CDnewComponentTag-E2E: - name: CD_lsc-jr E2E - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id - env: E2E - skipDeployment: "true" -#Configuration CDnewComponentTag-E2E.EMEA-Prod: - name: CD_lsc-jr E2E - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id - env: E2E -- tag: newComponentTag -- skipDeployment: "true" +- skipDeployment: "false" CDnewComponentTag-E2E.NA-Prod: - name: CD_lsc-jr E2E - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id - env: E2E -- tag: newComponentTag -- skipDeployment: "true" +- skipDeployment: "false" CDnewComponentTag-E2E.CN-Prod: - name: CD_lsc-jr E2E - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id - env: E2E -- tag: newComponentTag -- skipDeployment: "true" +- skipDeployment: "false" -#INT dashboards for EMEA/NA/CN -#Dry-run needed for all hubs +#INT dashboards for EMEA/NA/CN PreProd CDnewComponentTag-INT: - name: CD_lsc-jr INT - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id - env: INT -- tag: newComponentTag - skipDeployment: "true" -#Configuration CDnewComponentTag-INT.EMEA-PreProd: - name: CD_lsc-jr INT - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id - env: INT -- tag: newComponentTag - skipDeployment: "false" CDnewComponentTag-INT.NA-PreProd: - name: CD_lsc-jr INT @@ -96,21 +82,17 @@ CDnewComponentTag-INT.CN-PreProd: - env: INT - skipDeployment: "false" -#TEST dashboards for EMEA/NA/CN -#Dry-run needed for all hubs +#TEST dashboards for EMEA/NA/CN PreProd CDnewComponentTag-TEST: - name: CD_lsc-jr TEST - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id -- tag: newComponentTag - env: TEST - skipDeployment: "true" -#Configuration CDnewComponentTag-TEST.EMEA-PreProd: - name: CD_lsc-jr TEST - mzName: CD_lsc-jr/management-zone/CDnewComponentTag.name - mzId: CD_lsc-jr/management-zone/CDnewComponentTag.id -- tag: newComponentTag - env: TEST - skipDeployment: "false" CDnewComponentTag-TEST.NA-PreProd: diff --git a/BMW-Dynatrace-config/CD_lsc-jr/dashboard/default.json b/BMW-Dynatrace-config/CD_lsc-jr/dashboard/default.json index 6c685810..189767ed 100644 --- a/BMW-Dynatrace-config/CD_lsc-jr/dashboard/default.json +++ b/BMW-Dynatrace-config/CD_lsc-jr/dashboard/default.json @@ -13,8 +13,9 @@ "timeframe": "-24h to now" }, "tags": [ - "{{.tag}}" - ] + "{{.mzName}}" + ], + "preset": true }, "tiles": [ { @@ -27,7 +28,12 @@ "width": 1064, "height": 304 }, - "tileFilter": {}, + "tileFilter": { + "managementZone": { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + }, "filterConfig": { "type": "MIXED", "customName": "Failure rate (HTTP 4xx/5xx errors)", @@ -71,8 +77,7 @@ "filtersPerEntityType": { "SERVICE": { "AUTO_TAGS": [ - "Environment:{{.env}}", - "Component:{{.tag}}" + "Environment:{{.env}}" ] } } @@ -105,7 +110,12 @@ "width": 1064, "height": 38 }, - "tileFilter": {} + "tileFilter": { + "managementZone": { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + } }, { "name": "Markdown", @@ -130,7 +140,12 @@ "width": 1064, "height": 304 }, - "tileFilter": {}, + "tileFilter": { + "managementZone": { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + }, "filterConfig": { "type": "MIXED", "customName": "Response time, Request Count and Number of Errors", @@ -188,8 +203,7 @@ "filtersPerEntityType": { "SERVICE": { "AUTO_TAGS": [ - "Environment:{{.env}}", - "Component:{{.tag}}" + "Environment:{{.env}}" ] } } @@ -218,7 +232,12 @@ "width": 190, "height": 152 }, - "tileFilter": {}, + "tileFilter": { + "managementZone": { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + }, "filterConfig": { "type": "DATABASE", "customName": "Databases", @@ -232,8 +251,7 @@ "filtersPerEntityType": { "DATABASE": { "AUTO_TAGS": [ - "Environment:{{.env}}", - "Component:{{.tag}}" + "Environment:{{.env}}" ] } } @@ -250,7 +268,12 @@ "width": 190, "height": 152 }, - "tileFilter": {}, + "tileFilter": { + "managementZone": { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + }, "filterConfig": { "type": "SERVICE", "customName": "Services", @@ -264,8 +287,7 @@ "filtersPerEntityType": { "SERVICE": { "AUTO_TAGS": [ - "Environment:{{.env}}", - "Component:{{.tag}}" + "Environment:{{.env}}" ] } } @@ -282,7 +304,12 @@ "width": 190, "height": 152 }, - "tileFilter": {}, + "tileFilter": { + "managementZone": { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + }, "filterConfig": { "type": "HOST", "customName": "Hosts", @@ -296,8 +323,7 @@ "filtersPerEntityType": { "HOST": { "AUTO_TAGS": [ - "Environment:{{.env}}", - "Component:{{.tag}}" + "Environment:{{.env}}" ] } } diff --git a/BMW-Dynatrace-config/CD_lsc-jr/management-zone/README.md b/BMW-Dynatrace-config/CD_lsc-jr/management-zone/README.md index c8ab0e21..ffe9d6e3 100644 --- a/BMW-Dynatrace-config/CD_lsc-jr/management-zone/README.md +++ b/BMW-Dynatrace-config/CD_lsc-jr/management-zone/README.md @@ -1,76 +1,4 @@ -## Management Zones configuration -### Excluding noisy services +### How to configure management zones? -*If you find services that are not relevant for the analysis, you can exclude them from the MZ.* - -#### HealthResource, PingResource, PrometheusResource services - -*After the deployment of the OneAgent, your services should appear under Transactions & Services. A good practice would be to exclude* -*the ones that are not relevant for monitoring. i.e. For some BMW's teams, HealthResource, PingResource, PrometheusResource have been excluded.* - -**How to exclude HealthResource?** -1. Open the file *default.json* configuration under the *CD_/management-zone/* folder. -2. Copy the following rule template: - ``` - { - "comparisonInfo": { - "caseSensitive": true, - "negate": true, - "operator": "CONTAINS", - "type": "STRING", - "value": "HealthResource" - }, - "key": { - "attribute": "SERVICE_NAME" - } - } - ``` -2. Add it under the `"type": "SERVICE"` rule's conditions. It should look like this: - ``` - { - "conditions": [ - { - "comparisonInfo": { - "negate": false, - "operator": "EQUALS", - "type": "TAG", - "value": { - "context": "CONTEXTLESS", - "key": "Component", - "value": "{{.tag}}" - }, - { - "comparisonInfo": { - "caseSensitive": true, - "negate": true, - "operator": "CONTAINS", - "type": "STRING", - "value": "HealthResource" - }, - "key": { - "attribute": "SERVICE_NAME" - } - } - }, - "key": { - "attribute": "SERVICE_TAGS" - } - } - ], - "enabled": true, - "propagationTypes": [ - "SERVICE_TO_PROCESS_GROUP_LIKE", - "SERVICE_TO_HOST_LIKE" - ], - "type": "SERVICE" - } - ``` - -3. Commit and pull request to merge the branch to the master: - ``` - git add - git commit -m " configuration changes" - git push -u origin - ``` -Note: you can use the same logic to exclude (or include) any other entity to your Management Zone. +Please refer to [this](https://atc.bmwgroup.net/confluence/display/OPMAAS/Documentation+%7C+Management+Zones) page to configure your management zones. \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_lsc-jr/management-zone/default.json b/BMW-Dynatrace-config/CD_lsc-jr/management-zone/default.json index e827aaff..fc96de39 100644 --- a/BMW-Dynatrace-config/CD_lsc-jr/management-zone/default.json +++ b/BMW-Dynatrace-config/CD_lsc-jr/management-zone/default.json @@ -1,76 +1,23 @@ { "dimensionalRules": [], "name": "{{.name}}", - "rules": [ - { - "conditions": [ + "entitySelectorBasedRules": [ { - "comparisonInfo": { - "negate": false, - "operator": "EQUALS", - "type": "TAG", - "value": { - "context": "CONTEXTLESS", - "key": "Component", - "value": "{{.tag}}" - } - }, - "key": { - "attribute": "SERVICE_TAGS" - } - } - ], - "enabled": true, - "propagationTypes": [ - "SERVICE_TO_PROCESS_GROUP_LIKE", - "SERVICE_TO_HOST_LIKE" - ], - "type": "SERVICE" - }, - { - "conditions": [ + "enabled": true, + "entitySelector": "type(Service),tag({{.compassIDs}})" + }, { - "comparisonInfo": { - "negate": false, - "operator": "EQUALS", - "type": "TAG", - "value": { - "context": "CONTEXTLESS", - "key": "Component", - "value": "{{.tag}}" - } - }, - "key": { - "attribute": "PROCESS_GROUP_TAGS" - } - } - ], - "enabled": true, - "propagationTypes": [ - "PROCESS_GROUP_TO_HOST" - ], - "type": "PROCESS_GROUP" - }, - { - "conditions": [ + "enabled": true, + "entitySelector": "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag({{.compassIDs}}))" + }, { - "comparisonInfo": { - "negate": false, - "operator": "EQUALS", - "type": "TAG", - "value": { - "context": "CONTEXTLESS", - "key": "Component", - "value": "{{.tag}}" - } - }, - "key": { - "attribute": "HOST_TAGS" - } - } + "enabled": true, + "entitySelector": "type(PROCESS_GROUP_INSTANCE),tag({{.compassIDs}})" + }, + { + "enabled": true, + "entitySelector": "type(HOST),tag({{.compassIDs}})" + } ], - "enabled": true, - "type": "HOST" - } - ] + "rules": [] } \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_lsc-jr/management-zone/management-zone.yaml b/BMW-Dynatrace-config/CD_lsc-jr/management-zone/management-zone.yaml index b4aed0f9..51531899 100644 --- a/BMW-Dynatrace-config/CD_lsc-jr/management-zone/management-zone.yaml +++ b/BMW-Dynatrace-config/CD_lsc-jr/management-zone/management-zone.yaml @@ -3,4 +3,4 @@ config: CDnewComponentTag: - name: CD_lsc-jr -- tag: newComponentTag +- compassIDs: \"compass-id:lscjr\"