Add data to a dashboard
Latest Dynatrace
Add data
The fastest and easiest way to explore your data is with our new Explore tiles and sections. In a few seconds, you can find and analyze your logs, metrics, or business events. No DQL required!
To Query Grail
-
In the upper-right of the dashboard, select Add > DQL.
A configuration side panel opens on the right to display two tabs:
- Query
- Visualize
-
On the Query tab, use the Dynatrace Query Language (DQL) to define your query.
-
Select Run to execute the query.
-
On the Visualize tab, choose a visualization format for your results.
- means the visualization type is recommended for your query.
- means the visualization type is unavailable for your query.
-
Under the Visualization selector, expand the options section to adjust visualization settings as needed.
-
Close the side panel when you're done.
If you want to return to these settings, select your tile to display them.
Specify a custom timeframe
To specify a custom timeframe in a dashboard tile
-
Edit the tile.
-
In the edit panel, turn on Custom timeframe.
-
Select the timeframe to apply to the selected tile.
This timeframe overrides the dashboard timeframe set in the upper-right corner of the dashboard. Using this method, a dashboard can have multiple tiles, where each tile has its own timeframe.
You can also specify a custom timeframe in a data tile's DQL query. If you use this method (with a timeframe specified in the query), the above UI setting is disabled and the timeframe specified in the query is used.
Example timeframe specification in DQL:
fetch [recordtype], from:now() - 2h| ....
For details on specifying a timeframe in DQL, see Specify timeframe in the DQL documentation.
Data example 1
fetch logs| summarize loglines = count(), by:{`1m interval` = bin(timestamp, 1m), status}
Data example 2
Create two variables
In case you haven't created a variable yet, first see Add a variable to a dashboard.
-
Select Add variable and define the first variable.
- Name:
Hosts
- Type:
Query
- Query:
fetch logs| summarize count(), by:{`dt.entity.host`}| limit 100| sort `count()`, direction:"descending"| fields `dt.entity.host`
- Multi-select: turned on
- Name:
-
Select Add variable and define the second variable.
- Name:
Loglevel
- Type:
Query
- Query:
fetch logs, from:now() - 2h| summarize count(), by:{loglevel}| sort `count()`, direction:"descending"| fields loglevel
- Multi-select: turned on
- Name:
Add data
Now add data while referencing your previously created variables $LogLevel
and $Hosts
so that you can later use the variable filters on top of your dashboard to filter the tile according to your selections.
fetch logs| filter in (loglevel, {$Loglevel})| limit 10
Select Run query.