From 38153bcfb1e34f39c00b9652aeaf05cb260861c6 Mon Sep 17 00:00:00 2001 From: qxz15oi Date: Wed, 24 Mar 2021 16:19:20 +0100 Subject: [PATCH] onboarding templates updates --- onboard.sh | 3 + .../alerting-profile/newComponentTag.json | 19 ----- .../custom-service-java/README.md | 1 + .../custom-service-java.yaml | 9 +++ .../custom-service-java/template-1-1.json | 23 ++++++ .../notification/newComponentTag.json | 11 +++ .../notification/notification.yaml | 70 +++++++++++++++++++ 7 files changed, 117 insertions(+), 19 deletions(-) create mode 100644 onboarding/CD_newComponentTag/custom-service-java/README.md create mode 100644 onboarding/CD_newComponentTag/custom-service-java/custom-service-java.yaml create mode 100644 onboarding/CD_newComponentTag/custom-service-java/template-1-1.json create mode 100644 onboarding/CD_newComponentTag/notification/newComponentTag.json create mode 100644 onboarding/CD_newComponentTag/notification/notification.yaml diff --git a/onboard.sh b/onboard.sh index b4b6f89c..69017016 100644 --- a/onboard.sh +++ b/onboard.sh @@ -6,11 +6,14 @@ mv BMW-Dynatrace-config/CD_newComponentTag BMW-Dynatrace-config/$1 mv BMW-Dynatrace-config/$1/alerting-profile/newComponentTag.json BMW-Dynatrace-config/$1/alerting-profile/$2.json mv BMW-Dynatrace-config/$1/management-zone/newComponentTag.json BMW-Dynatrace-config/$1/management-zone/$2.json mv BMW-Dynatrace-config/$1/dashboard/newComponentTag.json BMW-Dynatrace-config/$1/dashboard/$2.json +mv BMW-Dynatrace-config/$1/notification/newComponentTag.json BMW-Dynatrace-config/$1/notification/$2.json sed -i "s/CD_newComponentTag/$1/g" BMW-Dynatrace-config/$1/alerting-profile/alerting-profile.yaml sed -i "s/CD_newComponentTag/$1/g" BMW-Dynatrace-config/$1/management-zone/management-zone.yaml sed -i "s/CD_newComponentTag/$1/g" BMW-Dynatrace-config/$1/dashboard/dashboard.yaml +sed -i "s/CD_newComponentTag/$1/g" BMW-Dynatrace-config/$1/notification/notification.yaml sed -i "s/newComponentTag/$2/g" BMW-Dynatrace-config/$1/alerting-profile/alerting-profile.yaml sed -i "s/newComponentTag/$2/g" BMW-Dynatrace-config/$1/management-zone/management-zone.yaml sed -i "s/newComponentTag/$2/g" BMW-Dynatrace-config/$1/dashboard/dashboard.yaml +sed -i "s/newComponentTag/$2/g" BMW-Dynatrace-config/$1/notification/notification.yaml diff --git a/onboarding/CD_newComponentTag/alerting-profile/newComponentTag.json b/onboarding/CD_newComponentTag/alerting-profile/newComponentTag.json index 716b4176..681a4c64 100644 --- a/onboarding/CD_newComponentTag/alerting-profile/newComponentTag.json +++ b/onboarding/CD_newComponentTag/alerting-profile/newComponentTag.json @@ -98,25 +98,6 @@ } ] } - }, - { - "delayInMinutes": 0, - "severityLevel": "MONITORING_UNAVAILABLE", - "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/onboarding/CD_newComponentTag/custom-service-java/README.md b/onboarding/CD_newComponentTag/custom-service-java/README.md new file mode 100644 index 00000000..95d09f2b --- /dev/null +++ b/onboarding/CD_newComponentTag/custom-service-java/README.md @@ -0,0 +1 @@ +hello world \ No newline at end of file diff --git a/onboarding/CD_newComponentTag/custom-service-java/custom-service-java.yaml b/onboarding/CD_newComponentTag/custom-service-java/custom-service-java.yaml new file mode 100644 index 00000000..25f8a028 --- /dev/null +++ b/onboarding/CD_newComponentTag/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/onboarding/CD_newComponentTag/custom-service-java/template-1-1.json b/onboarding/CD_newComponentTag/custom-service-java/template-1-1.json new file mode 100644 index 00000000..b3003515 --- /dev/null +++ b/onboarding/CD_newComponentTag/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/onboarding/CD_newComponentTag/notification/newComponentTag.json b/onboarding/CD_newComponentTag/notification/newComponentTag.json new file mode 100644 index 00000000..33e92cf6 --- /dev/null +++ b/onboarding/CD_newComponentTag/notification/newComponentTag.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/onboarding/CD_newComponentTag/notification/notification.yaml b/onboarding/CD_newComponentTag/notification/notification.yaml new file mode 100644 index 00000000..295bffcc --- /dev/null +++ b/onboarding/CD_newComponentTag/notification/notification.yaml @@ -0,0 +1,70 @@ +config: +- CDnewComponentTag-PROD: newComponentTag.json +- CDnewComponentTag-E2E: newComponentTag.json +- CDnewComponentTag-INT: newComponentTag.json + +#Prod dashboards for EMEA/NA/CN +CDnewComponentTag-PROD: +- name: CD_newComponentTag PROD +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "true" +CDnewComponentTag-PROD.EMEA-Prod: +- name: CD_newComponentTag PROD +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-PROD.NA-Prod: +- name: CD_newComponentTag PROD +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-PROD.CN-Prod: +- name: CD_newComponentTag PROD +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-PROD.id +- webhook: https://empty +- skipDeployment: "false" + +#E2E dashboards for EMEA/NA/CN +CDnewComponentTag-E2E: +- name: CD_newComponentTag E2E +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-E2E.id +- webhook: https://empty +- skipDeployment: "true" +CDnewComponentTag-E2E.EMEA-Prod: +- name: CD_newComponentTag E2E +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-E2E.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-E2E.NA-Prod: +- name: CD_newComponentTag E2E +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-E2E.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-E2E.CN-Prod: +- name: CD_newComponentTag E2E +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-E2E.id +- webhook: https://empty +- skipDeployment: "false" + +#INT dashboards for EMEA/NA/CN +CDnewComponentTag-INT: +- name: CD_newComponentTag INT +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "true" +CDnewComponentTag-INT.EMEA-PreProd: +- name: CD_newComponentTag INT +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-INT.NA-PreProd: +- name: CD_newComponentTag INT +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "false" +CDnewComponentTag-INT.CN-PreProd: +- name: CD_newComponentTag INT +- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-INT.id +- webhook: https://empty +- skipDeployment: "false" \ No newline at end of file