Latest Dynatrace
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:
On the Data tab, use the Dynatrace Query Language (DQL) to define your query.
Select Run to execute the query.
On the Visual tab, choose a visualization format for your results.
Under the Visualization selector, expand the options sections 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.
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.
fetch logs| summarize loglines = count(), by:{`1m interval` = bin(timestamp, 1m), status}
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.
Hosts
Query
fetch logs| summarize count(), by:{`dt.entity.host`}| limit 100| sort `count()`, direction:"descending"| fields `dt.entity.host`
Select Add variable and define the second variable.
Loglevel
Query
fetch logs, from:now() - 2h| summarize count(), by:{loglevel}| sort `count()`, direction:"descending"| fields loglevel
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.