Data explorer
The Data explorer greatly enhances your abilities to query and visualize metrics.
- Analyze multidimensional metrics, whether built into Dynatrace or ingested from StatsD, Prometheus, Telegraf, and other channels.
- Choose a visualization type.
- Add your visualization right to your dashboards for easy access and sharing.
- Provides a foundation for metric calculation in visualizations on dashboards.
If you prefer to skip the technical details for now and learn by doing, try the Data explorer quick start. You'll learn how to:
- Use a template
- Create a simple visualization from scratch
- Use the visualization directly in Data explorer
- Pin the visualization to a dashboard for future use and sharing
But if you want the details now, read below.
Query components and concepts
Every metric query is composed of multiple optional components. For example, this query:
has the following components:
- Metric name:
CPU usage %
(builtin:host.cpu.usage
) - Aggregation:
Average
(avg
) - Split by:
Host
(dt.entity.host
) - Filter by:
Host
:OS type
:Linux
See below for descriptions of these and other possible query components.
Metric name
In the web UI, select the metric name from the list displayed in the Select metric… box. This can be a built-in metric or a metric ingested from a channel such as StatsD, Prometheus, or Telegraf over our metrics API.
When you browse the list of metrics
-
You can type or paste a metric name directly into the box to find all matching metrics. In this example, there are multiple matches. We select the metric in the Host category to add it to our query.
-
If you have favorited any metrics in the Metrics browser browser, those metrics are displayed at the top of the list in the metric selector.
-
You can select a metric category to focus the list of metrics.
-
When you hover over any metric in the list, a side panel displays details about that metric.
To see more information about that metric, select View all metric information. This opens the Metrics browser in a new tab (so you don't lose your work in the Data explorer) with lots of useful details about the selected metric.
Aggregation
Every metric provides the same possible aggregations, which can be specified when selecting Average
, Count
, Maximum
, Minimum
, Sum
, Median
, Percentile 10th
, Percentile 75th
, or Percentile 90th
.
The aggregation enables you to specify how the resulting data points of a metric query are supposed to be aggregated across dimensions.
The query will always provide the statistically most accurate results for a given query, even if certain metrics provide different statistics, which depends on the nature of each metric.
Split by
By default, a query does not split by any dimensions using the metric's aggregation. When splitting by a dimension such as host, the aggregation is used for each host.
Sort by
By default, results are sorted in descending order based on the aggregation chosen.
To explicitly set the sort order through the query editor
- Select the + button.
- Select
Sort by
. - Set Sort by to what you want to sort by and whether to sort
ASC
(ascending) orDESC
(descending).
Rate
To explicitly set the rate through the query editor
- Select the + button.
- Select
Rate
. - Set Rate to
None
,Per second
,Per minute
, orPer hour
.
Filter by
The scope is determined by any filter you set.
- By default, the scope is (include all).
- You can filter your query by selecting one of the options in the Filter by box and specifying the value, such as selecting
Host
and then selecting an attribute such as name, tag, or ID. You can add multiple filters.
See also Auto-extended filtering
Limit
By default, the number of metrics you see if they are split by a dimension is 10.
To explicitly set a limit through the query editor
- Select the + button.
- Select
Limit
. - Set Limit to
1
,10
,20
, or100
.
Default
To explicitly set the default value through the query editor
- Select the + button.
- Select
Default
. - Set Default to the desired default value.
Query commands
Visualization
The default visualization is a graph. To change the visualization, select one from the list in the upper-left corner of your query definition.
The following visualization types are available:
Plus
To add or remove metric transformations for a row, select the transformations (+) button and then select or clear checkboxes as needed.
Add metric
To add a new empty row, select Add metric and then define that row's query.
Duplicate metric
To make a copy of a metric that you have already added to the query, select > Duplicate and then edit the copy as needed.
Reorder metrics
To reorder metrics, select and drag the metric to a new position in the list of metrics.
- A query's metrics are rendered in order from top to bottom, so the last one is rendered on top of the others.
- Note that the order of the metrics is also updated in the Settings section in the side panel.
- Rerun the query to see your changes.
Toggle metric
To toggle metrics on and off, you can select the letter next to the metric you want to include in your query, or you can select the eye icon .
Delete metric
To delete a metric, select > Delete.
Run query
Select Run query to run the currently configured query and display a visualization of the results. The text next to the Run query button displays the status of the most recent run.
Advanced mode
To fully utilize the power of the Metrics API v2 queries from within the web UI, turn on Advanced mode for the query.
Advanced mode enables you to create metric expressions, timeframe shifts, and much more directly in the web UI and, of course, use this power to create vizualizations for your dashboards. Start by checking out metric expression examples.
For Advanced mode details, see Data explorer Advanced mode query editor.
Result
The Result section displays the selected visualization of your query results.
You can drill down from your results to relevant Dynatrace pages. In this example, the visualization was showing a host behaving erratically. We selected it to see details about the host in a pop-up, and we can select the View host button to drill down directly to the Dynatrace page for that host.
Pin to dashboard
When you're satisfied with your query, you can add it to a dashboard.
- Select Pin to dashboard.
- Select a dashboard for which you have edit permission.
- Select Pin.
For details, see Pin tiles to your dashboard.
Share your results
If you are doing analysis in the Data explorer and find some interesting results that you want to share with other authenticated users, or if you want to be able to revisit the same results yourself using a later timeframe
- In the Data explorer, go to the Result section and select > Share link.
- Determine the timeframe to associate with the link:
- To share the link with the current timeframe, turn on Use the current timeframe.
- Otherwise, the shared query link will specify the current query and settings except the timeframe.
- Select Copy to copy the link to your clipboard.
- Share the link with any other authenticated Dynatrace user or keep a copy for your own use.
Export to CSV file
To export to a comma-separated values (CSV) file
-
In the Data explorer, go to the Result section and select > Export to CSV.
Note:
- CSV export is available for all visualizations except honeycomb and single value
- Values exported to a CSV file reflect the formatting specified with the Unit and Format settings in the Settings section.
-
A CSV file of the results is saved to your local machine.
The file name indicates the metrics, date, and timeframe.
For example:
CPU usage % (May 24, 2022, 11_41 - 13_41).csv
—contains results from metricCPU usage %
, run on May 24, 2022, for a two-hour timeframe of 11:41-13:41.CPU usage % +1 (May 24, 2022, 13_19 - 13_49).csv
—contains results from metricCPU usage %
and one more metric, run on May 24, 2022, for a half-hour timeframe of 13:19-13:49.
Use in API
After you run a query, you have the option to copy the request for use in an API request.
- In the Data explorer, go to the Result section and select > Copy request.
- Select whether to use the timeframe of the result.
- Select a response format: JSON or CSV.
- Select Copy to copy the request to your clipboard, or just select and copy portions of the request that you want to use.
- optional Select Get a token to go to the Generate access token page and get a token for the request.
Examples
Table with two metrics (split)
In this example, we select metrics CPU usage %
and Memory used %
, break it down by host for both, and display it as a table so that the rows are hosts and the columns show the metric values per host.
- A:
CPU usage %
(builtin:host.cpu.usage
),Average
, Split byHost
- B:
Memory used %
(builtin:host.mem.usage
),Average
, Split byHost
- Visualization:
Table
The complete query should look like this:
Example tile:
Graph with two metrics
In this example, we select the same metrics and display them as a graph.
When you set Visualization to Graph
, the Settings are displayed, where you can select how to graph each metric. In this case, CPU usage %
is an area chart (the area between 0 and the value of the metric is filled in) and Memory used %
is a line chart (a single line representing the value of the metric over time).
- A:
CPU usage %
(builtin:host.cpu.usage
),Average
, Split byHost
- B:
Memory used %
(builtin:host.mem.usage
),Average
, Split byHost
- Visualization:
Graph
- Visual settings:
- A =
Area
- B =
Line
- A =
The complete query should look like this:
Example tile:
Auto-extended filtering
Auto-extended filters leverage the Dynatrace topology (entity model) to offer additional filter dimensions not available in the original metric. They work on both the tile level and the dashboard level.
- On a tile level, select them when you set Filter by in the Data explorer by simply selecting the original dimension of a metric that has the relationship assigned. For example, a metric that captures the performance for Synthetic events has a relationship to a Synthetic monitor. Using the topology, you can first select the related Synthetic event in the filter and then, besides the name, tag, id, or health state, you also get an additional option to pick the related monitor.
- On a dashboard level, while you can't pick desired relationships, Dynatrace automatically extends the metrics where possible, so that, when you pass a dynamic filter, it can apply to a tile with that metric.
Example 1: Synthetic step metric extended by Synthetic monitor
Some performance metrics for Synthetic events lack the ability to filter them by monitor. However, the same event could happen in multiple monitors, and to look at a single monitor's performance you need the ability to filter for them.
With automatically extended filters, you can now filter on the Synthetic test step.
- Select the metric (for example,
Action duration - load action (by event) [browser monitor]
). It has entity typeSYNTHETIC_TEST_STEP
.
- Add the filter.
- Select auto-extended dimension.
- Resulting filter.
Moreover, you can now use auto-extended filters on your dashboard, so there's no need to configure multiple tiles to see the same metric for different monitors or different hosts.
- On the Dynamic filters tab of your dashboard's Dashboard settings page, add a filter for
Custom dimension
.
- Select
Synthetic monitor
.
- Save your changes and display the dashboard. Now you can filter all tiles on the dashboard by Synthetic monitor. The dashboard will automatically, for each tile, check whether any such relationship exists. So every tile (without filters set on a tile level) that has a Synthetic event metric will be filtered the moment a relationship exists between the step in the tile and the monitor you picked.
Example 2: Host metric extended
Here, we extend the host metric by EC2 instance.
-
Create a host-related tile with a host metric (for example,
CPU usage %
-builtin:host.cpu.usage
). -
Apply a related filter such as
EC2 instance (runsOn)
.Now the tile with all hosts is filtered to only the hosts running on that EC2 instance. This is possible even though the dimension
EC2 instance
does not exist on the original host metric. By leveraging the topology (entity model), Dynatrace can filter the hosts based on that relationship.
In this variation, the host metric is extended by host group.
-
Set a filter for
Host.Host Group (isInstanceOf)
and pin the tile to our dashboard. -
We are now able to filter the dashboard tiles by host group.
Notes and limitations
-
10 metrics maximum per visualization
-
Up to 100 series per metric
Note: for a Honeycomb visualization, you can bypass this limit: turn on Advanced mode and delete
:limit(100)
from the query. -
Unlike multidimensional analysis, the Data explorer uses long-term metric data, not trace and request data, so values on visualizations might differ from values in multidimensional analysis.
-
Dynatrace version 1.260+ To prevent performance issues, the maximum number of data points for a query is 4,000. Based on the selected timeframe and the applied custom resolution, Dynatrace projects the number of data points for the query result. If the projected number of data points exceeds 4,000, Dynatrace automatically switches to a resolution high enough to keep the number of data points below 4,000.