Configure the MS Teams Observability App on Dynatrace - Phenisys/microsoft-teams-observability GitHub Wiki
1 – Create a bucket
- Go to Settings (new UI) → Storage Management → + Bucket
-
Name ⚠️ Respect the name and the case ⚠️ :
ms_teams
-
Display name:
Microsoft Teams Observability
-
Retention period (adjust as you want):
90
-
Bucket table type
logs
-
2 - Create a Pipeline
-
Go to OpenPipeline → Logs → Pipelines → + Pipeline
-
Name:
MS Teams
-
-
Add a Processor in the tab Processing :
-
Type:
DQL
-
Name:
startDateTime
-
Matching Conditions:
log.source != "MSTeams_CollectionHealth"
-
DQL Processor Definition
parse content, "JSON{ TIMESTAMP('S'):startDateTime }(flat=true)"
-
-
Add 2 Processors in the tab Metric Extraction :
-
ms.teams.callDurationS
-
Type:
Value metric
-
Name:
ms.teams.callDurationS
-
Matching condition:
log.source == "MSTeams_CallRecords_CallMetadata"
-
Field extraction:
callDurationS
-
Metric Key:
log.ms.teams.callDurationS
-
Add the dimensions in Custom mode:
call.id type modalities countParticipants callHealth
-
-
ms.teams.streamDurationS
-
Type:
Value metric
-
Name:
ms.teams.streamDurationS
-
Matching condition:
log.source == "MSTeams_CallRecords_StreamDetails"
-
Field extraction:
streamDurationS
-
Metric Key:
log.ms.teams.streamDurationS
-
Add the dimensions in Custom mode:
type mediaLabel streamDirection streamHealth caller.userPrincipalName callee.userPrincipalName
-
-
-
Add a Processor in the tab Storage :
-
Type:
Bucket assignment
-
Name:
Microsoft Teams
-
Storage:
Microsoft Teams Observability
-
-
Save the Pipeline
3 – Create a Dynamic route
- Go to OpenPipeline → Logs → + Dynamic route
-
Name :
Microsoft Teams Observability
-
Matching condition:
log.source == "MSTeams_CollectionHealth" or log.source == "MSTeams_CallRecords_CallMetadata" or log.source == "MSTeams_CallRecords_StreamDetails" or log.source == "MSTeams_ServiceAnnouncement" or log.source == "MSTeams_Sites"
-
Pipeline:
Microsoft Teams Observability
-
4 – Allow URLs to Outbound connections
- Go to Settings → Preferences → Limit outbound connections
-
Allowed hosts :
graph.microsoft.com ip-api.com login.microsoftonline.com
-
5 – Add the Microsoft credentials to the vault
- Go to Credential Vault → Add new credential
-
Credential type :
User and password or Certificate
-
Credential name :
Teams token/certificate
-
Credential scope :
AppEngine
-
Dynatrace apps with access :
Microsoft teams Observability
-
Allow access without app context :
yes
-
Synchronization with external vault :
no
-
Username or Certificate:
the value of your Microsoft client id or the RSA certificate in PEM format with its private key
-
Password :
the value of your Microsoft client secret or the passphrase of the certificate if required
-
Description :
client_id/client_secret
-
Owner access only :
no
-
- Save
6 – Configure the Microsoft Teams Observability App
- Open the application and go to installation & configuration
- Add the following settings in the MS O365 Configurations section :
-
MS O365 Authentication:
Select the credential you just created
-
MS O365 ClientId :
The clientId is necessary if you use a certificate to authenticate
-
MS O365 Tenant :
tenant id
-
MS O365 Grant Type:
Teams token
-
MS O365 Scope :
https://graph.microsoft.com/.default
-
7 – Create the token for logs ingestion
-
Go to Access Token → Generate new token
-
Token name:
Microsoft Observability App
-
Scope :
Ingest logs
-
-
Copy the token in the file config.yaml after "dynatrace_api_token"
8 – Grant permission to the metrics and logs
- Depending on your access restrictions, you may have to allow the user to read the content of the bucket. To do so, create an Access Policy with following permissions:
-
Policy statement :
//Home page metrics ALLOW storage:buckets:read WHERE storage:bucket-name = "default_metrics"; ALLOW storage:metrics:read WHERE storage:bucket-name = "default_metrics"; // Call Diagnostics and Site Overview ALLOW storage:buckets:read WHERE storage:bucket-name = "ms_teams"; ALLOW storage:logs:read WHERE storage:bucket-name = "ms_teams";
-