Latest Dynatrace
Dynatrace Dashboards and Notebooks offer the following options for exploring your data:
You can create a notebook section or dashboard tile using Davis CoPilot to translate your natural language questions into DQL queries.
To create a dashboard tile using Davis CoPilot
Go to Dashboards and open or create a dashboard you can edit.
Open the Add menu and select Davis CoPilot.
optional At the top of the prompt definition panel, enter a tile title.
In the prompt box, type a prompt. Try average cpu usage percentage by host
or see the examples displayed in the web UI for inspiration.
optional If your prompt doesn't specify a timeframe, you can still specify it for the dashboard in your dashboard header (default is Last 2 hours) or the Custom timeframe settings (for a tile-specific timeframe).
Select Run. Davis CoPilot generates and runs the query for you.
Review the results.
optional Select the Visual tab to change the visualization (refer to the visualization-specific documentation for more information).
To create a notebook section using Davis CoPilot
Go to Notebooks and open or create a notebook you can edit.
Open the Add menu and select Davis CoPilot. A new Davis CoPilot notebook section is created with an empty prompt box.
In the prompt box, type a prompt. Try average cpu usage percentage by host
or see the examples displayed in the web UI for inspiration.
optional If your prompt doesn't specify the timeframe, you can still specify it in your section header. The default is Last 2 hours.
Select Run. Davis CoPilot generates and runs the query for you.
optional If you want to see the generated query before running it, open the menu next to the Run button and select Generate DQL only.
Review the results.
optional Select the Options in the section header to change the visualization (refer to the visualization-specific documentation for more information).
To have Dynatrace automatically select a visualization for your query, turn on Auto select in the upper-right corner of your visualization settings pane.
To explore logs, metrics, or business events with our point-and-click interface
In your document, open the Add menu and select Logs, Metrics, or Business Events.
The layouts differ slightly between Dashboards and Notebooks to suit the different contexts, but the functionality is the same.
Use the displayed elements to define your exploration.
In this example, we focus on Logs. By default, the filter field and a default limit of 20 is added.
Click into the filter field and, for example, select content as a field from the list of suggested fields.
Add an operator and a search string right after. Read more on how the filter field works in the dedicated documentation.
=
!=
in
not in
Note: Combining =
with a wildcard in before *
, after, or both, before your search term will resolve to a starts with, ends with, or contains filter respectively.
The on the bottom of the definition opens a menu of additional commands you can add.
Select any in the definition to remove the element that comes before the . If you remove an element and then change your mind, you can use to select it from the menu and add it back to your definition.
Select Run to test it and see your results.
When you need to further advance with Grail to cover more complex use cases, you can create a DQL dashboard tile or notebook section from it. The result of this step is equivalent to opening the menu, selecting DQL, and writing a DQL query without this web UI assistance. Then you can edit the DQL directly as needed, and you're free to delete the exploration version if you no longer need it.
This exploration functionality is the same in the Dashboards and Notebooks apps. We use Notebooks in this example.
Open the Notebooks app and select Notebook in the app header to create a new document.
In the empty document, open the Add menu and select Logs.
Inspect the results (initially, results are automatically fetched).
Done. You have fetched the first 20 log lines with just a few clicks.
But with no filters set—no selections for content, status, or limit—it shows the first 20 log records (the default for Limit). To make your result more useful, you need to filter it.
The default settings look like this:
Starting from the previous example, let's add a log.source filter to return only those logs where the log.source field contains a certain string.
To do this, we need to specify
=
Insert your cursor in the filter field and start typing log.source, or search for it via the search at the top of the suggestions, and select it.
Add =
as an operator by either selecting it from the suggestions from the auto complete or by typing it.
Enter the string you want to search for.
For this example, enter oneagent
to get all logs where the log.source field contains oneagent
.
Add *
a wildcard before and after your filter term such that the results are restricted to logs where the log.source field contains oneagent
instead of only considering exact matches.
Select Run and inspect the results.
Starting from the previous example, let's add a content filter to focus on logs where the content contains the string crash
(and, because we are starting from the previous settings, where the log.source field contains oneagent
).
Insert your cursor in the filter field immediately after the previously added log.source filter and either select content from the suggested fields or type it in.
Add =
as an operator by either selecting it from the suggestions from the auto complete or by typing it.
Enter the string you want to search for.
If you are using Dashboards, you can also reference existing variables by entering a $
sign and selecting the desired variable. In this example, we are looking for logs that contain the string crash
somewhere in the content, so enter crash
.
Add *
a wildcard before and after your filter term such that the results are restricted to logs where the content field contains crash
instead of only considering exact matches.
Select Run and inspect the results.
Now the results are restricted to logs where the log.source field contains oneagent
and the content contains the string crash
. If you want to search for all occurrences where either one or the other filter applies, add an OR
between the two filters.
Starting from the previous example, let's add a status filter to focus on logs that contain status strings (and, because we're building on the previous settings, where the log.source field contains oneagent
and the content contains the string crash
).
status
from the suggested fields or type it in.in
as an operator by either selecting it from the suggestions or by typing it.To sort your results
To summarize your results
You can convert log-based events to a timeseries format appropriate to be visualized with graph visualizations. This is done by counting occurrences of fields specified for each timeslot.
To can convert log-based events to a timeseries format
To change the limit of your results, change the value of Limit to the maximum number of records you want to return.
This exploration functionality is the same in the Dashboards and Notebooks apps. We use Notebooks in these examples.
Open the Notebooks app and select Notebook in the app header to create a new notebook.
In the empty notebook, open the Add menu and select Metrics.
Use the metric selector to select the metric you want to explore.
For example, if you want to explore a metric for Kubernetes workloads, you can search for the string or use the menu to find what you want.
In this example, we searched for cpu usage
and selected the best match.
Additional options are displayed after you select a metric.
Select Run to see what we have so far.
Without making any additional settings, we get this line chart of the metric average over time.
To see additional options for a metric, use the metric-specific menus:
These options are described below.
If you still aren't finished and you want to keep configurations for potential latter adjustments, you can hide or show selected metrics or expressions.
To make a copy of a metric or expression that you have already added, open the menu for that metric or expression and select Duplicate. Edit the copy as needed.
To remove a metric or expression from your query, open the menu for that metric or expression and select Delete.
Starting from the previous example, let's add a host.name filter to focus on specific hosts, where the host.name field contains a certain host name.
Insert your cursor in the filter field and either select host.name from the suggested fields or type it in.
Add =
as an operator by either selecting it from the auto-complete suggestions or by typing it in.
Enter a host name you want to filter by or use one of the value suggestions provided.
Select Run and inspect the results.
Note: As an alternative to using auto-enriched fields such as host.name or k8s.pod.name, names and tags are automatically offered as additional filter values for each entity contained in your data. For example, if your data contains the entity dt.entity.host, the two additional fields dt.entity.host.name and dt.entity.host.tags are offered in the field suggestions for you to use as a filter.
To see the same metric by host, we can aggregate on (Split by) dt.entity.host
and then select Run again. Now we get a separate line per host.
To focus our exploration, we can set a limit on the results returned.
Select and then select Limit from the Available commands. This adds Limit to our available commands.
Set Limit to the maximum number of records we want to return. In this case, we set the limit to 5, and then we ran it again to see the following results.
To shift the metric to a previous period and add it for comparison, select and then select Compare to previous period from the Available commands.
This adds a command where you can provide the relative time shift as a numerical value by seconds, minutes, hours, or days.
To replace null values in your timeseries data, select and then select Default from the Available commands.
This adds a command to enter a positive or negative numerical integer value that is used to replace null values.
To visualize the rate at which a metric is changing, select and then select Rate from the Available commands.
This adds a command to set the rate of the metric to Per Second, Per Minute, Per Hour, or Per Day.
To make your results suitable for certain visualizations such as Single value, Table, or Categorical bar chart, select and then select Reduce to single value from the Available commands.
This reduces the timeseries data to a single value over the selected timeframe and adds this as a new column called value that can then be used to properly map the results to your visualization.
Add expressions to apply arithmetic based on your selected metrics.
Add the metrics you want to base your expression on.
For example, to calculate the total capacity of all your disks, we can select:
A
B
.Select and then select Expression from the options.
Define your expression by combining references from
A
, B
, and C
+
, -
, /
, *
, (
, and )
For example, to calculate the total disk capacity, we simply add both metrics together using A+B
Select Run and inspect the results.
This exploration functionality is the same as described for logs.
To start exploring events
Done. You have fetched the first 20 business events with just a few clicks. But with no filters set—no selections for event.description, event.kind, event.name, event.type, or limit—it shows the first 20 events (the default for Limit). To make your result more useful, you need to filter it.
This exploration functionality is the same as described for logs.
To start exploring business events
Done. You have fetched the first 20 business events with just a few clicks. But with no filters set—no selections for event.provider, event.type, or limit—it shows the first 20 business events (the default for Limit). To make your result more useful, you need to filter it.
Let's add an event.provider filter to return only those business events where the event.provider field contains a certain string.
To do this, we need to specify
=
as an operator by either selecting it from the suggestions or by typing it in.Now the results are restricted to logs where the event.provider field contains our filter value.
Now let's further refine exploration by specifying an event type.
=
as an operator by either selecting it from the suggestions or by typing it in.Now the results are restricted to business events where the event.provider and event.type match our filter values.
To change the limit of your results, change the value of Limit to the maximum number of records you want to return.
Whether you're exploring logs, metrics, or business events, you're automatically creating a DQL query that you can view, copy, and use as the basis of more complex queries.
To see the DQL that is created automatically during your exploration with the point-and-click interface, select DQL.
When you're satisfied with the results but want to advance with more complex DQL commands, you can easily create a standard notebook section or dashboard tile based on it.
Open the menu and select Create DQL section or Create DQL tile
Edit the resulting query section or tile as needed.
If you no longer need the UI-constructed version, you can delete it and just use the duplicate notebook section or dashboard tile with the DQL query.
The result of this step is equivalent to
That's what makes this a great tool for beginners and experts.