Latest Dynatrace
Use a line chart visualization:
The chart above is based on the following query.
timeseries avg(dt.host.cpu.usage)
/** This example shows how to map data to use the built-in visualization for custom data.*/export default async function () {// Sample the exponential function 10 times at 1-minute intervals.const sampleCount = 10;return {records: new Array(sampleCount).fill(null).map((_, index, array) => {const invertedIndex = array.length - index;const time = new Date().getTime();return {'my series': Math.exp((index * 3) / 10),'my series 2': Math.exp((index * 2) / 8),timeframe: {start: time - 1000 * 60 * invertedIndex,end: time - 1000 * 60 * (invertedIndex - 1),},};}),types: [{indexRange: [0, sampleCount - 1],mappings: {timeframe: { type: 'timeframe' },'my series': { type: 'double' },'my series 2': {type: 'double'}},},],};}
/** This example shows how to visualize your data without explicitly describing* the types.*/export default async function () {// Take 120 samples of a sine wave for a full period.const sampleCount = 120;return new Array(sampleCount).fill(null).map((_, index, array) => {const invertedIndex = array.length - index;const time = new Date().getTime();return {timestamp: new Date(time - 1000 * 60 * invertedIndex).toISOString(),value: Math.sin((index / (array.length - 1)) * (2 * Math.PI)),};});}
To access the chart tools:
When space is limited, hover over the chart and select Chart tools to open a menu of chart tools.
When there is sufficient space, the chart tools are displayed in a toolbar.
By default, the chart toolbar is displayed in the upper-right corner of the chart when you hover over the chart.
Icon
Name
Keyboard shortcut
Action
Move
none
Move the chart toolbar. Select and drag the icon.
Explore
E
Explore a section of the chart. Select Explore, and then click and drag left or right to select a section of the chart. The chart zooms to display the selected area.
Pan
P
Pan the chart to the left or right. Select Pan, and then click and drag left or right.
Zoom in
Ctrl+Up
Zoom in to the chart.
Zoom out
Ctrl+Down
Zoom out from the chart.
Reset
R
Restore the chart zoom level and timeframe to their original states.
Collapse
none
Shrink the chart toolbar to just and .
Expand
none
Show the entire chart toolbar.
For a timeseries chart (Line, Area, Bar):
You can't zoom on the chart if the timeframe is set in the DQL query.
Dashboards
If you zoom on a tile without a custom tile timeframe, the global timeframe for the dashboard is updated accordingly, so timeframes stay in sync across the dashboard except where a tile has its own overriding timeframe.
If you zoom on a tile with a custom tile timeframe but without a timeframe in the query, the selected timeframe is applied to the custom tile timeframe and the changed timeframe is reflected in the dashboard.
Notebooks
If you zoom in a timeseries in a notebook section, the timeframe of the section changes, and the change is persisted in the notebook.
Use this field to add a title. The edit box is displayed at the top of the options panel.
Example:
Status
and Emoji
in your dashboard.Current $Emoji status is $Status
.Status
to Good
.Emoji
to 🌍
.The title will be displayed as Current 🌍 status is Good
.
If you aren't sure that you chose the right visualization, use the visualization selector to try different visualizations.
The data mapping section shows how a column of your result is mapped to the visualization.
For example, when working with DQL and a timeseries, in the result we have a column with a value array for each series (one row with that one cell of values). For a timeseries, this mapping is done fully automatically, but the data mapping shows you which underlying column is mapped.
To learn about options quickly and decide what works best for you, turn options on and off and see the effect immediately on your chart. For example, does it look best with a label or without? Turn that option on and off and see for yourself.
You can select a color palette from the list under Color palettes.
For a line chart, area chart, or bar chart, you can optionally override the selected color palette for any series as needed.
Select where to display the visualization legend:
Select which elements to display in the legend.
Connect null values—specifies whether to connect null values in the visualization.
Selects the X-axis.
Sets the scale of the left axis:
The minimum of the visualization range.
The maximum of the visualization range.
Vertical text to display as a label for the Y-axis.
For a line chart, area chart, or bar chart, you can optionally override the selected color palette for any series as needed.
The Series overrides section lists all configured overrides.
To add or change an override for a series
Edit the visualization tile.
Select the series for which you want to override the palette color. There are two ways to select a series:
Change the Color setting to the color you want to display for the selected series.
Select Update to save your changes to the dashboard.
Use the Query limits section to check and adjust the Grail query limits per notebook section or dashboard tile. These settings determine the maximum limits when fetching data. Exceeding any limit will generate a warning.
Dashboard sections and notebook tiles created in Dynatrace earlier than version 1.296 are not affected. Those existing tiles/sections will return the same results as before.
The limit in gigabytes for the amount of data that will be scanned during a read.
The maximum number of result records that this query will return. Default: 1,000 records. To see more records, you need to increase the value of Record limit.
If your query has no limit
, such as
fetch logs
the value of Record limit is applied. By default, you will see up to 1,000 records.
If your query also includes a limit
, such as
fetch logs| limit 2000
the lower of the two values (either limit
in your query, or Record limit in the web UI) is applied.
In the example above, you would still see only 1,000 records unless you increased the value of Record limit.
The maximum number of result bytes that this query will return. For better performance with typical queries and smaller documents, the default is set to 1 MB.
Results in the selection of a subset of Log or Span records.
To configure thresholds in a dashboard or notebook visualization
Select to edit the visualization tile.
Select Thresholds.
Select Threshold.
Define the thresholds. For each range:
This example uses a bar chart, but the options apply to other visualizations.
In Dashboards, create a dashboard.
Select and, in the Snippets section of the menu, select Metrics > Chart top 10 hosts by CPU usage.
In the section edit panel, select the Visual tab and select Bar.
Select Thresholds.
Select Threshold.
An empty set of threshold fields is displayed.
Define the thresholds for the displayed metric. You can observe your changes in the Y axis of the chart.
In this example, we define three ranges of CPU usage with corresponding colors and labels.
You can see the ranges displayed on the Y-axis and in the tooltip.
To reset to defaults (discard threshold settings), select the trash can next to the item.
Select to edit the visualization tile.
Select Thresholds.
From this point, you can do the following (expand rows for details):
To add thresholds (if the selected visualization supports additional thresholds), select Threshold.
To turn off (hide) existing thresholds, use the switch. No settings are lost. You can turn them back on if you change your mind.
To delete existing thresholds, select the trash can .
To change existing threshold settings, just edit the fields.
To add a range to existing thresholds, select Add range.
To delete a range from existing thresholds, select the delete button in that row.
To override the default units and formats in a dashboard or notebook visualization
Select to edit the visualization tile.
Select the Visual tab.
Select Units and formats.
Select Override.
Select Override
In the dropdown list, select the item for which you want to add a unit override.
This is a numeric column of the underlying DQL result, so it varies according to the query. For example:
fetch events
query returns events. The dropdown list here lets you select a numeric field (such as transfer_size
) from the results.timeseries avg(dt.host.cpu.usage)
query returns a single timeseries for avg(dt.host.cpu.usage)
. That timeseries is then the only selectable option in the list.Define the override.
None
if it was not included in the DQL result, or its automatically defined by the unit passed from the DQL result. This field doesn't lead to any conversion.Bytes
, Displayed unit now offers a suitable list of byte conversions such as Kilobyte
and Megabyte
. Unlike the Default unit, the Displayed unit is always a numeric conversion.Turn on Abbreviate large numbers if you want to display large figures in abbreviated form. For example, 1053
becomes 1.1K
.
To reset to defaults (discard override settings for the selected item), select the trash can next to the item.
This example uses a line chart, but the options apply to other visualizations.
In Dashboards, create a dashboard.
Select and, in the Snippets section of the menu, select Metrics > Chart average CPU across all hosts.
In the section edit panel, select the Visual tab and select Line.
Select Units and formats.
Select Override.
In the dropdown list, select the metric for which you want to add an override. There's only one metric to select in this example.
Define the override for the displayed metric. You can observe your changes in the Y-axis of the chart.
Default unit displays Percent (%)
, which is the default unit for the selected metric. Try a different setting, such as One
to instead display the result as a fraction of 1.
Displayed unit displays Auto
. You can change it to a different unit, such as One
to instead display the result as a fraction of 1.
Only linear and static conversions are supported. For example, you cannot convert Degree Celsius(°C)
into Degree Fahrenheit(°F)
, or convert Usd(US$)
into Eur(€)
.
Decimals displays the default number of decimal points (degree of precision) to display. To see it in action, change the Decimals selection and observe the change in the visualization.
For example, change this:
To this:
Suffix displays the optional suffix to display after the unit. To see it in action, enter a string and observe the change in the visualization.
To reset to defaults (discard override settings for the selected metric), select the trash can next to the metric.