Plugins 〉Dynatrace

Data Source
grafana
Enterprise

Dynatrace

  • Overview
  • Installation
  • Change log
  • Related content

CircleCI

Dynatrace Grafana Datasource

Datasource for https://www.dynatrace.com/

Table of Contents

Features

Core Features

  • Template Variables
    • Metric Names
    • Single selection only (no multi-select)
    • Ad-Hoc Filters
  • Annotations
    • Not currently supported
  • Aliasing
    • Metric Names
    • Aggregation
    • Display Name
    • Host
    • Description
  • Alerting
    • Full alerting support

Dynatrace Specific Features

  • Dynatrace API Support
    • Currently, only v2 metric APIs are supported
  • Custom Metrics

Installation

Grafana CLI

grafana-cli plugins install grafana-dynatrace-datasource

Docker

docker run -d -p 3000:3000 --name grafana -e "GF_INSTALL_PLUGINS=grafana-dynatrace-datasource" grafana/grafana

Manual Install

Download the .zip archive from the plugin downloads page and extract it to the grafana plugins directory.

Configuration

  1. After installing the Dynatrace plugin, navigate to Settings/Data Sources within the Grafana UI and click Add data source.
  2. On the Add data source page, filter for Dynatrace and select the Dynatrace plugin.
  3. Configuring a Dynatrace datasource requires 4 parameters:
    • Name - What name you would like to apply to the Dynatrace datasource (default: Dynatrace).
    • Dynatrace API Type - What type of Dynatrace instance you're connecting to. This is either SaaS or Managed Cluster.
    • Environment ID - The environment ID that you see when logging into Dynatrace. It will be the first portion of the URL. In the example of yfc55578.live.dynatrace.com, your environment ID would be yfc55578.
    • Dynatrace API Token - This is a token generated per Dynatrace environment. To create a token, navigate to your Dynatrace environment dashboard, click settings on the left hand navigation panel. Once on the settings page, navigate to the Integration section in the left hand navigation and select Dynatrace API. From the Dynatrace API page, copy and existing token or generate a new token by clicking "Generate token".
  4. Once all of the configuration values have been set, click Save & Test to validate the configuration and save your changes.

Your completed datasource configuration should look similar to this:

configuration editor

Usage

Adding a query template variable

  1. To create a new Dynatrace template variable for a dashboard, click the settings cog on the top right portion of the dashboard.
  2. Click Variables in the left hand panel.
  3. Click New in the top right corner of the variables page.
  4. Enter a Name and a Label for the template variable you'd like to create. Name is the value you will use inside of queries to reference the template variable. Label is a human friendly name to display for the template variable on the dashboard select panel.
  5. Select the type Query for the type field (it should be selected by default).
  6. Under the Query Options heading, select Dynatrace in the Data source drop down.
  7. Select a type in the Query type drop down (e.g... Metric Names).
  8. If you would like to filter out any of the returned values from your query, enter a regular expression in the Regex input field.
  9. Apply any sorting preferences you might have by choosing a sort type in the Sort drop down.
  10. After verifying the configuration, click Add to add the template variable, then click Save dashboard on the left hand navigation panel to save your changes.

WARNING

Multi-value and Include All option are currently not supported by the Dynatrace plugin.

Your finalized template variable configuration should look similar to this:

add template var

If the above steps have been completed correctly, you should see the template variable in the top-left corner of your dashboard panel:

template variable success

Using Template Variables

After completing the steps to add a new template variable, you're now ready to use the template variable within your dashboard panels to create dynamic visualizations.

  1. Add a new dashboard panel using the panel+ icon in the top right corner of your dashboard.
  2. Click the metric drop down inside of the query editor. You should see the template variable $metric as an available option to select for the metric field. Select it.
  3. Add any aggregations, filters, or aliases that you would like.
  4. Save the panel.

You should now be able to cycle through different metric types and have your panel dynamically update!

If things have gone as expected, your dashboard panel should now look like:

panel using template var

Adding an ad-hoc filter

  1. Click the settings cog on the top right portion of the dashboard.

  2. Click Variables in the left hand panel.

  3. Click New in the top right corner of the variables page.

  4. Enter a Name and a Label for the template variable you'd like to create. Name is the value you will use inside of queries to reference the template variable. Label is a human friendly name to display for the template variable on the dashboard select panel.

  5. Select the type Ad hoc filters for the type field.

    • You will see a message that states Adhoc filters are applied automatically to all queries that target this datasource. This is OK. Continue to the next step.
  6. Click Add to add the template variable, then click Save dashboard on the left hand navigation panel to save your changes.

Unlike normal template variables, ad-hoc filters will apply to any panel on your dashboard that can be filtered by the selected key and value.

In the example below, we have a Dynatrace dashboard with panels representing two different metrics. The top panel is builtin.host.disk.free and the bottom is builtin.host.cpu.load. As you can see in the example, the dashboard is dynamically filtered to the host value of ubuntu-s-1vcpu-1gb-nyc1-01 without having to apply it directly in the query.

ad-hoc-filters

Using Filters

The Dynatrace plugin will dynamically query the appropriate filters for each metric.

To add a filter, click the + next to the Filters label on the Dynatrace query editor, select which field you would like to filter on, select the operator you would like to use, and select a value to filter by.

The Dynatrace plugin allows you to create Filter Groups that can be joined together to create complex logical comparisons. For most use cases, Filter Groups aren't required.

dynatrace filters

Using Aliases

While creating a new query via the query editor, you can hover over the Alias tooltip to see the aliases that are available along with their corresponding values. There are two different types of aliases you will encounter while using the Dynatrace plugin. The first is a static alias, these aliases will be available on every query that you build and will start with a lowercase letter. The second is a dynamic alias, these will change based on the metric you are using in your query and will start with an uppercase letter.

In the example below, using the alias tooltip, we can see that this metric builtin:host.disk.avail has 5 potential aliases. The first three: $name, $aggregation, and $displayName are static aliases. The last two are $Host and $Disk which are dynamic aliases.

alias tooltip

The Dynatrace plugin supports five different aliases: Metric Names, Aggregation, Display Name, Host, and Description. To use one of these aliases, simply add the alias you would like to use in the text box labeled Alias on the Dynatrace query editor.

dynatrace aliases

Using Aggregations

The Dynatrace plugin allows you to select which aggregation you would like to use for a specific metric. Click the drop down next to Aggregations on the Dynatrace query editor to change the aggregation type for your query.

FAQ

Rate Limiting

Querying the API can result in failed queries.

Failed to load resource: the server responded with a status of 429 (Too Many Requests)

For more information, visit the docs on plugin installation.

Change Log

[3.2.3] - <To be released>

Bug Fixes

  • Fixed issue with aggregations, including the percentile aggregation

Enhancements

  • You will find entities under a separate heading or "options container" in the filters
  • Configure dynatrace by URL

[3.2.2] - 2021-05-27

Note: 3.2.2 is a re-release of 3.2.1. There are no additional features. v3.2.1 did not have a proper CHANGELOG.md

Bug Fixes

  • Error with multi tags filters
  • After upgrade, Dynatrace panels throw 400 error "no metrics found using Metric ID"
  • Tags filters not working
  • Dynatrace health check sometimes consuming a LOT of memory
  • Invalid API token returns unhelpful error message
  • Invalid domain returns unhelpful error message
  • Invalid Environment ID returns unhelpful error message
  • Update Dynatrace Documentation
  • Synthetic monitor selection in adhoc template variable results in error
  • enabling Expanded details on problem queries has not effect = no additional details

[3.2.0] - 2021-04-26

New Features

  • [#206]: Only metric names or ad hoc query variables supported for Dynatrace

Bug Fixes

  • [#200]: Queries can not be reused between panels

[3.1.4] - 2021-4-12

  • Chore: Update SDK

[3.1.3-dev4 ] 2021-03-26

  • [#201]: Enabling Expanded details on problem queries has not effect = no additional details
  • [#203]: Disabling of queries not respected
  • [#205]: Percentile aggregration error reading
  • [#202]: Template variables are not supported in problems queries
  • [#199]: Splitting out problems over multiple dimensions
  • [#203]: Synthetic monitor selection in adhoc template variable results in error

[3.1.2] 2021-03-05

Bug Fixes

  • [#146]: Series name is using the internal dynatrace ID's in the table view
  • [#178]: error code 400 message "unexpected colon expecting key package component or namespace, consider adding a preceding tilde if the token is meant literally"

[3.1.1] 2021-02-10

  • [#137]: Empty filter value drop down when selecting new metric from the dashboard variable drop down
  • [#192]: Fix to filter out dimensions that are not entities
  • [#191]: Fetching entities should only be done on type = ENTITY
  • [#186]: Cannot read property 'transformations' of undefined error when closing panel options
  • [#137]: Empty filter value drop down when selecting new metric from the dashboard variable drop down

[3.1.0] 2020-11-10

New Features

  • #88 Problems API support
  • #152 Support merge transformations
  • #95 Support tag filtering in the v2 metrics API

Bug Fixes

  • #162 Query with filters stop working when upgrading from 2.1.1 to 3.0.2
  • #135 Can't import the datasource dashboard
  • #134 Images not loading in the plugin readme

[3.0.2] 2020-09-09

  • Fix for missing filter options (timeseries limit of 1000). Use entities api to get filter key/values instead of metric/query results.

[3.0.1] 2020-08-03

  • Query Migration updated to handle filter groups and values #143
  • Fix for missing data #143
  • Fix filter options #139
  • Fix single value issue #140
  • Fix for dimension iteration
  • Fix using name as value for template label
  • Fix for Alias Regex matching
  • Update to backend HealthCheck

[3.0.0]

  • Full alerting support
  • Migration to backend plugin
  • Carryover of new features from 2.0.x
    • Ad-hoc filter support
    • More readable filter/dimension names
  • Bug fixes
    • (https://github.com/grafana/dynatrace-datasource/issues/97)[#97] Aliases are not working & persisted
    • (https://github.com/grafana/dynatrace-datasource/issues/89)[#89] Host-ID -> how to get a more human readable name from the API
    • (https://github.com/grafana/dynatrace-datasource/issues/87)[#87] V2 API depreciation messages observed during demo in network inspector

[2.0.0]

  • V2 metrics api support
    • Support for synthetic tags
    • Support for monitoring VMWare esxi
  • Performance improvements (subject to delay pending):
    • The amount of data requested
    • The bandwidth/latency of the internet/data connection
  • Support for custom metrics
  • Full templating support for metrics
  • Full templating support for aliases
  • Fully backwards compatible with previous dashboards
  • Requires Grafana 6.5 and up.

[0.9.3]

  • Implement alpha metric names api
  • Fixed tag query manager to pull tags based on source type

[0.9.2]

  • Fix Tag Query Editor bugs
  • Update packages

[0.9.1]

  • Add migration for old tag format to new (fixes breaking change noted in 0.7.0)
  • Fix Tag queries for custom/auto and manual tags
  • Update packages

[0.9.0]

  • refactor and fix filter editor
  • add migration method for dashboards using old format (0.5.3 and earlier) (Issue #21)

[0.8.0]

  • bugfix for saving template variables in tags

[0.7.0] - 2019-05-16

NOTE: This includes a breaking change for TAGS. Any queries that leverage tags will need to be updated manually.

  • Bugfixes and Feature additions for issue #16
  • Updated packages
  • Updated circleci

[0.6.0] - 2019-05-09

Added

  • Template variables support
  • Ad hoc filters support
  • Tags support
  • Able to select metrics by ID or by name

Changed

  • Query model was changed, panels may be broken

[0.5.3] - 2019-03-29

Added

  • Use plugin routes for secure authentication
  • Able to configure SaaS or Management environments
  • Cache sources query

Fixed

  • Metrics without aggregation is not supported

[0.5.2] - 2019-03-23

Added

  • Percentile support

Fixed

  • Cannot do percentile aggregations

[0.5.0] - 2019-02-19

Added

  • Regex filtering support

Fixed

  • Bug when no filter specified

Changed

  • Use ID instead of Display Name to avoid duplicates