Dynatrace
Port's Dynatrace integration allows you to model Dynatrace resources in your context lake and ingest data into them.
Core support
Prerequisites
Generate a Dynatrace API key
-
Navigate to
<instanceURL>/ui/apps/dynatrace.classic.tokens/ui/access-tokens. For example, if you access your Dynatrace instance athttps://npm82883.apps.dynatrace.com, you should navigate tohttps://npm82883.apps.dynatrace.com/ui/apps/dynatrace.classic.tokens/ui/access-tokens. -
Click Generate new token to create a new token. Ensure the permissions:
DataExport,Read entities,Read problems,Read SLOandRead settingsare assigned to the token. TheDataExportpermission allows Dynatrace to perform healthchecks before ingestion starts. TheRead settingsscope allows the integration to ingest teams.
Construct your Dynatrace Host URL
Your Dynatrace host URL should be https://<environment-id>.live.dynatrace.com. Note that there is a difference between the instance URL and the API host URL. The former contains apps while the latter (as shown prior) uses live. This means if your environment ID is npm82883, your API host URL should be https://npm82883.live.dynatrace.com.
Setup
Choose one of the following installation methods: Not sure which method is right for your use case? Check the available installation methods.
The prerequisites required for installation are listed below.
-
Go to the Dynatrace Connectors page in Port.
-
Under
Select your installation method, chooseHosted by Port. -
Configure the
Installation parametersandAdvanced configurationas you wish (see below for details).
Installation parameters
Each integration requires specific parameters (such as an API token, a URL, etc.), as seen in Port's UI when installing it. Hover over the ⓘ icon next to each parameter to see more details about it.
Advanced configuration
- During the installation process each integration may have additional settings under the
Advanced configurationsection in Port's UI. Additionally, each integration has one or more settings that can be configured after installation. To do so, click on the integration's name in the Connectors page and navigate to theSettingtab. Hover over the ⓘ icon next to each setting to see more details about it.
Port secrets
Some integration settings require sensitive pieces of data, such as tokens. For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.
When filling in such a setting, its value will be obscured (shown as ••••••••).
For each such setting, Port will automatically create a secret in your organization.
To see all secrets in your organization, follow these steps.
Port source IP addresses
When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses. You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:
- Europe (EU):
54.73.167.226,63.33.143.237,54.76.185.219 - United States (US):
3.234.37.33,54.225.172.136,3.225.234.99
-
Go to the Dynatrace Connectors page in your portal.
-
Select the
Self-hostedmethod. -
A
helmcommand will be displayed, with default values already filled out (e.g. your Port client ID, client secret, etc). Copy the command, replace the placeholders with your values, then run it in your terminal to install the integration.
Required parameters:
port.clientId- Your port client id.port.clientSecret- Your port client secret.port.baseUrl- Your Port API URL -https://api.port.iofor EU,https://api.us.port.iofor US.integration.identifier- Change the identifier to describe your integration.integration.type- The integration type.integration.eventListener.type- The event listener type.integration.secrets.dynatraceApiKey- API Key for Dynatrace instance, docs can be found here.integration.config.dynatraceHostUrl- The API URL of the Dynatrace instance.
Optional parameters (click to expand)
scheduledResyncInterval- The number of minutes between each resync.initializePortResources- Default true, When set to true the integration will create default blueprints and the port App config Mapping.
- GitHub
- Jenkins
- Azure DevOps
- GitLab
- Go to the Dynatrace Connectors page in your portal.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitHub Actions secret |
|---|---|---|---|
port_client_id | Your Port client ID (How to get the credentials). | ✓ | ✓ |
port_client_secret | Your Port client secret (How to get the credentials). | ✓ | ✓ |
port_base_url | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
dynatrace_api_key | API Key for the Dynatrace instance. Docs can be found here. | ✓ | ✓ |
dynatrace_host_url | The API URL of the Dynatrace instance. | ✓ | ✓ |
initialize_port_resources | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
integration_identifier | The identifier of the integration that will be installed. | ✗ | ✗ |
send_raw_data_examples | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Your Jenkins agent must be able to run Docker commands.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a Jenkins credential (Secret Text) |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | API Key for the Dynatrace instance. Docs can be found here. | ✓ | ✓ |
OCEAN__ | The API URL of the Dynatrace instance. | ✓ | ✓ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a Jenkinsfile pipeline file:Jenkins pipeline (click to expand)
Prerequisites
- Your Azure Devops agent should be able to run docker commands. Learn more about agents here.
- You must have permissions to create and manage Azure DevOps variable groups for storing credentials.
Set up your credentials
- Create a Variable Group: Name it port-ocean-credentials.
- Store the required variables (see the table below).
- Authorize Your Pipeline:
-
Go to "Library" -> "Variable groups."
-
Find port-ocean-credentials and click on it.
-
Select "Pipeline Permissions" and add your pipeline to the authorized list.
-
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as an Azure DevOps pipeline variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | API Key for the Dynatrace instance. Docs can be found here. | ✓ | ✓ |
OCEAN__ | The API URL of the Dynatrace instance. | ✓ | ✓ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a azure-pipeline.yml pipeline file:Azure pipeline (click to expand)
- Go to the Dynatrace Connectors page in your portal.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitLab CI/CD variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | API Key for the Dynatrace instance. Docs can be found here. | ✓ | ✓ |
OCEAN__ | The API URL of the Dynatrace instance. | ✓ | ✓ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Configuration
Port integrations use a YAML mapping block to ingest data from the third-party api into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
Default mapping configuration
This is the default mapping configuration for this integration:
Default mapping configuration (click to expand)
deleteDependentEntities: true
createMissingRelatedEntities: true
enableMergeEntity: true
resources:
- kind: entity
selector:
query: 'true'
entityFields: firstSeenTms,lastSeenTms,tags
entityTypes:
- APPLICATION
- SERVICE
port:
entity:
mappings:
identifier: .entityId
title: .displayName
blueprint: '"dynatraceEntity"'
properties:
firstSeen: (.firstSeenTms // 0) / 1000 | todate
lastSeen: (.lastSeenTms // 0) / 1000 | todate
type: .type
tags: '[(.tags // [])[].stringRepresentation]'
- kind: problem
selector:
query: 'true'
port:
entity:
mappings:
identifier: .problemId
title: .title
blueprint: '"dynatraceProblem"'
properties:
entityTags: .entityTags[].stringRepresentation
evidenceDetails: .evidenceDetails.details // [] | .[].displayName
managementZones: .managementZones[].name
problemFilters: .problemFilters[].name
severityLevel: .severityLevel
status: .status
startTime: .startTime / 1000 | todate
endTime: .endTime | if . == -1 then null else (./1000 | todate) end
relations:
impactedEntities: .impactedEntities[].entityId.id
linkedProblemInfo: .linkedProblemInfo.problemId
rootCauseEntity: .rootCauseEntity.entityId.id
- kind: slo
selector:
query: 'true'
attachRelatedEntities: true
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"dynatraceSlo"'
properties:
status: .status
target: .target
enabled: .enabled
warning: .warning
error: .error
errorBudget: .errorBudget
evaluatedPercentage: .evaluatedPercentage
evaluationType: .evaluationType
filter: .filter
relations:
entities: if .__entities != null then .__entities | map(.entityId) else [] end
Ingest additional resource types
By default, the entity kind ingests only entities of type APPLICATION and SERVICE due to the large number of available resources. However, you can configure the entity kind mapping to ingest entities of other types.
To do this, use the entityTypes selector in the entity mapping like so:
Mapping configuration (click to expand)
createMissingRelatedEntities: true
deleteDependentEntities: true
resources:
- kind: entity
selector:
query: "true"
entityTypes: ["APPLICATION", "SERVICE"]
port:
entity:
mappings:
identifier: .entityId
title: .displayName
blueprint: '"dynatraceEntity"'
properties:
firstSeen: ".firstSeenTms / 1000 | todate"
lastSeen: ".lastSeenTms / 1000 | todate"
type: .type
tags: '[(.tags // [])[].stringRepresentation]'
managementZones: .managementZones[].name
properties: .properties
fromRelationships: .fromRelationships
toRelationships: .toRelationships
Available resource types
You can retrieve a list of available resource types by using the Dynatrace Entity Types API. Below is a list of resource types retrieved from the API:
Dynatrace entity types (click to expand)
APM_SECURITY_GATEWAYAPPLICATIONAPPLICATION_METHODAPPLICATION_METHOD_GROUPAPPMON_SERVERAPPMON_SYSTEM_PROFILEAUTO_SCALING_GROUPAWS_APPLICATION_LOAD_BALANCERAWS_AVAILABILITY_ZONEAWS_CREDENTIALSAWS_LAMBDA_FUNCTIONAWS_NETWORK_LOAD_BALANCERAZURE_API_MANAGEMENT_SERVICEAZURE_APPLICATION_GATEWAYAZURE_APP_SERVICE_PLANAZURE_COSMOS_DBAZURE_CREDENTIALSAZURE_EVENT_HUBAZURE_EVENT_HUB_NAMESPACEAZURE_FUNCTION_APPAZURE_IOT_HUBAZURE_LOAD_BALANCERAZURE_MGMT_GROUPAZURE_REDIS_CACHEAZURE_REGIONAZURE_SERVICE_BUS_NAMESPACEAZURE_SERVICE_BUS_QUEUEAZURE_SERVICE_BUS_TOPICAZURE_SQL_DATABASEAZURE_SQL_ELASTIC_POOLAZURE_SQL_SERVERAZURE_STORAGE_ACCOUNTAZURE_SUBSCRIPTIONAZURE_TENANTAZURE_VMAZURE_VM_SCALE_SETAZURE_WEB_APPBOSH_DEPLOYMENTBROWSERCF_FOUNDATIONCINDER_VOLUMECLOUD_APPLICATIONCLOUD_APPLICATION_INSTANCECLOUD_APPLICATION_NAMESPACECONTAINER_GROUPCONTAINER_GROUP_INSTANCECUSTOM_APPLICATIONCUSTOM_DEVICECUSTOM_DEVICE_GROUPDATASTOREDCRUM_APPLICATIONDCRUM_SERVICEDCRUM_SERVICE_INSTANCEDEVICE_APPLICATION_METHODDEVICE_APPLICATION_METHOD_GROUPDISKDOCKER_CONTAINER_GROUPDOCKER_CONTAINER_GROUP_INSTANCEDYNAMO_DB_TABLEEBS_VOLUMEEC2_INSTANCEELASTIC_LOAD_BALANCERENVIRONMENTEXTERNAL_SYNTHETIC_TESTEXTERNAL_SYNTHETIC_TEST_STEPGCP_ZONEGEOLOCATIONGEOLOC_SITEGOOGLE_COMPUTE_ENGINEHOSTHOST_GROUPHTTP_CHECKHTTP_CHECK_STEPHYPERVISORHYPERVISOR_CLUSTERHYPERVISOR_DISKKUBERNETES_CLUSTERKUBERNETES_NODEKUBERNETES_SERVICEMOBILE_APPLICATIONMULTIPROTOCOL_MONITORNETWORK_INTERFACENEUTRON_SUBNETOPENSTACK_AVAILABILITY_ZONEOPENSTACK_COMPUTE_NODEOPENSTACK_PROJECTOPENSTACK_REGIONOPENSTACK_VMOSPROCESS_GROUPPROCESS_GROUP_INSTANCEQUEUEQUEUE_INSTANCERELATIONAL_DATABASE_SERVICERUNTIME_COMPONENTS3BUCKETSERVICESERVICE_INSTANCESERVICE_METHODSERVICE_METHOD_GROUPSOFTWARE_COMPONENTSWIFT_CONTAINERSYNTHETIC_LOCATIONSYNTHETIC_TESTSYNTHETIC_TEST_STEPVCENTERVIRTUALMACHINEVMWARE_DATACENTERcloud:aws:acmprivatecacloud:aws:api_gatewaycloud:aws:app_runnercloud:aws:appstreamcloud:aws:appsynccloud:aws:athenacloud:aws:auroracloud:aws:autoscalingcloud:aws:billingcloud:aws:cassandracloud:aws:chatbotcloud:aws:cloud_frontcloud:aws:cloudhsmcloud:aws:cloudsearchcloud:aws:codebuildcloud:aws:cognitocloud:aws:connectcloud:aws:datasynccloud:aws:daxcloud:aws:dmscloud:aws:documentdbcloud:aws:dxconcloud:aws:dynamodbcloud:aws:ebscloud:aws:ec2_spotcloud:aws:ec2apicloud:aws:ecscloud:aws:ecs:clustercloud:aws:efscloud:aws:eks:clustercloud:aws:elasticachecloud:aws:elasticbeanstalkcloud:aws:elasticinferencecloud:aws:elastictranscodercloud:aws:emrcloud:aws:escloud:aws:eventscloud:aws:fsxcloud:aws:gameliftcloud:aws:gluecloud:aws:inspectorcloud:aws:iotcloud:aws:iot_things_graphcloud:aws:iotanalyticscloud:aws:kafkacloud:aws:kinesis:data_analyticscloud:aws:kinesis:data_firehosecloud:aws:kinesis:data_streamcloud:aws:kinesis:video_streamcloud:aws:lambdacloud:aws:lexcloud:aws:logscloud:aws:media_tailorcloud:aws:mediaconnectcloud:aws:mediaconvertcloud:aws:mediapackagelivecloud:aws:mediapackagevodcloud:aws:mqcloud:aws:nat_gatewaycloud:aws:neptunecloud:aws:opsworkscloud:aws:pollycloud:aws:qldbcloud:aws:rdscloud:aws:redshiftcloud:aws:rekognitioncloud:aws:robomakercloud:aws:route53cloud:aws:route53resolvercloud:aws:s3cloud:aws:sage_maker:batch_transform_jobcloud:aws:sage_maker:endpointcloud:aws:sage_maker:endpoint_instancecloud:aws:sage_maker:ground_truthcloud:aws:sage_maker:processing_jobcloud:aws:sage_maker:training_jobcloud:aws:servicecatalogcloud:aws:sescloud:aws:snscloud:aws:sqscloud:aws:ssm-runcommandcloud:aws:statescloud:aws:storagegatewaycloud:aws:swfcloud:aws:textractcloud:aws:transfercloud:aws:transitgatewaycloud:aws:translatecloud:aws:trustedadvisorcloud:aws:usagecloud:aws:vpncloud:aws:wafcloud:aws:wafv2cloud:aws:workmailcloud:aws:workspacescloud:azure:apimanagement:servicecloud:azure:app:containerappscloud:azure:app:managedenvironmentscloud:azure:appconfiguration:configurationstorescloud:azure:appplatform:springcloud:azure:automation:automationaccountscloud:azure:batch:accountcloud:azure:blockchain:blockchainmemberscloud:azure:cache:rediscloud:azure:cdn:cdnwebapplicationfirewallpoliciescloud:azure:cdn:profilescloud:azure:classic_storage_accountcloud:azure:classic_storage_account:blobcloud:azure:classic_storage_account:filecloud:azure:classic_storage_account:queuecloud:azure:classic_storage_account:tablecloud:azure:classic_virtual_machinecloud:azure:cognitiveservices:allinonecloud:azure:cognitiveservices:anomalydetectorcloud:azure:cognitiveservices:bingautosuggestcloud:azure:cognitiveservices:bingcustomsearchcloud:azure:cognitiveservices:bingentitysearchcloud:azure:cognitiveservices:bingsearchcloud:azure:cognitiveservices:bingspellcheckcloud:azure:cognitiveservices:computervisioncloud:azure:cognitiveservices:contentmoderatorcloud:azure:cognitiveservices:customvisionpredictioncloud:azure:cognitiveservices:customvisiontrainingcloud:azure:cognitiveservices:facecloud:azure:cognitiveservices:immersivereadercloud:azure:cognitiveservices:inkrecognizercloud:azure:cognitiveservices:luiscloud:azure:cognitiveservices:luisauthoringcloud:azure:cognitiveservices:openaicloud:azure:cognitiveservices:personalizercloud:azure:cognitiveservices:qnamakercloud:azure:cognitiveservices:speechcloud:azure:cognitiveservices:textanalyticscloud:azure:cognitiveservices:translatorcloud:azure:containerinstance:containergroupcloud:azure:containerregistry:registriescloud:azure:containerservice:managedclustercloud:azure:datafactory:v1cloud:azure:datafactory:v2cloud:azure:datalakeanalytics:accountscloud:azure:datalakestore:accountscloud:azure:datashare:accountscloud:azure:devices:iothubscloud:azure:devices:provisioningservicescloud:azure:documentdb:databaseaccounts:globalcloud:azure:documentdb:databaseaccounts:mongocloud:azure:eventgrid:domainscloud:azure:eventgrid:systemtopicscloud:azure:eventgrid:topicscloud:azure:eventhub:clusterscloud:azure:frontdoorcloud:azure:hdinsight:clustercloud:azure:hybridcompute:machinescloud:azure:insights:componentscloud:azure:iotcentral:iotappscloud:azure:keyvault:vaultscloud:azure:kusto:clusterscloud:azure:logic:integrationserviceenvironmentscloud:azure:logic:workflowscloud:azure:machinelearningservices:workspacescloud:azure:maps:accountscloud:azure:mariadb:servercloud:azure:media:mediaservicescloud:azure:media:mediaservices:streamingendpointscloud:azure:mysql:flexibleserverscloud:azure:mysql:servercloud:azure:netapp:netappaccounts:capacitypoolscloud:azure:netapp:netappaccounts:capacitypools:volumescloud:azure:network:applicationgatewayscloud:azure:network:azurefirewallscloud:azure:network:dnszonescloud:azure:network:expressroutecircuitscloud:azure:network:loadbalancers:basiccloud:azure:network:loadbalancers:gatewaycloud:azure:network:loadbalancers:standardcloud:azure:network:networkinterfacescloud:azure:network:networkwatchers:connectionmonitorscloud:azure:network:networkwatchers:connectionmonitors:previecloud:azure:network:privatednszonescloud:azure:network:publicipaddressescloud:azure:notificationhubs:namespaces:notificationhubscloud:azure:postgresql:flexibleserverscloud:azure:postgresql:servercloud:azure:postgresql:serverv2cloud:azure:powerbidedicated:capacitiescloud:azure:recoveryservices:vaultscloud:azure:relay:namespacescloud:azure:search:searchservicescloud:azure:servicefabricmesh:applicationscloud:azure:signalrservice:signalrcloud:azure:sql:managedcloud:azure:sql:serverscloud:azure:sql:servers:databases:datawarehousecloud:azure:sql:servers:databases:dtucloud:azure:sql:servers:databases:hyperscalecloud:azure:sql:servers:databases:vcorecloud:azure:sql:servers:elasticpools:dtucloud:azure:sql:servers:elasticpools:vcorecloud:azure:storage:storageaccountscloud:azure:storage:storageaccounts:blobcloud:azure:storage:storageaccounts:filecloud:azure:storage:storageaccounts:queuecloud:azure:storage:storageaccounts:tablecloud:azure:storagesync:storagesyncservicescloud:azure:streamanalytics:streamingjobscloud:azure:synapse:workspacescloud:azure:synapse:workspaces:bigdatapoolscloud:azure:synapse:workspaces:sqlpoolscloud:azure:timeseriesinsights:environmentscloud:azure:timeseriesinsights:eventsourcescloud:azure:traffic_manager_profilecloud:azure:virtual_network_gatewaycloud:azure:web:appslotscloud:azure:web:functionslotscloud:azure:web:hostingenvironments:v2cloud:azure:web:serverfarmscloud:gcp:autoscalercloud:gcp:bigquery_biengine_modelcloud:gcp:cloud_functioncloud:gcp:cloud_run_revisioncloud:gcp:cloudsql_databasecloud:gcp:filestore_instancecloud:gcp:gae_appcloud:gcp:gce_instancecloud:gcp:gcs_bucketcloud:gcp:https_lbcloud:gcp:instance_groupcloud:gcp:internal_http_lb_rulecloud:gcp:internal_network_lb_rulecloud:gcp:k8s_clustercloud:gcp:k8s_containercloud:gcp:k8s_nodecloud:gcp:k8s_podcloud:gcp:network_lb_rulecloud:gcp:projectcloud:gcp:pubsub_snapshotcloud:gcp:pubsub_subscriptioncloud:gcp:pubsub_topiccloud:gcp:pubsublite_subscription_partitioncloud:gcp:pubsublite_topic_partitioncloud:gcp:tcp_ssl_proxy_rulecloud:gcp:tpu_workeros:service
Monitoring and sync status
To learn more about how to monitor and check the sync status of your integration, see the relevant documentation.
Mapping & selectors per resource
- kind: entity
selector:
query: 'true'
entityFields: firstSeenTms,lastSeenTms,tags
entityTypes:
- APPLICATION
- SERVICE
port:
entity:
mappings:
identifier: .entityId
title: .displayName
blueprint: '"dynatraceEntity"'
properties:
firstSeen: (.firstSeenTms // 0) / 1000 | todate
lastSeen: (.lastSeenTms // 0) / 1000 | todate
type: .type
tags: '[(.tags // [])[].stringRepresentation]'
{
"displayName": "my host",
"entityId": "HOST-06F288EE2A930951",
"firstSeenTms": 1574697667547,
"fromRelationships": {
"isInstanceOf": [
{
"id": "HOST_GROUP-0E489369D663A4BF",
"type": "HOST_GROUP"
}
]
},
"icon": {
"customIconPath": "host",
"primaryIconType": "linux",
"secondaryIconType": "microsoft-azure-signet"
},
"lastSeenTms": 1588242361417,
"managementZones": [
{
"id": "6239538939987181652",
"name": "main app"
}
],
"properties": {
"bitness": 64,
"cpuCores": 8,
"monitoringMode": "FULL_STACK",
"networkZoneId": "aws.us.east01",
"osArchitecture": "X86",
"osType": "LINUX"
},
"tags": [
{
"context": "CONTEXTLESS",
"key": "architecture",
"stringRepresentation": "architecture:x86",
"value": "x86"
},
{
"context": "ENVIRONMENT",
"key": "Infrastructure",
"stringRepresentation": "[ENVIRONMENT]Infrastructure:Linux",
"value": "Linux"
}
],
"toRelationships": {
"isDiskOf": [
{
"id": "DISK-0393340DCA3853B0",
"type": "DISK"
}
]
},
"type": "HOST"
}
{
"identifier": "HOST-06F288EE2A930951",
"title": "my host",
"blueprint": "dynatraceEntity",
"team": [],
"icon": "Dynatrace",
"properties": {
"firstSeen": "2019-11-25T14:14:27Z",
"lastSeen": "2020-04-30T14:52:41Z",
"type": "HOST",
"tags": ["architecture:x86", "[ENVIRONMENT]Infrastructure:Linux"]
},
"relations": {},
"createdAt": "2024-2-6T09:30:57.924Z",
"createdBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW",
"updatedAt": "2024-2-6T11:49:20.881Z",
"updatedBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW"
}
Below are the supported selectors for this resource. Use them under the selector key in your integration mapping configuration to control which resources are returned from the API.
| Selector | Type | Description |
|---|---|---|
exportEnvVariables | array | Environment variable names whose values should be included in lakehouse ingest payloads for DSP processing. |
entityTypes | array | List of Dynatrace entity types to fetch. See Dynatrace Entity Types API for all available types. Default: ["APPLICATION","SERVICE"]. |
entityFields | string | List of fields to include in each entity |
Capabilities
Configure real-time updates
Currently, the Dynatrace API lacks support for programmatic webhook creation. To set up a webhook configuration in Dynatrace for sending alert notifications to the Ocean integration, follow these steps:
Prepare a webhook URL using this format: {app_host}/integration/webhook/problem.
The app_host parameter should match the ingress or external load balancer where the integration will be deployed.
For example, if your ingress or load balancer exposes the Dynatrace Ocean integration at https://myservice.domain.com,
your webhook URL should be https://myservice.domain.com/integration/webhook/problem.
- Go to Dynatrace.
- Go to Settings > Integration > Problem notifications.
- Select Add notification.
- Select Custom integration from the available notification types.
- Configure the notification using the following details.
Enabled- ensure the notification is enabled.Display name- use a meaningful name such as Port Ocean Webhook.Webhook URL- enter the value of theURLyou created above.- Enable Call webhook is new events merge into existing problems.
Custom payload- paste the following configuration:You can customize to your taste, the only important thing is the{"State":"{State}","ProblemID":"{ProblemID}","ProblemTitle":"{ProblemTitle}"}ProblemIDkey. The webhook integration will not work without it.Alerting profile- select the corresponding alerting profile.- Leave the rest of the fields as is.
- Click Save changes.
Alternative installation via webhook
While the Ocean integration described above is the recommended installation method, you may prefer to use a webhook to ingest problem from Dynatrace. If so, use the following instructions:
Note that when using this method, data will be ingested into Port only when the webhook is triggered.
Webhook installation (click to expand)
Port configuration
Create the following blueprint definitions:Dynatrace microservice blueprint (click to expand)
Dynatrace problem blueprint (click to expand)
Create the following webhook configuration using Port's UI: Basic details tab - fill the following details: Integration configuration tab - fill the following JQ mapping: Click Save at the bottom of the page.Dynatrace problem webhook configuration (click to expand)
Dynatrace Problem Mapper.dynatrace_problem_mapper.A webhook configuration for problem events from Dynatrace.Dynatrace.
The webhook configuration's relation mapping will function properly only when the identifiers of the Port microservice entities match the names of the entities in your Dynatrace.
If there is a mismatch, you can utilize Dynatrace Tags to align the actual identifier in Port.
To do this, create a tag with the key proj and value microservice_identifier.
Then, update the relation JQ syntax to establish a connection between the Dynatrace problem and the Port microservice. Here is the updated JQ Mappings:
{
"blueprint": "dynatraceProblem",
"entity": {
...Properties mappings,
"relations": {
"microservice": ".body.ProblemTags | split(\", \") | map(select(test(\"proj:\")) | sub(\"proj:\";\"\"))"
}
}
}
Details
JQ expression explained (click to expand)
The above JQ expression will split the tags by comma and space, then filter the tags that start withproj: and remove the proj: prefix from the tag value.Create a webhook in Dynatrace
- Log in to Dynatrace with your credentials.
- Click on Settings at the left sidebar of the page.
- Choose Integration and click on Problem notifications.
- Select Add notification.
- Select Custom integration from the available integration types.
- Input the following details:
-
Display name- use a meaningful name such as Port Webhook. -
Webhook URL- enter the value of theurlkey you received after creating the webhook configuration. -
Overview- you can add an optional HTTP header to your webhook request. -
Custom payload- When a problem is detected or resolved on your entity, this payload will be sent to the webhook URL. You can enter this JSON placeholder in the textbox:{"State":"{State}","PID":"{PID}","ProblemTitle":"{ProblemTitle}","ImpactedEntity": "{ImpactedEntity}","ProblemDetailsText": "{ProblemDetailsText}","ProblemImpact": "{ProblemImpact}","ProblemSeverity": "{ProblemSeverity}","ProblemURL": "{ProblemURL}","ProblemTags": "{ProblemTags}","ImpactedEntities": {ImpactedEntities}} -
Alerting profile- configure your preferred alerting rule or use the default one.
-
- Click Save changes at the bottom of the page.
To view the different payloads and events available in Dynatrace webhooks, look here.
Done! Any problem detected on your Dynatrace entity will trigger a webhook event. Port will parse the events according to the mapping and update the catalog entities accordingly.
Let's Test It
This section includes a sample response data from Dynatrace. In addition, it includes the entity created from the resync event based on the Ocean configuration provided in the previous section.
Payload
Here is an example of the payload structure from Dynatrace:Problem response data (click to expand)
Mapping Result
The combination of the sample payload and the Ocean configuration generates the following Port entity:Problem entity in Port (click to expand)
Ingest Dynatrace Entities
In this example,
you will create a dynatrace_entity blueprint that ingests monitored entities from your Dynatrace account.
You will then add a Python script to make API calls to Dynatrace REST API and fetch data for your account.