💠Dynatrace
StackState Self-hosted v5.1.x
Last updated
StackState Self-hosted v5.1.x
Last updated
The Dynatrace StackPack creates a synchronization between a Dynatrace instance and StackState. When the integration is enabled, Dynatrace Smartscape topology and events for the configured relative_time
(default 1 hour) will be available in StackState.
Dynatrace is a StackState core integration.
Agent V3 connects to the configured Dynatrace API to retrieve data:
If a Dynatrace topology check is configured, Topology and Smartscape data is retrieved
If a Dynatrace health check is configured, events data is retrieved.
Agent V3 pushes retrieved data to StackState.
Topology data is translated into components and relations.
Tags defined in Dynatrace are added to components and relations in StackState. Any defined StackState tags are used by StackState when the topology is retrieved.
Events are available in the StackState Events Perspective. They're also included in the Event list in the right panel View summary tab and the details tabs - Component details and Direct relation details..
To set up the Dynatrace integration you will need to have:
StackState Agent V3 installed on a machine that can connect to both Dynatrace and StackState.
A running Dynatrace instance.
A Dynatrace API Token with access to read the Smartscape Topology and Events.
Install the Dynatrace StackPack from the StackState UI StackPacks > Integrations screen. You will need to enter the following details:
Dynatrace URL - the Dynatrace URL from which topology will be collected.
Dynatrace Instance Name - the user-defined name of the Dynatrace account shown in configurations such as views.
To enable the Dynatrace integration, two Dynatrace checks need to be configured.:
Dynatrace topology check - collects topology data.
Dynatrace health check - collects events data from Dynatrace.
If only the Dynatrace topology check is enabled, no Dynatrace events data will be available in StackState and components will be reported with a green (CLEAR) health state. To enable retrieval of events data from Dynatrace, you should also enable the Dynatrace health check.
To enable the Dynatrace topology check and begin collecting topology data from Dynatrace, add the following configuration to StackState Agent V3:
Edit the Agent integration configuration file /etc/stackstate-agent/conf.d/dynatrace_topology.d/conf.yaml
to include details of your Dynatrace instance:
url - the base URL of the Dynatrace instance.
SaaS url example - https://{your-environment-id}.live.dynatrace.com
Managed url example - https://{your-domain}/e/{your-environment-id}
token - a Dynatrace API token with access to the required Dynatrace API endpoints. Use secrets management to store tokens outside of the configuration file.
You can also add optional configuration to specify where imported Dynatrace topology will end up in StackState:
domain - The domain to use for imported topology (default dynatrace).
environment - The environment to use for imported topology (default production).
Other optional configuration options are:
collection_interval - The frequency with which topology data is retrieved from Dynatrace. If you have a large amount of topology data to collect from Dynatrace, the topology check will need to run for longer. Default 300
seconds.
verify - To verify the certificate for HTTPS.
cert - The path to the certificate file for HTTPS verification.
keyfile - The path to public key of certificate for https verification.
timeout - Timeout for requests.
relative_time - The relative timeframe for retrieving topology.
custom_device_relative_time - The relative timeframe for retrieving custom devices.
custom_device_fields - The Custom Device property fields that should be used.
custom_device_ip - Use IP address to generate Custom Device identifiers. Set to False
if there are multiple Custom Devices using the same IP to prevent incorrect merging of Custom Device components. Default True
. Requires Agent V2.17 or later.
tags - custom tags appended to all components, useful for filtering.
Restart StackState Agent V3 to apply the configuration changes.
Once the Agent has restarted, wait for data to be collected from Dynatrace and sent to StackState.
If only the Dynatrace health check is enabled, no Dynatrace topology data will be available in StackState. Events data will be retrieved from Dynatrace, but there will be no components or relations available in StackState to map this to. To enable retrieval of topology data from Dynatrace, you should also enable the Dynatrace topology check.
To enable the Dynatrace health check and begin collecting events from Dynatrace, add the following configuration to StackState Agent V3:
Edit the Agent integration configuration file /etc/stackstate-agent/conf.d/dynatrace_health.d/conf.yaml
to include details of your Dynatrace instance:
url - the base URL of the Dynatrace instance.
SaaS url example - https://{your-environment-id}.live.dynatrace.com
Managed url example - https://{your-domain}/e/{your-environment-id}
token - a Dynatrace API token with access to the required Dynatrace API endpoints. Use secrets management to store tokens outside of the configuration file.
You can also add optional configuration:
collection_interval - The frequency with which events data is retrieved from Dynatrace. Note that the health check should have a shorter collection interval than the topology check. Default 60
seconds.
verify - To verify the certificate for https.
cert - The path to certificate file for https verification.
keyfile - The path to public key of certificate for https verification.
timeout - Timeout for requests.
relative_time - The relative timeframe for retrieving topology.
events_bootstrap_days - How many days in the past to collect events on the first run.
events_process_limit - Maximum number of events to process each run.
Restart StackState Agent V3 to apply the configuration changes. 4.Once the Agent has restarted, wait for data to be collected from Dynatrace and sent to StackState.
The API Token configured in StackState Agent V3 must have the permission Access problems and event feed, metrics, and topology (API value DataExport
) and Grants access to GET requests of the Monitored entities and Custom tags APIs (API value entities.read
). Note that this token must be generated by an admin Dynatrace user in Settings > Integrations > Dynatrace API. For details, see Dynatrace API token permissions (dynatrace.com).
You can check if the generated token is working using the curl command:
To check the status of the Dynatrace integration, run the status subcommand and look for Dynatrace under Running Checks
:
When a new version of the Dynatrace StackPack is available in your instance of StackState, you will be prompted to upgrade in the StackState UI on the page StackPacks > Integrations > Dynatrace. For a quick overview of recent StackPack updates, check the StackPack versions shipped with each StackState release.
For considerations and instructions on upgrading a StackPack, see how to upgrade a StackPack.
The API endpoints used in the StackState integration are listed below:
/api/v1/entity/applications
/api/v1/entity/infrastructure/hosts
/api/v1/entity/infrastructure/processes
/api/v1/entity/infrastructure/process-groups
/api/v1/entity/services
/api/v1/events
/api/v2/entities
/api/v1/synthetic/monitors
Refer to the Dynatrace documentation for details on how to create an API Token (dynatrace.com).
The Dynatrace health check retrieves all events and their parameters from Dynatrace for the configured relative time
(default 1 hour).
Dynatrace event severity | Available in StackState as |
---|---|
| Events are mapped to the associated component. They're listed on the StackState Events Perspective. They're also included in the Event list in the right panel View summary tab and the details tabs - Component details and Direct relation details. |
| Events are added to a StackState health stream. These event severities will result in a |
| Events are added to a StackState health stream. These event severities will result in a CRITICAL state on the associated component. |
The Dynatrace integration doesn't retrieve any metrics data.
All tags defined in Dynatrace will be retrieved and added to the associated components and relations in StackState.
The Dynatrace integration also understands StackState common tags. These StackState tags can be assigned to elements in Dynatrace to influence the way that the resulting topology is built in StackState. For example, by placing a component in a specific layer or domain.
The Dynatrace topology check retrieves the following topology data from Dynatrace:
Data | Description |
---|---|
Components | Smartscape Applications, Hosts, Processes, Process-Groups, Services, Custom Devices. Synthetic Monitors are also available when running Agent v2.17 or later. |
Relations | Relations between the imported components are included in the component data retrieved from Dynatrace. |
The Dynatrace integration understands StackState common tags. These StackState tags can be assigned to elements in Dynatrace to influence the way that the resulting topology is built in StackState. For example, by placing a component in a specific layer or domain.
The Dynatrace integration doesn't retrieve any traces data.
When the Dynatrace integration is enabled, the following additional keys can be used to filter views in the StackState UI:
dynatrace-ManagementZones
dynatrace-EntityID
dynatrace-Tags
dynatrace-MonitoringState
For example, to filter a view by Dynatrace Management Zone, add the key dynatrace-managementZones:<value>
to the Labels filter box.
The code for the Dynatrace checks are open source and available on GitHub:
Troubleshooting steps for any known issues can be found in the StackState support Knowledge base.
To uninstall the Dynatrace StackPack and disable the Dynatrace checks:
Go to the StackState UI StackPacks > Integrations > Dynatrace screen and click UNINSTALL.
All Dynatrace specific configuration will be removed from StackState.
Remove or rename the Agent integration configuration file, for example:
Restart StackState Agent V2 to apply the configuration changes.
Dynatrace StackPack v1.4.2 (2022-06-03)
Improvement: Updated documentation
Dynatrace StackPack v1.4.1 (2022-05-31)
BugFix: Fixed component action issue where applications would not successfully redirect to Dynatrace. STAC-16661
Dynatrace StackPack v1.4.0 (2022-04-06)
Features: Dynatrace support for synthetic checks, introduced a new component type synthetic monitor (requires StackState Agent V2.17 or later)
Features: Synthetic checks and custom devices added as layer
BugFix: Fixed showing component actions when component merges. STAC-14517
Dynatrace StackPack v1.3.0 (2021-10-12)
Features: Support of Agent 2.15 release that sends Health State snapshots with new Dynatrace topology and health checks.
StackState Agent integrations: