Configure your Dynatrace environment - 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:
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:
ms.teams.streamDurationS
-
Add the dimensions in Custom mode:
type mediaLabel streamDirection streamHealth call.userPrincipalName callee.userPrincipalName
-
-
-
Add a Processor in the tab Processing :
-
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 logs
- Depending on your Log access restrictions, you may have to allow the user to read the content of the bucket and the logs inside. To do so, create an Access Policy with following permissions:
-
Policy statement :
ALLOW storage:buckets:read WHERE storage:bucket-name = "ms_teams"; ALLOW storage:logs:read WHERE storage:bucket-name="ms_teams";
-