This integration automatically connects Dynatrace with ServiceDesk Plus to keep your CMDB up to date. It regularly reads information from Dynatrace about your servers, applications, and related components, and reflects the same details in ServiceDesk Plus without manual effort. Any new components discovered in Dynatrace are added, existing ones are updated, and outdated entries are removed. This ensures your ServiceDesk Plus CMDB always shows an accurate and current view of your IT environment, helping your teams work with reliable data.
Prerequisites: -
Python 3.6 or above
Ensure Python is installed and added to your PATH. Use python --version or python3 --version to verify.
Required Python Libraries:
configparser (standard library)
os (standard library)
requests
urllib (standard library)
logging (standard library)
json (standard library)
ratelimit
Install them using:
pip install requests ratelimit
Dynatrace and SDP Credentials:
Dynatrace Access token and Dynatrace URL.
SDP API Key and SDP URL.
To generate an SDP API Key, navigate to:
ADMIN -> Integration Key -> New
The Dynatrace–SDP Integration Tool enables automatic synchronization of Dynatrace-monitored entities into the SDP CMDB. Proper configuration is required to ensure secure access, accurate entity mapping, and consistent data population across systems.
To allow the integration tool to read entities from Dynatrace, an access token must be generated.
Steps to generate an access token:
Log in to your Dynatrace environment.
Navigate to Main Menu → Access Tokens.
Generate a new access token with ReadEntities permission.
Dynatrace Hosted URL:
The Dynatrace environment URL typically follows the format:
https://<yourdomain>.live.dynatrace.com
Important:
If your Dynatrace URL containsappor any other subdomain, replace it withliveto ensure successful API calls.
Configuration in config.properties:
[DYNATRACE] hosted_url = https://<yourdomain>.live.dynatrace.com access_token = <your-dynatrace-access-token>
Do not include a trailing slash (
/) at the end of the URL.
The integration requires access to the SDP API using an API key.
Required details:
SDP hosted URL
SDP API key
Configuration in config.properties:
[SDP] hosted_url = https://<your-sdp-server> api_key = <your-sdp-api-key>
Do not include a trailing slash (
/) in the URL.
Dynatrace entities must be mapped to corresponding SDP CMDB CI types using API names.
This mapping is defined in the [CMDB] section.
If Dynatrace Host entities should be created under the Computer CI type in SDP:
[CMDB] Host = cmdb_computer
Only valid SDP CI API names should be used.
CI API names can be obtained from the URL of the CI list view in SDP.
New CI types can also be created in SDP and referenced here.
Relationships between CIs are not auto-created and must be set up manually in SDP before configuration.
Procedure:
Create the required CI relationships in SDP.
Copy the generated relationship association API names.
Configure them in the [CMDB] section.
Host_to_DataCenter = assoc_computer_houses_data_centers Process_to_Host = assoc_process_runs_computers Service_to_Process = assoc_service_runs_on_processes Application_to_Service = assoc_applications_runs_service
These mappings determine how Dynatrace entities are linked together in the SDP CMDB.
Field mapping controls which Dynatrace attributes populate SDP CI fields or User Defined Fields (UDFs).
Each entity type has a dedicated configuration section:
[DataCenterFieldMappings]
[HostFieldMappings]
[ProcessFieldMapping]
[ServiceFieldMapping]
[ApplicationFieldMapping]
[HostFieldMappings] system.vendor = udf_manufacturer system.processor.model = udf_processor_name ipAddress = udf_ip_address macAddresses = udf_mac_address osVersion = udf_os bitness = udf_bitness
Left side: Dynatrace field name
Right side: SDP CI field or UDF name
Only the fields explicitly defined in these sections will be populated to SDP.
Note:
The integration tool automatically populates the name and description fields by default; therefore, they do not need to be included in the field mapping.
Ensure all required UDFs exist in SDP before enabling the integration.
Verify CI API names and relationship API names carefully.
Refer to:
Sample config.properties file
SDP CMDB API documentation
Validate mappings in a test environment before production rollout.
After completing the configuration, run the script using one of the following commands:
python Dynatrace_Integration.py
# or
python3 Dynatrace_Integration.py
Ensure the script is run from its directory.