Guidelines

custom-service-JONYR
qxz15oi 2021-03-29 13:12:09 +02:00
parent fadf953b66
commit dde26f5fc0
5 changed files with 128 additions and 13 deletions

View File

@ -0,0 +1,46 @@
## Add Databases into your Management Zone
1. Under the BMW-Dynatrace-config\00_Global-Config directory, move to auto-tag folder
2. Use the following template to add your DB:
`{`
` "type": "SERVICE",`
` "enabled": true,`
` "valueFormat": "<app_name>",`
` "propagationTypes": [],`
` "conditions": [`
` {`
` "key": {`
` "attribute": "SERVICE_TYPE"`
` },`
` "comparisonInfo": {`
` "type": "SERVICE_TYPE",`
` "operator": "EQUALS",`
` "value": "DATABASE_SERVICE",`
` "negate": false`
` }`
` },`
` {`
` "key": {`
` "attribute": "SERVICE_DATABASE_NAME"`
` },`
` "comparisonInfo": {`
` "type": "STRING",`
` "operator": "CONTAINS",`
` "value": "<common_string_in_name>",`
` "negate": false,`
` "caseSensitive": true`
` }`
` }`
` ]`
`} `
Notes:
- Replace <app_name> with the value of the tags for your component
- Use a <common_string_in_name> for your databases
- i.e. if all of your db has the string "sc2" in common, use that value
3. Open Component.json file and paste the recently edited template as a new rule (line 10). Remember to separate the rule with a comma
4. Commit and pull request to merge the branch to the master:
`git add <changes>`
`git commit -m "<app_name> configuration changes"`
`git push -u origin <branch>`

View File

@ -1,17 +1,30 @@
## What is a custom service in Dynatrace? ## What is a custom service in Dynatrace?
If your application services aren't built on standard technologies, they may not be recognized out-of-the box. - *If your application 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. - *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. - *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? ## How to create a custom service?
- Edit the file custom-service-java.yaml. You can use the customService1 as a template. Copy and paste it below, changing the skipDeployment to true. 1. Open the file custom-service-java.yaml.
- Fill up all the remaining inputs with the details of the endpoint you're interested to monitor (className, methodName, etc...) 2. Use customService1 as a template. Copy and paste it below, changing the skipDeployment to true.
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 <changes>`
`git commit -m "<app_name> configuration changes"`
`git push -u origin <branch>`
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? ## What if i have multiple classes?
- Clone the template-1-1.json to a new one called template-2-1.json. 1. Clone *template-1-1.json* to a new one called *template-2-1.json*.
- Edit the 2nd json adding a 2nd rule separated with a coma with the first one 2. Edit *template-2-1.json* adding a 2nd rule separated with a coma.
- Change the name of the {{.values}}. Make sure to add them in the YAML definition. 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? ## What if i have multiple methods?
- Same process as before, just call it template-1-2.json 1. Same process as before, just call it template-1-2.json
- In this way you can extend to a custom service with n classes and k methods: template-n-k.json 2. In this way you can extend to a custom service with n classes and k methods: template-n-k.json

View File

@ -0,0 +1,43 @@
## Configure Notification System
### MS Teams - Default
1. Open *notification.yaml* under your application configuration folder. You will see that all notification systems are via MS Teams by default with an
https://empty webhook (not configured).
2. Let's suppose you want to start receiving alerts from Dynatrace via MS Teams just for your *EMEA PROD*. Create an incoming webhook in MS Teams
Follow [this](https://www.dynatrace.com/support/help/shortlink/set-up-msteams-integration#configuration-in-microsoft-teams) link
3. Add the incoming webhook to this line:
`<app_name>-PROD.EMEA-Prod:`
`- name: CD_<app_name> PROD`
`- alertingProfile: CD_<app_name>/alerting-profile/CD<app_name>-PROD.id`
`- webhook: <here>`
`- skipDeployment: "false"`
4. Save and commit changes:
`git add <changes>`
`git commit -m "<app_name> configuration changes"`
`git push -u origin <branch>`
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:
`<app_name>-<stage>.<env>-<stage>:`
### Email
In the following example, the team intends to use email instead of the default one (MS Teams) for the EMEA PROD notification system. For that, the following changes have to be done:
1. Keep the MS Teams integration disabled, with the https://empty webhook
`<app_name>-PROD.EMEA-Prod:`
`- name: CD_<app_name> PROD`
`- alertingProfile: CD_<app_name>/alerting-profile/CD<app_name>-PROD.id`
`- webhook: https://empty`
`- skipDeployment: "false"`
2. Create a new configuration template under config, using the email template:
`config:`
`- CD<app_name>email: email.json`
3. Describe the configuration below, using the following template:
`CD<app_name>email.EMEA-Prod:`
`- name: CD_<app_name> PROD`
`- alertingProfile: CD_<app_name>/alerting-profile/CD<app_name>-PROD.id`
`- receivers: distributionEmailexample@bmw.de`
### ITSM
Coming soon!

View File

@ -0,0 +1,13 @@
{
"active": true,
"alertingProfile": "{{.alertingProfile}}",
"bccReceivers": [],
"body": "{ProblemDetailsHTML}",
"ccReceivers": [],
"name": "{{.name}}",
"receivers": [
"{{.receivers}}"
],
"subject": "{State} Problem {ProblemID}: {ImpactedEntity}",
"type": "EMAIL"
}

View File

@ -3,7 +3,7 @@ config:
- CDnewComponentTag-E2E: newComponentTag.json - CDnewComponentTag-E2E: newComponentTag.json
- CDnewComponentTag-INT: newComponentTag.json - CDnewComponentTag-INT: newComponentTag.json
#Prod dashboards for EMEA/NA/CN #Prod notification system for EMEA/NA/CN
CDnewComponentTag-PROD: CDnewComponentTag-PROD:
- name: CD_newComponentTag PROD - name: CD_newComponentTag PROD
- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-PROD.id - alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-PROD.id
@ -25,7 +25,7 @@ CDnewComponentTag-PROD.CN-Prod:
- webhook: https://empty - webhook: https://empty
- skipDeployment: "false" - skipDeployment: "false"
#E2E dashboards for EMEA/NA/CN #E2E notification system for EMEA/NA/CN
CDnewComponentTag-E2E: CDnewComponentTag-E2E:
- name: CD_newComponentTag E2E - name: CD_newComponentTag E2E
- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-E2E.id - alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-E2E.id
@ -47,7 +47,7 @@ CDnewComponentTag-E2E.CN-Prod:
- webhook: https://empty - webhook: https://empty
- skipDeployment: "false" - skipDeployment: "false"
#INT dashboards for EMEA/NA/CN #INT notification system for EMEA/NA/CN
CDnewComponentTag-INT: CDnewComponentTag-INT:
- name: CD_newComponentTag INT - name: CD_newComponentTag INT
- alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-INT.id - alertingProfile: CD_newComponentTag/alerting-profile/CDnewComponentTag-INT.id