From ecdf04bb38fca08b3d96b889afde273c74be95bf Mon Sep 17 00:00:00 2001 From: qxz15oi Date: Tue, 13 Apr 2021 13:36:18 +0200 Subject: [PATCH] CD_ABC --- .../alerting-profile/alerting-profile.yaml | 60 ++++ .../alerting-profile/default.json | 103 ++++++ .../calculated-metrics-service/README.md | 10 + .../custom-service-java/README.md | 30 ++ .../custom-service-java.yaml | 9 + .../custom-service-java/template-1-1.json | 23 ++ .../CD_managementZone/dashboard/README.md | 13 + .../dashboard/dashboard.yaml | 127 ++++++++ .../CD_managementZone/dashboard/default.json | 308 ++++++++++++++++++ .../management-zone/README.md | 76 +++++ .../management-zone/default.json | 76 +++++ .../management-zone/management-zone.yaml | 6 + .../CD_managementZone/notification/README.md | 60 ++++ .../CD_managementZone/notification/email.json | 13 + .../notification/msTeams.json | 11 + .../notification/notification.yaml | 51 +++ .../synthetic-monitor/README.md | 37 +++ .../synthetic-monitor/default.json | 82 +++++ .../synthetic-monitor/synthetic-monitor.yaml | 10 + .../alerting-profile/alerting-profile.yaml | 60 ++++ .../CD_ABC/alerting-profile/default.json | 103 ++++++ .../calculated-metrics-service/README.md | 10 + .../CD_ABC/custom-service-java/README.md | 30 ++ .../custom-service-java.yaml | 9 + .../custom-service-java/template-1-1.json | 23 ++ .../CD_ABC/dashboard/README.md | 13 + .../CD_ABC/dashboard/dashboard.yaml | 127 ++++++++ .../CD_ABC/dashboard/default.json | 308 ++++++++++++++++++ .../CD_ABC/management-zone/README.md | 76 +++++ .../CD_ABC/management-zone/default.json | 76 +++++ .../management-zone/management-zone.yaml | 6 + .../CD_ABC/notification/README.md | 60 ++++ .../CD_ABC/notification/email.json | 13 + .../CD_ABC/notification/msTeams.json | 11 + .../CD_ABC/notification/notification.yaml | 51 +++ .../CD_ABC/synthetic-monitor/README.md | 37 +++ .../CD_ABC/synthetic-monitor/default.json | 82 +++++ .../synthetic-monitor/synthetic-monitor.yaml | 10 + 38 files changed, 2210 insertions(+) create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/alerting-profile.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/calculated-metrics-service/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/custom-service-java.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/template-1-1.json create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/dashboard.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/management-zone.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/email.json create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/msTeams.json create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/notification.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/synthetic-monitor.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/alerting-profile/alerting-profile.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/alerting-profile/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/calculated-metrics-service/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/custom-service-java/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/custom-service-java/custom-service-java.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/custom-service-java/template-1-1.json create mode 100644 BMW-Dynatrace-config/CD_ABC/dashboard/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/dashboard/dashboard.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/dashboard/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/management-zone/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/management-zone/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/management-zone/management-zone.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/notification/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/notification/email.json create mode 100644 BMW-Dynatrace-config/CD_ABC/notification/msTeams.json create mode 100644 BMW-Dynatrace-config/CD_ABC/notification/notification.yaml create mode 100644 BMW-Dynatrace-config/CD_ABC/synthetic-monitor/README.md create mode 100644 BMW-Dynatrace-config/CD_ABC/synthetic-monitor/default.json create mode 100644 BMW-Dynatrace-config/CD_ABC/synthetic-monitor/synthetic-monitor.yaml diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/alerting-profile.yaml b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/alerting-profile.yaml new file mode 100644 index 00000000..8e835837 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/alerting-profile.yaml @@ -0,0 +1,60 @@ +config: +- CDnewComponentTag-PROD: default.json +- CDnewComponentTag-INT: default.json + +#Prod alerting profiles for EMEA/NA/CN +#Dry-run needed for all hubs +CDnewComponentTag-PROD: +- name: CD_managementZone PROD +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: PROD +- skipDeployment: "true" +#Configuration +CDnewComponentTag-PROD.EMEA-Prod: +- name: CD_managementZone PROD +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: PROD +- skipDeployment: "false" +CDnewComponentTag-PROD.NA-Prod: +- name: CD_managementZone PROD +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: PROD +- skipDeployment: "false" +CDnewComponentTag-PROD.CN-Prod: +- name: CD_managementZone PROD +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: PROD +- skipDeployment: "false" + + +#INT alerting profiles for EMEA/NA/CN +#Dry-run needed for all hubs +CDnewComponentTag-INT: +- name: CD_managementZone INT +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- skipDeployment: "true" +#Configuration +CDnewComponentTag-INT.EMEA-PreProd: +- name: CD_managementZone INT +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- skipDeployment: "false" +CDnewComponentTag-INT.NA-PreProd: +- name: CD_managementZone INT +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- skipDeployment: "false" +CDnewComponentTag-INT.CN-PreProd: +- name: CD_managementZone INT +- tag: newComponentTag +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- skipDeployment: "false" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/default.json b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/default.json new file mode 100644 index 00000000..681a4c64 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/alerting-profile/default.json @@ -0,0 +1,103 @@ +{ + "displayName": "{{.name}}", + "eventTypeFilters": [], + "managementZoneId": "{{.mzId}}", + "mzId": "{{.mzId}}", + "rules": [ + { + "delayInMinutes": 0, + "severityLevel": "AVAILABILITY", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 10, + "severityLevel": "ERROR", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 30, + "severityLevel": "PERFORMANCE", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 30, + "severityLevel": "RESOURCE_CONTENTION", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 10, + "severityLevel": "CUSTOM_ALERT", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/calculated-metrics-service/README.md b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/calculated-metrics-service/README.md new file mode 100644 index 00000000..0bf8efbc --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/calculated-metrics-service/README.md @@ -0,0 +1,10 @@ +## Custom metrics - Multidimensional Analysis + +Under the Multidimensional Analysis you're able to save a view but not to create a metric. Instead, you can do it in here: + +1. Create the metric within the Dynatrace UI using the Mutidimensional Analysis view. +2. Save the view and create a ticket for the OPAPM team [here](link). Please provide the following information: + - View created in the Dynatrace UI + - Your Dynatrace configuration folder (i.e. CD_) + +The OPAPM team will proceed creating the metric and updating your configuration in monaco. \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/README.md b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/README.md new file mode 100644 index 00000000..d41c4c77 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/README.md @@ -0,0 +1,30 @@ + +## What is a custom service in Dynatrace? +- *If your application's services aren't built on standard technologies, they may not be recognized out-of-the box.* +- *You can monitor these technologies, but you'll need to define them as custom services with specific service entry points.* +- *Another use case for custom services are microservices that are used by a larger application that aren't exposed via communication technologies.* + +## How to create a custom service? +1. Open the file *custom-service-java.yaml* under your *CD_/custom-service-java* configuration folder. +2. Use customService1 as a template. Copy and paste it below, changing the skipDeployment to "false". +3. Fill up all the remaining inputs with the details of the endpoint you're interested to monitor. (className, methodName, etc...) +4. Commit and pull request to merge the branch to the master: + `git add ` + `git commit -m " configuration changes"` + `git push -u origin ` +5. Restart the application where the custom service has been created. +6. Check if the custom service appears in Dynatrace. + +Notes: + - As this configuration needs a restart, it's better to create it in a non-Prod application. + - The custom service will appear in Dynatrace iff there's traffic going through. + +## What if i have multiple classes? +1. Clone *template-1-1.json* to a new one called *template-2-1.json*. +2. Edit *template-2-1.json* adding a 2nd rule separated with a coma. +3. For the 2nd rule, change the name of the {{.values}} to {{.values2}} i.e. +4. The template is ready to be used in the YAML file. + +## What if i have multiple methods? +1. Same process as before, just call it template-1-2.json +2. In this way you can extend to a custom service with n classes and k methods: template-n-k.json \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/custom-service-java.yaml b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/custom-service-java.yaml new file mode 100644 index 00000000..25f8a028 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/custom-service-java.yaml @@ -0,0 +1,9 @@ +config: +- customService1: template-1-1.json + +customService1: +- name: myJOYNRService +- className: com.bmw.cc.conn.this.is.just.an.exampleClasss +- methodName: exampleJoynrMethod +- returnType: void +- skipDeployment: "true" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/template-1-1.json b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/template-1-1.json new file mode 100644 index 00000000..b3003515 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/custom-service-java/template-1-1.json @@ -0,0 +1,23 @@ +{ + "enabled": true, + "name": "{{.name}}", + "processGroups": [], + "queueEntryPoint": false, + "queueEntryPointType": null, + "rules": [ + { + "annotations": [], + "className": "{{.className}}", + "enabled": true, + "fileName": "", + "matcher": "EQUALS", + "methodRules": [ + { + "argumentTypes": [], + "methodName": "{{.methodName}}", + "returnType": "{{.returnType}}" + } + ] + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/README.md b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/README.md new file mode 100644 index 00000000..dffcdc8a --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/README.md @@ -0,0 +1,13 @@ +## 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 diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/dashboard.yaml b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/dashboard.yaml new file mode 100644 index 00000000..4f45d440 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/dashboard.yaml @@ -0,0 +1,127 @@ +config: +- CDnewComponentTag-PROD: default.json +- CDnewComponentTag-E2E: default.json +- CDnewComponentTag-INT: default.json +- CDnewComponentTag-TEST: default.json + +#PROD dashboards for EMEA/NA/CN Prod +#Dry-run needed for all hubs +CDnewComponentTag-PROD: +- name: CD_managementZone PROD +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: PROD +- skipDeployment: "true" +#Configuration +CDnewComponentTag-PROD.EMEA-Prod: +- name: CD_managementZone PROD +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- tag: newComponentTag +- env: PROD +- skipDeployment: "false" +CDnewComponentTag-PROD.NA-Prod: +- name: CD_managementZone PROD +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- tag: newComponentTag +- env: PROD +- skipDeployment: "false" +CDnewComponentTag-PROD.CN-Prod: +- name: CD_managementZone PROD +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- tag: newComponentTag +- env: PROD +- skipDeployment: "false" + +#E2E dashboards for EMEA/NA/CN E2E +#Dry-run needed for all hubs +CDnewComponentTag-E2E: +- name: CD_managementZone E2E +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: E2E +- skipDeployment: "true" +#Configuration +CDnewComponentTag-E2E.EMEA-Prod: +- name: CD_managementZone E2E +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: E2E +- tag: newComponentTag +- skipDeployment: "true" +CDnewComponentTag-E2E.NA-Prod: +- name: CD_managementZone E2E +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: E2E +- tag: newComponentTag +- skipDeployment: "true" +CDnewComponentTag-E2E.CN-Prod: +- name: CD_managementZone E2E +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: E2E +- tag: newComponentTag +- skipDeployment: "true" + +#INT dashboards for EMEA/NA/CN +#Dry-run needed for all hubs +CDnewComponentTag-INT: +- name: CD_managementZone INT +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- tag: newComponentTag +- skipDeployment: "true" +#Configuration +CDnewComponentTag-INT.EMEA-PreProd: +- name: CD_managementZone INT +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- tag: newComponentTag +- skipDeployment: "false" +CDnewComponentTag-INT.NA-PreProd: +- name: CD_managementZone INT +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- skipDeployment: "false" +CDnewComponentTag-INT.CN-PreProd: +- name: CD_managementZone INT +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: INT +- skipDeployment: "false" + +#TEST dashboards for EMEA/NA/CN +#Dry-run needed for all hubs +CDnewComponentTag-TEST: +- name: CD_managementZone TEST +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- tag: newComponentTag +- env: TEST +- skipDeployment: "true" +#Configuration +CDnewComponentTag-TEST.EMEA-PreProd: +- name: CD_managementZone TEST +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- tag: newComponentTag +- env: TEST +- skipDeployment: "false" +CDnewComponentTag-TEST.NA-PreProd: +- name: CD_managementZone TEST +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: TEST +- skipDeployment: "false" +CDnewComponentTag-TEST.CN-PreProd: +- name: CD_managementZone TEST +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- env: TEST +- skipDeployment: "false" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/default.json b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/default.json new file mode 100644 index 00000000..6c685810 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/dashboard/default.json @@ -0,0 +1,308 @@ +{ + "metadata": { + "configurationVersions": [ + 3 + ], + "clusterVersion": "1.214.107.20210407-223952" + }, + "dashboardMetadata": { + "name": "{{.name}}", + "shared": true, + "owner": "Ignacio.Goldman@partner.bmwgroup.com", + "dashboardFilter": { + "timeframe": "-24h to now" + }, + "tags": [ + "{{.tag}}" + ] + }, + "tiles": [ + { + "name": "Custom chart", + "tileType": "CUSTOM_CHARTING", + "configured": true, + "bounds": { + "top": 228, + "left": 38, + "width": 1064, + "height": 304 + }, + "tileFilter": {}, + "filterConfig": { + "type": "MIXED", + "customName": "Failure rate (HTTP 4xx/5xx errors)", + "defaultName": "Custom chart", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [ + { + "metric": "builtin:service.errors.fourxx.rate", + "aggregation": "AVG", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": false, + "aggregationRate": "TOTAL" + }, + { + "metric": "builtin:service.errors.fivexx.rate", + "aggregation": "AVG", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": true, + "aggregationRate": "TOTAL" + } + ], + "resultMetadata": { + "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE": { + "lastModified": 1617956393463, + "customColor": "#ff0000" + }, + "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE": { + "lastModified": 1617956441725, + "customColor": "#fff29a" + } + } + }, + "filtersPerEntityType": { + "SERVICE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + } + }, + { + "name": "Problems", + "tileType": "OPEN_PROBLEMS", + "configured": true, + "bounds": { + "top": 38, + "left": 950, + "width": 152, + "height": 152 + }, + "tileFilter": { + "managementZone": { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + } + }, + { + "name": "Overall Health", + "tileType": "HEADER", + "configured": true, + "bounds": { + "top": 0, + "left": 38, + "width": 1064, + "height": 38 + }, + "tileFilter": {} + }, + { + "name": "Markdown", + "tileType": "MARKDOWN", + "configured": true, + "bounds": { + "top": 532, + "left": 38, + "width": 1064, + "height": 38 + }, + "tileFilter": {}, + "markdown": "---\n" + }, + { + "name": "Custom chart", + "tileType": "CUSTOM_CHARTING", + "configured": true, + "bounds": { + "top": 570, + "left": 38, + "width": 1064, + "height": 304 + }, + "tileFilter": {}, + "filterConfig": { + "type": "MIXED", + "customName": "Response time, Request Count and Number of Errors", + "defaultName": "Custom chart", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [ + { + "metric": "builtin:service.response.time", + "aggregation": "AVG", + "type": "LINE", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": false, + "aggregationRate": "TOTAL" + }, + { + "metric": "builtin:service.requestCount.total", + "aggregation": "NONE", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": false, + "aggregationRate": "TOTAL" + }, + { + "metric": "builtin:service.errors.total.count", + "aggregation": "NONE", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": true, + "aggregationRate": "TOTAL" + } + ], + "resultMetadata": { + "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE": { + "lastModified": 1595275720776, + "customColor": "#008cdb" + }, + "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE": { + "lastModified": 1595275955999, + "customColor": "#ef651f" + }, + "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE": { + "lastModified": 1595275686773, + "customColor": "#b4e5f9" + } + } + }, + "filtersPerEntityType": { + "SERVICE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + } + }, + { + "name": "Markdown", + "tileType": "MARKDOWN", + "configured": true, + "bounds": { + "top": 190, + "left": 38, + "width": 1064, + "height": 38 + }, + "tileFilter": {}, + "markdown": "---\n" + }, + { + "name": "", + "tileType": "DATABASES_OVERVIEW", + "configured": true, + "bounds": { + "top": 38, + "left": 646, + "width": 190, + "height": 152 + }, + "tileFilter": {}, + "filterConfig": { + "type": "DATABASE", + "customName": "Databases", + "defaultName": "Databases", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [], + "resultMetadata": {} + }, + "filtersPerEntityType": { + "DATABASE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + }, + "chartVisible": true + }, + { + "name": "", + "tileType": "SERVICES", + "configured": true, + "bounds": { + "top": 38, + "left": 342, + "width": 190, + "height": 152 + }, + "tileFilter": {}, + "filterConfig": { + "type": "SERVICE", + "customName": "Services", + "defaultName": "Services", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [], + "resultMetadata": {} + }, + "filtersPerEntityType": { + "SERVICE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + }, + "chartVisible": true + }, + { + "name": "", + "tileType": "HOSTS", + "configured": true, + "bounds": { + "top": 38, + "left": 38, + "width": 190, + "height": 152 + }, + "tileFilter": {}, + "filterConfig": { + "type": "HOST", + "customName": "Hosts", + "defaultName": "Hosts", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [], + "resultMetadata": {} + }, + "filtersPerEntityType": { + "HOST": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + }, + "chartVisible": true + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/README.md b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/README.md new file mode 100644 index 00000000..3244b3e6 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/README.md @@ -0,0 +1,76 @@ +## Management Zones configuration + +### Excluding noisy services + +*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. diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/default.json b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/default.json new file mode 100644 index 00000000..e827aaff --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/default.json @@ -0,0 +1,76 @@ +{ + "dimensionalRules": [], + "name": "{{.name}}", + "rules": [ + { + "conditions": [ + { + "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": [ + { + "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": [ + { + "comparisonInfo": { + "negate": false, + "operator": "EQUALS", + "type": "TAG", + "value": { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + } + }, + "key": { + "attribute": "HOST_TAGS" + } + } + ], + "enabled": true, + "type": "HOST" + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/management-zone.yaml b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/management-zone.yaml new file mode 100644 index 00000000..635e9e71 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/management-zone/management-zone.yaml @@ -0,0 +1,6 @@ +config: +- CDnewComponentTag: default.json + +CDnewComponentTag: +- name: CD_managementZone +- tag: newComponentTag diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/README.md b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/README.md new file mode 100644 index 00000000..e1a6af84 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/README.md @@ -0,0 +1,60 @@ + +## Configure Notification System + +### MS Teams - Default + +*Let's suppose you would like to start receiving alerts from Dynatrace via MS Teams just for your *EMEA PROD*.* + +1. Open *notification.yaml* under your application configuration folder. By default, all notification systems are configured via MS Teams with an +https://empty webhook (not configured). +2. Create an incoming webhook in MS Teams. [How to?](https://www.dynatrace.com/support/help/shortlink/set-up-msteams-integration#configuration-in-microsoft-teams) +3. Add the incoming webhook under the webhook parameter for the `-PROD.EMEA-Prod`: + ``` + -PROD.EMEA-Prod: + - name: CD_ PROD + - alertingProfile: CD_/alerting-profile/CD-PROD.id + - webhook: + - skipDeployment: "false" + ``` +4. Save and commit changes: + ``` + git add + git commit -m " configuration changes" + git push -u origin + ``` +Note: If you want to enable MS Teams for any other hub/stage, follow the same steps but make sure you're under the right configuration: +`-.-:` + +### Email + +*The team prefers to be alerted via email, not MS Teams* + +1. Keep the MS Teams integration disabled, with the https://empty webhook: + ``` + -PROD.EMEA-Prod: + - name: CD_ PROD + - alertingProfile: CD_/alerting-profile/CD-PROD.id + - webhook: https://empty + - skipDeployment: "false" + ``` +2. Create a new configuration template under config, using the email template: + ``` + config: + - CDemail: email.json + ``` +3. Describe the configuration below, using the following template: + ``` + CDemail.EMEA-Prod: + - name: CD_ PROD + - alertingProfile: CD_/alerting-profile/CD-PROD.id + - receivers: distributionEmailexample@bmw.de` + ``` +4. Save and commit changes: + ``` + git add + git commit -m " configuration changes" + git push -u origin + ``` + +### ITSM +Coming soon! \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/email.json b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/email.json new file mode 100644 index 00000000..486642a7 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/email.json @@ -0,0 +1,13 @@ +{ + "active": true, + "alertingProfile": "{{.alertingProfile}}", + "bccReceivers": [], + "body": "{ProblemDetailsHTML}", + "ccReceivers": [], + "name": "{{.name}}", + "receivers": [ + "{{.receivers}}" + ], + "subject": "{State} Problem {ProblemID}: {ImpactedEntity}", + "type": "EMAIL" +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/msTeams.json b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/msTeams.json new file mode 100644 index 00000000..33e92cf6 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/msTeams.json @@ -0,0 +1,11 @@ +{ + "acceptAnyCertificate": false, + "active": true, + "alertingProfile": "{{.alertingProfile}}", + "headers": [], + "name": "{{.name}}", + "notifyEventMergesEnabled": false, + "payload": "{\n\"title\":\"{ProblemTitle}\",\n\"text\":\"{ProblemDetailsHTML}\",\n\"themeColor\":\"EA4300\"\n}", + "type": "WEBHOOK", + "url": "{{.webhook}}" +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/notification.yaml b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/notification.yaml new file mode 100644 index 00000000..2d6336ae --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/notification/notification.yaml @@ -0,0 +1,51 @@ +config: +- CDnewComponentTag-PROD: msTeams.json +- CDnewComponentTag-INT: msTeams.json + +#Prod notification system for EMEA/NA/CN +#Dry-run needed for all hubs +CDnewComponentTag-PROD: +- name: CD_managementZone PROD +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "true" +#Configuration +CDnewComponentTag-PROD.EMEA-Prod: +- name: CD_managementZone PROD +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-PROD.NA-Prod: +- name: CD_managementZone PROD +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-PROD.CN-Prod: +- name: CD_managementZone PROD +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "false" + +#INT notification system for EMEA/NA/CN +#Dry-run needed for all hubs +CDnewComponentTag-INT: +- name: CD_managementZone INT +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "true" +#Configuration +CDnewComponentTag-INT.EMEA-PreProd: +- name: CD_managementZone INT +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-INT.NA-PreProd: +- name: CD_managementZone INT +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-INT.CN-PreProd: +- name: CD_managementZone INT +- alertingProfile: CD_managementZone/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "false" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/README.md b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/README.md new file mode 100644 index 00000000..92e734fa --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/README.md @@ -0,0 +1,37 @@ +# Synthetic Configuration + +To calculate the Availability KPI, a synthetic must be configured. + +1. Modify the synthetic-monitor.yaml file, providing: + - **Endpoint**: url intended to check the availability. + - **Location**: + - *synthetic private location*: If the endpoint is reachable within the BMW network. + ``` + - location: BMW-Dynatrace-config/00_Global-Config/synthetic-location/BMW-AWS-Frankfurt.id + ``` + - *synthetic public location*: If the endpoint is reachable from the internet. + ``` + - location: GEOLOCATION-45AB48D9D6925ECC + ``` +2. Change `skipDeployment` to false. + +i.e. +``` +config: +- my-synthetic: default.json + +my-synthetic: +- name: CD_BMW - bmw.com +- mzName: CD_google/management-zone/CDgoogle.name +- mzId: CD_google/management-zone/CDgoogle.id +- endpoint: https://google.com +- location: GEOLOCATION-45AB48D9D6925ECC +- skipDeployment: "false" +``` + +3. 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 diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/default.json b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/default.json new file mode 100644 index 00000000..cf83039b --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/default.json @@ -0,0 +1,82 @@ +{ + "anomalyDetection": { + "loadingTimeThresholds": { + "enabled": false, + "thresholds": [ + { + "type": "TOTAL", + "valueMs": 0 + } + ] + }, + "outageHandling": { + "globalOutage": true, + "localOutage": false, + "localOutagePolicy": { + "affectedLocations": 1, + "consecutiveRuns": 3 + } + } + }, + "automaticallyAssignedApps": [], + "enabled": true, + "frequencyMin": 1, + "locations": [ + "{{.location}}" + ], + "managementZones": [ + { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + ], + "manuallyAssignedApps": [], + "name": "{{.name}}", + "requests": [ + { + "entityId": "HTTP_CHECK_STEP-0BA53EC80CD7EE5A", + "name": "{{.name}}", + "sequenceNumber": 1 + } + ], + "script": { + "requests": [ + { + "configuration": { + "acceptAnyCertificate": true, + "followRedirects": true, + "requestHeaders": [ + { + "name": "accept", + "value": "application/json" + }, + { + "name": "Content-Type", + "value": "application/json" + }, + { + "name": "api_key", + "value": "355DE89C-7B72-4EA3-BDD8-157C79EB2C23" + } + ] + }, + "description": "{{.name}}", + "method": "GET", + "url": "{{.endpoint}}", + "validation": { + "rules": [ + { + "passIfFound": true, + "type": "httpStatusesList", + "value": "200" + } + ], + "rulesChaining": "or" + } + } + ], + "version": "1.0" + }, + "tags": [], + "type": "HTTP" +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/synthetic-monitor.yaml b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/synthetic-monitor.yaml new file mode 100644 index 00000000..0ffabf57 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/CD_managementZone/synthetic-monitor/synthetic-monitor.yaml @@ -0,0 +1,10 @@ +config: +- newComponentTag: default.json + +newComponentTag: +- name: CD_managementZone - +- mzName: CD_managementZone/management-zone/CDnewComponentTag.name +- mzId: CD_managementZone/management-zone/CDnewComponentTag.id +- endpoint: +- location: +- skipDeployment: "true" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/alerting-profile/alerting-profile.yaml b/BMW-Dynatrace-config/CD_ABC/alerting-profile/alerting-profile.yaml new file mode 100644 index 00000000..f3f015a6 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/alerting-profile/alerting-profile.yaml @@ -0,0 +1,60 @@ +config: +- CDabc-PROD: default.json +- CDabc-INT: default.json + +#Prod alerting profiles for EMEA/NA/CN +#Dry-run needed for all hubs +CDabc-PROD: +- name: CD_ABC PROD +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: PROD +- skipDeployment: "true" +#Configuration +CDabc-PROD.EMEA-Prod: +- name: CD_ABC PROD +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: PROD +- skipDeployment: "false" +CDabc-PROD.NA-Prod: +- name: CD_ABC PROD +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: PROD +- skipDeployment: "false" +CDabc-PROD.CN-Prod: +- name: CD_ABC PROD +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: PROD +- skipDeployment: "false" + + +#INT alerting profiles for EMEA/NA/CN +#Dry-run needed for all hubs +CDabc-INT: +- name: CD_ABC INT +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- skipDeployment: "true" +#Configuration +CDabc-INT.EMEA-PreProd: +- name: CD_ABC INT +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- skipDeployment: "false" +CDabc-INT.NA-PreProd: +- name: CD_ABC INT +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- skipDeployment: "false" +CDabc-INT.CN-PreProd: +- name: CD_ABC INT +- tag: abc +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- skipDeployment: "false" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/alerting-profile/default.json b/BMW-Dynatrace-config/CD_ABC/alerting-profile/default.json new file mode 100644 index 00000000..681a4c64 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/alerting-profile/default.json @@ -0,0 +1,103 @@ +{ + "displayName": "{{.name}}", + "eventTypeFilters": [], + "managementZoneId": "{{.mzId}}", + "mzId": "{{.mzId}}", + "rules": [ + { + "delayInMinutes": 0, + "severityLevel": "AVAILABILITY", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 10, + "severityLevel": "ERROR", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 30, + "severityLevel": "PERFORMANCE", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 30, + "severityLevel": "RESOURCE_CONTENTION", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + }, + { + "delayInMinutes": 10, + "severityLevel": "CUSTOM_ALERT", + "tagFilter": { + "includeMode": "INCLUDE_ALL", + "tagFilters": [ + { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + }, + { + "context": "CONTEXTLESS", + "key": "Environment", + "value": "{{.env}}" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/calculated-metrics-service/README.md b/BMW-Dynatrace-config/CD_ABC/calculated-metrics-service/README.md new file mode 100644 index 00000000..0bf8efbc --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/calculated-metrics-service/README.md @@ -0,0 +1,10 @@ +## Custom metrics - Multidimensional Analysis + +Under the Multidimensional Analysis you're able to save a view but not to create a metric. Instead, you can do it in here: + +1. Create the metric within the Dynatrace UI using the Mutidimensional Analysis view. +2. Save the view and create a ticket for the OPAPM team [here](link). Please provide the following information: + - View created in the Dynatrace UI + - Your Dynatrace configuration folder (i.e. CD_) + +The OPAPM team will proceed creating the metric and updating your configuration in monaco. \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/custom-service-java/README.md b/BMW-Dynatrace-config/CD_ABC/custom-service-java/README.md new file mode 100644 index 00000000..d41c4c77 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/custom-service-java/README.md @@ -0,0 +1,30 @@ + +## What is a custom service in Dynatrace? +- *If your application's services aren't built on standard technologies, they may not be recognized out-of-the box.* +- *You can monitor these technologies, but you'll need to define them as custom services with specific service entry points.* +- *Another use case for custom services are microservices that are used by a larger application that aren't exposed via communication technologies.* + +## How to create a custom service? +1. Open the file *custom-service-java.yaml* under your *CD_/custom-service-java* configuration folder. +2. Use customService1 as a template. Copy and paste it below, changing the skipDeployment to "false". +3. Fill up all the remaining inputs with the details of the endpoint you're interested to monitor. (className, methodName, etc...) +4. Commit and pull request to merge the branch to the master: + `git add ` + `git commit -m " configuration changes"` + `git push -u origin ` +5. Restart the application where the custom service has been created. +6. Check if the custom service appears in Dynatrace. + +Notes: + - As this configuration needs a restart, it's better to create it in a non-Prod application. + - The custom service will appear in Dynatrace iff there's traffic going through. + +## What if i have multiple classes? +1. Clone *template-1-1.json* to a new one called *template-2-1.json*. +2. Edit *template-2-1.json* adding a 2nd rule separated with a coma. +3. For the 2nd rule, change the name of the {{.values}} to {{.values2}} i.e. +4. The template is ready to be used in the YAML file. + +## What if i have multiple methods? +1. Same process as before, just call it template-1-2.json +2. In this way you can extend to a custom service with n classes and k methods: template-n-k.json \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/custom-service-java/custom-service-java.yaml b/BMW-Dynatrace-config/CD_ABC/custom-service-java/custom-service-java.yaml new file mode 100644 index 00000000..25f8a028 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/custom-service-java/custom-service-java.yaml @@ -0,0 +1,9 @@ +config: +- customService1: template-1-1.json + +customService1: +- name: myJOYNRService +- className: com.bmw.cc.conn.this.is.just.an.exampleClasss +- methodName: exampleJoynrMethod +- returnType: void +- skipDeployment: "true" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/custom-service-java/template-1-1.json b/BMW-Dynatrace-config/CD_ABC/custom-service-java/template-1-1.json new file mode 100644 index 00000000..b3003515 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/custom-service-java/template-1-1.json @@ -0,0 +1,23 @@ +{ + "enabled": true, + "name": "{{.name}}", + "processGroups": [], + "queueEntryPoint": false, + "queueEntryPointType": null, + "rules": [ + { + "annotations": [], + "className": "{{.className}}", + "enabled": true, + "fileName": "", + "matcher": "EQUALS", + "methodRules": [ + { + "argumentTypes": [], + "methodName": "{{.methodName}}", + "returnType": "{{.returnType}}" + } + ] + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/dashboard/README.md b/BMW-Dynatrace-config/CD_ABC/dashboard/README.md new file mode 100644 index 00000000..dffcdc8a --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/dashboard/README.md @@ -0,0 +1,13 @@ +## 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 diff --git a/BMW-Dynatrace-config/CD_ABC/dashboard/dashboard.yaml b/BMW-Dynatrace-config/CD_ABC/dashboard/dashboard.yaml new file mode 100644 index 00000000..8a89c6c8 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/dashboard/dashboard.yaml @@ -0,0 +1,127 @@ +config: +- CDabc-PROD: default.json +- CDabc-E2E: default.json +- CDabc-INT: default.json +- CDabc-TEST: default.json + +#PROD dashboards for EMEA/NA/CN Prod +#Dry-run needed for all hubs +CDabc-PROD: +- name: CD_ABC PROD +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: PROD +- skipDeployment: "true" +#Configuration +CDabc-PROD.EMEA-Prod: +- name: CD_ABC PROD +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- tag: abc +- env: PROD +- skipDeployment: "false" +CDabc-PROD.NA-Prod: +- name: CD_ABC PROD +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- tag: abc +- env: PROD +- skipDeployment: "false" +CDabc-PROD.CN-Prod: +- name: CD_ABC PROD +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- tag: abc +- env: PROD +- skipDeployment: "false" + +#E2E dashboards for EMEA/NA/CN E2E +#Dry-run needed for all hubs +CDabc-E2E: +- name: CD_ABC E2E +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: E2E +- skipDeployment: "true" +#Configuration +CDabc-E2E.EMEA-Prod: +- name: CD_ABC E2E +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: E2E +- tag: abc +- skipDeployment: "false" +CDabc-E2E.NA-Prod: +- name: CD_ABC E2E +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: E2E +- tag: abc +- skipDeployment: "false" +CDabc-E2E.CN-Prod: +- name: CD_ABC E2E +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: E2E +- tag: abc +- skipDeployment: "false" + +#INT dashboards for EMEA/NA/CN +#Dry-run needed for all hubs +CDabc-INT: +- name: CD_ABC INT +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- tag: abc +- skipDeployment: "true" +#Configuration +CDabc-INT.EMEA-PreProd: +- name: CD_ABC INT +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- tag: abc +- skipDeployment: "false" +CDabc-INT.NA-PreProd: +- name: CD_ABC INT +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- skipDeployment: "false" +CDabc-INT.CN-PreProd: +- name: CD_ABC INT +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: INT +- skipDeployment: "false" + +#TEST dashboards for EMEA/NA/CN +#Dry-run needed for all hubs +CDabc-TEST: +- name: CD_ABC TEST +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- tag: abc +- env: TEST +- skipDeployment: "true" +#Configuration +CDabc-TEST.EMEA-PreProd: +- name: CD_ABC TEST +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- tag: abc +- env: TEST +- skipDeployment: "false" +CDabc-TEST.NA-PreProd: +- name: CD_ABC TEST +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: TEST +- skipDeployment: "false" +CDabc-TEST.CN-PreProd: +- name: CD_ABC TEST +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- env: TEST +- skipDeployment: "false" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/dashboard/default.json b/BMW-Dynatrace-config/CD_ABC/dashboard/default.json new file mode 100644 index 00000000..d559cd04 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/dashboard/default.json @@ -0,0 +1,308 @@ +{ + "metadata": { + "configurationVersions": [ + 3 + ], + "clusterVersion": "1.214.107.20210407-223952" + }, + "dashboardMetadata": { + "name": "{{.name}}", + "shared": true, + "owner": "Ignacio.Goldman@partner.bmwgroup.com", + "dashboardFilter": { + "timeframe": "-24h to now" + }, + "tags": [ + "{{.tag}}" + ] + }, + "tiles": [ + { + "name": "Custom chart", + "tileType": "CUSTOM_CHARTING", + "configured": true, + "bounds": { + "top": 228, + "left": 38, + "width": 1064, + "height": 304 + }, + "tileFilter": {}, + "filterConfig": { + "type": "MIXED", + "customName": "Failure rate (HTTP 4xx/5xx errors)", + "defaultName": "Custom chart", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [ + { + "metric": "builtin:service.errors.fourxx.rate", + "aggregation": "AVG", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": false, + "aggregationRate": "TOTAL" + }, + { + "metric": "builtin:service.errors.fivexx.rate", + "aggregation": "AVG", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": true, + "aggregationRate": "TOTAL" + } + ], + "resultMetadata": { + "nullbuiltin:service.errors.fivexx.rate|AVG|TOTAL|BAR|SERVICE": { + "lastModified": 1617956393463, + "customColor": "#ff0000" + }, + "nullbuiltin:service.errors.fourxx.rate|AVG|TOTAL|BAR|SERVICE": { + "lastModified": 1617956441725, + "customColor": "#fff29a" + } + } + }, + "filtersPerEntityType": { + "SERVICE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + } + }, + { + "name": "Problems", + "tileType": "OPEN_PROBLEMS", + "configured": true, + "bounds": { + "top": 38, + "left": 950, + "width": 152, + "height": 152 + }, + "tileFilter": { + "managementZone": { + "id": "3832313249744862960", + "name": "CD_vehicle-service" + } + } + }, + { + "name": "Overall Health", + "tileType": "HEADER", + "configured": true, + "bounds": { + "top": 0, + "left": 38, + "width": 1064, + "height": 38 + }, + "tileFilter": {} + }, + { + "name": "Markdown", + "tileType": "MARKDOWN", + "configured": true, + "bounds": { + "top": 532, + "left": 38, + "width": 1064, + "height": 38 + }, + "tileFilter": {}, + "markdown": "---\n" + }, + { + "name": "Custom chart", + "tileType": "CUSTOM_CHARTING", + "configured": true, + "bounds": { + "top": 570, + "left": 38, + "width": 1064, + "height": 304 + }, + "tileFilter": {}, + "filterConfig": { + "type": "MIXED", + "customName": "Response time, Request Count and Number of Errors", + "defaultName": "Custom chart", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [ + { + "metric": "builtin:service.response.time", + "aggregation": "AVG", + "type": "LINE", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": false, + "aggregationRate": "TOTAL" + }, + { + "metric": "builtin:service.requestCount.total", + "aggregation": "NONE", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": false, + "aggregationRate": "TOTAL" + }, + { + "metric": "builtin:service.errors.total.count", + "aggregation": "NONE", + "type": "BAR", + "entityType": "SERVICE", + "dimensions": [], + "sortAscending": false, + "sortColumn": true, + "aggregationRate": "TOTAL" + } + ], + "resultMetadata": { + "nullbuiltin:service.requestCount.total|NONE|TOTAL|BAR|SERVICE": { + "lastModified": 1595275720776, + "customColor": "#008cdb" + }, + "nullbuiltin:service.errors.total.count|NONE|TOTAL|BAR|SERVICE": { + "lastModified": 1595275955999, + "customColor": "#ef651f" + }, + "nullbuiltin:service.response.time|AVG|TOTAL|LINE|SERVICE": { + "lastModified": 1595275686773, + "customColor": "#b4e5f9" + } + } + }, + "filtersPerEntityType": { + "SERVICE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + } + }, + { + "name": "Markdown", + "tileType": "MARKDOWN", + "configured": true, + "bounds": { + "top": 190, + "left": 38, + "width": 1064, + "height": 38 + }, + "tileFilter": {}, + "markdown": "---\n" + }, + { + "name": "", + "tileType": "DATABASES_OVERVIEW", + "configured": true, + "bounds": { + "top": 38, + "left": 646, + "width": 190, + "height": 152 + }, + "tileFilter": {}, + "filterConfig": { + "type": "DATABASE", + "customName": "Databases", + "defaultName": "Databases", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [], + "resultMetadata": {} + }, + "filtersPerEntityType": { + "DATABASE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + }, + "chartVisible": true + }, + { + "name": "", + "tileType": "SERVICES", + "configured": true, + "bounds": { + "top": 38, + "left": 342, + "width": 190, + "height": 152 + }, + "tileFilter": {}, + "filterConfig": { + "type": "SERVICE", + "customName": "Services", + "defaultName": "Services", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [], + "resultMetadata": {} + }, + "filtersPerEntityType": { + "SERVICE": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + }, + "chartVisible": true + }, + { + "name": "", + "tileType": "HOSTS", + "configured": true, + "bounds": { + "top": 38, + "left": 38, + "width": 190, + "height": 152 + }, + "tileFilter": {}, + "filterConfig": { + "type": "HOST", + "customName": "Hosts", + "defaultName": "Hosts", + "chartConfig": { + "legendShown": true, + "type": "TIMESERIES", + "series": [], + "resultMetadata": {} + }, + "filtersPerEntityType": { + "HOST": { + "AUTO_TAGS": [ + "Environment:{{.env}}", + "Component:{{.tag}}" + ] + } + } + }, + "chartVisible": true + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/management-zone/README.md b/BMW-Dynatrace-config/CD_ABC/management-zone/README.md new file mode 100644 index 00000000..3244b3e6 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/management-zone/README.md @@ -0,0 +1,76 @@ +## Management Zones configuration + +### Excluding noisy services + +*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. diff --git a/BMW-Dynatrace-config/CD_ABC/management-zone/default.json b/BMW-Dynatrace-config/CD_ABC/management-zone/default.json new file mode 100644 index 00000000..e827aaff --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/management-zone/default.json @@ -0,0 +1,76 @@ +{ + "dimensionalRules": [], + "name": "{{.name}}", + "rules": [ + { + "conditions": [ + { + "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": [ + { + "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": [ + { + "comparisonInfo": { + "negate": false, + "operator": "EQUALS", + "type": "TAG", + "value": { + "context": "CONTEXTLESS", + "key": "Component", + "value": "{{.tag}}" + } + }, + "key": { + "attribute": "HOST_TAGS" + } + } + ], + "enabled": true, + "type": "HOST" + } + ] +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/management-zone/management-zone.yaml b/BMW-Dynatrace-config/CD_ABC/management-zone/management-zone.yaml new file mode 100644 index 00000000..96066fa6 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/management-zone/management-zone.yaml @@ -0,0 +1,6 @@ +config: +- CDabc: default.json + +CDabc: +- name: CD_ABC +- tag: abc diff --git a/BMW-Dynatrace-config/CD_ABC/notification/README.md b/BMW-Dynatrace-config/CD_ABC/notification/README.md new file mode 100644 index 00000000..e1a6af84 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/notification/README.md @@ -0,0 +1,60 @@ + +## Configure Notification System + +### MS Teams - Default + +*Let's suppose you would like to start receiving alerts from Dynatrace via MS Teams just for your *EMEA PROD*.* + +1. Open *notification.yaml* under your application configuration folder. By default, all notification systems are configured via MS Teams with an +https://empty webhook (not configured). +2. Create an incoming webhook in MS Teams. [How to?](https://www.dynatrace.com/support/help/shortlink/set-up-msteams-integration#configuration-in-microsoft-teams) +3. Add the incoming webhook under the webhook parameter for the `-PROD.EMEA-Prod`: + ``` + -PROD.EMEA-Prod: + - name: CD_ PROD + - alertingProfile: CD_/alerting-profile/CD-PROD.id + - webhook: + - skipDeployment: "false" + ``` +4. Save and commit changes: + ``` + git add + git commit -m " configuration changes" + git push -u origin + ``` +Note: If you want to enable MS Teams for any other hub/stage, follow the same steps but make sure you're under the right configuration: +`-.-:` + +### Email + +*The team prefers to be alerted via email, not MS Teams* + +1. Keep the MS Teams integration disabled, with the https://empty webhook: + ``` + -PROD.EMEA-Prod: + - name: CD_ PROD + - alertingProfile: CD_/alerting-profile/CD-PROD.id + - webhook: https://empty + - skipDeployment: "false" + ``` +2. Create a new configuration template under config, using the email template: + ``` + config: + - CDemail: email.json + ``` +3. Describe the configuration below, using the following template: + ``` + CDemail.EMEA-Prod: + - name: CD_ PROD + - alertingProfile: CD_/alerting-profile/CD-PROD.id + - receivers: distributionEmailexample@bmw.de` + ``` +4. Save and commit changes: + ``` + git add + git commit -m " configuration changes" + git push -u origin + ``` + +### ITSM +Coming soon! \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/notification/email.json b/BMW-Dynatrace-config/CD_ABC/notification/email.json new file mode 100644 index 00000000..486642a7 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/notification/email.json @@ -0,0 +1,13 @@ +{ + "active": true, + "alertingProfile": "{{.alertingProfile}}", + "bccReceivers": [], + "body": "{ProblemDetailsHTML}", + "ccReceivers": [], + "name": "{{.name}}", + "receivers": [ + "{{.receivers}}" + ], + "subject": "{State} Problem {ProblemID}: {ImpactedEntity}", + "type": "EMAIL" +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/notification/msTeams.json b/BMW-Dynatrace-config/CD_ABC/notification/msTeams.json new file mode 100644 index 00000000..33e92cf6 --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/notification/msTeams.json @@ -0,0 +1,11 @@ +{ + "acceptAnyCertificate": false, + "active": true, + "alertingProfile": "{{.alertingProfile}}", + "headers": [], + "name": "{{.name}}", + "notifyEventMergesEnabled": false, + "payload": "{\n\"title\":\"{ProblemTitle}\",\n\"text\":\"{ProblemDetailsHTML}\",\n\"themeColor\":\"EA4300\"\n}", + "type": "WEBHOOK", + "url": "{{.webhook}}" +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/notification/notification.yaml b/BMW-Dynatrace-config/CD_ABC/notification/notification.yaml new file mode 100644 index 00000000..01d4278a --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/notification/notification.yaml @@ -0,0 +1,51 @@ +config: +- CDabc-PROD: msTeams.json +- CDabc-INT: msTeams.json + +#Prod notification system for EMEA/NA/CN +#Dry-run needed for all hubs +CDabc-PROD: +- name: CD_ABC PROD +- alertingProfile: CD_ABC/alerting-profile/CDabc-PROD.id +- webhook: https://empty +- skipDeployment: "true" +#Configuration +CDabc-PROD.EMEA-Prod: +- name: CD_ABC PROD +- alertingProfile: CD_ABC/alerting-profile/CDabc-PROD.id +- webhook: https://empty +- skipDeployment: "false" +CDabc-PROD.NA-Prod: +- name: CD_ABC PROD +- alertingProfile: CD_ABC/alerting-profile/CDabc-PROD.id +- webhook: https://empty +- skipDeployment: "false" +CDabc-PROD.CN-Prod: +- name: CD_ABC PROD +- alertingProfile: CD_ABC/alerting-profile/CDabc-PROD.id +- webhook: https://empty +- skipDeployment: "false" + +#INT notification system for EMEA/NA/CN +#Dry-run needed for all hubs +CDabc-INT: +- name: CD_ABC INT +- alertingProfile: CD_ABC/alerting-profile/CDabc-INT.id +- webhook: https://empty +- skipDeployment: "true" +#Configuration +CDabc-INT.EMEA-PreProd: +- name: CD_ABC INT +- alertingProfile: CD_ABC/alerting-profile/CDabc-INT.id +- webhook: https://empty +- skipDeployment: "false" +CDabc-INT.NA-PreProd: +- name: CD_ABC INT +- alertingProfile: CD_ABC/alerting-profile/CDabc-INT.id +- webhook: https://empty +- skipDeployment: "false" +CDabc-INT.CN-PreProd: +- name: CD_ABC INT +- alertingProfile: CD_ABC/alerting-profile/CDabc-INT.id +- webhook: https://empty +- skipDeployment: "false" \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/README.md b/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/README.md new file mode 100644 index 00000000..92e734fa --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/README.md @@ -0,0 +1,37 @@ +# Synthetic Configuration + +To calculate the Availability KPI, a synthetic must be configured. + +1. Modify the synthetic-monitor.yaml file, providing: + - **Endpoint**: url intended to check the availability. + - **Location**: + - *synthetic private location*: If the endpoint is reachable within the BMW network. + ``` + - location: BMW-Dynatrace-config/00_Global-Config/synthetic-location/BMW-AWS-Frankfurt.id + ``` + - *synthetic public location*: If the endpoint is reachable from the internet. + ``` + - location: GEOLOCATION-45AB48D9D6925ECC + ``` +2. Change `skipDeployment` to false. + +i.e. +``` +config: +- my-synthetic: default.json + +my-synthetic: +- name: CD_BMW - bmw.com +- mzName: CD_google/management-zone/CDgoogle.name +- mzId: CD_google/management-zone/CDgoogle.id +- endpoint: https://google.com +- location: GEOLOCATION-45AB48D9D6925ECC +- skipDeployment: "false" +``` + +3. 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 diff --git a/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/default.json b/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/default.json new file mode 100644 index 00000000..cf83039b --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/default.json @@ -0,0 +1,82 @@ +{ + "anomalyDetection": { + "loadingTimeThresholds": { + "enabled": false, + "thresholds": [ + { + "type": "TOTAL", + "valueMs": 0 + } + ] + }, + "outageHandling": { + "globalOutage": true, + "localOutage": false, + "localOutagePolicy": { + "affectedLocations": 1, + "consecutiveRuns": 3 + } + } + }, + "automaticallyAssignedApps": [], + "enabled": true, + "frequencyMin": 1, + "locations": [ + "{{.location}}" + ], + "managementZones": [ + { + "id": "{{.mzId}}", + "name": "{{.mzName}}" + } + ], + "manuallyAssignedApps": [], + "name": "{{.name}}", + "requests": [ + { + "entityId": "HTTP_CHECK_STEP-0BA53EC80CD7EE5A", + "name": "{{.name}}", + "sequenceNumber": 1 + } + ], + "script": { + "requests": [ + { + "configuration": { + "acceptAnyCertificate": true, + "followRedirects": true, + "requestHeaders": [ + { + "name": "accept", + "value": "application/json" + }, + { + "name": "Content-Type", + "value": "application/json" + }, + { + "name": "api_key", + "value": "355DE89C-7B72-4EA3-BDD8-157C79EB2C23" + } + ] + }, + "description": "{{.name}}", + "method": "GET", + "url": "{{.endpoint}}", + "validation": { + "rules": [ + { + "passIfFound": true, + "type": "httpStatusesList", + "value": "200" + } + ], + "rulesChaining": "or" + } + } + ], + "version": "1.0" + }, + "tags": [], + "type": "HTTP" +} \ No newline at end of file diff --git a/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/synthetic-monitor.yaml b/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/synthetic-monitor.yaml new file mode 100644 index 00000000..9bc8fdca --- /dev/null +++ b/BMW-Dynatrace-config/CD_ABC/synthetic-monitor/synthetic-monitor.yaml @@ -0,0 +1,10 @@ +config: +- abc: default.json + +abc: +- name: CD_ABC - +- mzName: CD_ABC/management-zone/CDabc.name +- mzId: CD_ABC/management-zone/CDabc.id +- endpoint: +- location: +- skipDeployment: "true" \ No newline at end of file