Notebooks
Latest Dynatrace
With Notebooks , you can create powerful, data-driven documents for custom analytics.
Notebook capabilities
Notebooks are your go-to place for data exploration.
-
Custom analytics
Query, analyze, and visualize all your observability data such as logs, metrics, and events powered by Grail.
-
Extract fields
Use the DPL Architect tool to extract additional typed fields from the data in Grail.
-
Collaborate
Create and collaborate on interactive, data-driven, and persistent documents.
-
Fetch external data
Fetch and incorporate external data by running Dynatrace functions.
-
Give context
Annotate and add context with markdown.
Notebook sections
Notebooks can consist of multiple sections:
Explore sections
You can use the Explore options to explore your logs, metrics, and business events with our point-and-click interface. With zero knowledge of DQL or coding, you can create and start using notebook sections in minutes.
For more information, we have a whole Explore data page that shows you how to create Explore sections.
Query section
The query sections allow you to easily query data from Grail and visualize the result in different ways.
The query section consists of a query input where you can write a DQL query. In the query input, use Ctrl+Space to trigger autocompletion at any time.
You can control the timeframe for the query via the timeframe dropdown list. If the timeframe is defined in the query itself, the dropdown list is disabled.
Code section
The code section enables you to fetch data for your notebook using Dynatrace functions.
Markdown section
A markdown section can be anything from a minor note about something on the dashboard to a whole page of formatted information with links and pictures.
Easy to edit:
Attractive to look at:
To insert queries from your notebook with autocomplete, use Ctrl+Space.
Add links
You can link to other places in your notebook and elsewhere.
A link in Markdown is a label and link of the form [label](address)
, where:
- The
label
is freeform text to display on the link in your Markdown tile or section - The
address
specifies what to open when someone selects the link, such as a website or a Dynatrace app
Link to | Syntax and examples |
---|---|
Website |
|
Notebooks app |
|
Specific notebook | Syntax:
Example:
To get the address
|
Specific notebook section | Syntax:
Example:
To get the address
|
Create a notebook
To create a new notebook
-
In the Dynatrace Launcher, select Notebooks.
The Notebooks app starts.
-
Select the in the app header. New notebooks are always blank and created as drafts. Drafts are not saved automatically. To save a notebook, select Save in the application header.
Davis CoPilot
To create a notebook section using Davis CoPilot to translate your natural language questions into DQL queries
-
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.
- You can review the query by expanding DQL on the right.
- optional You can't edit the query directly in CoPilot, but you have two options for reusing it:
- Copy the query and paste it elsewhere manually.
- Open the menu in the section header and select Create DQL section to create a DQL section from this query.
- You can edit your original prompt, regenerate the query, and run it to update the results.
If you select Rerun sections, the Notebooks app will first check if any prompts have been edited.- If a prompt has been edited, the DQL will first be regenerated and then run.
- If no prompts have been edited, the existing generated DQL will simply be run.
-
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.
- If you manually select a different visualization, the Auto select switch will turn off.
- To have Dynatrace once again automatically select a visualization, turn Auto select back on.
Explore logs, metrics, and business events
The Explore sections offer the easiest way to get started.
- To dive right in, just display a notebook, open the Add menu, and select Logs, Metrics, or Business Events.
- To learn more about Explore sections first, see Explore data.
Query Grail
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 add data to a notebook
-
Open the Add menu and select DQL.
An empty section is added to the notebook and an Options side panel opens on the right.
-
In the section edit box, use the Dynatrace Query Language (DQL) to define your query.
-
Select Run to execute the DQL query. The Notebooks app automatically visualizes the result.
-
Select Add title to add the title header to this notebook section.
-
Select a visualization to display your results in your preferred format. Adjust visualization settings as needed.
To have Dynatrace automatically select a visualization for your query, turn on Auto select in the upper-right corner of your visualization settings pane.
- If you manually select a different visualization, the Auto select switch will turn off.
- To have Dynatrace once again automatically select a visualization, turn Auto select back on.
Add code
To add code fetching data for your notebook using Dynatrace functions
- Open the Add menu and select Code.
- Select Run query to execute code. The Notebooks app automatically visualizes the result.
- Select Add title to add the title header to this notebook section.
- Select a visualization to display your results in your preferred format. Adjust visualization settings as needed.
To have Dynatrace automatically select a visualization for your query, turn on Auto select in the upper-right corner of your visualization settings pane.
- If you manually select a different visualization, the Auto select switch will turn off.
- To have Dynatrace once again automatically select a visualization, turn Auto select back on.
Add Markdown-formatted text
To add a Markdown-formatted annotation to a notebook
- Open the Add menu and select Markdown.
- Enter your text. Use Markdown to format your text and add links and images. You can use the toolbar to insert common elements like a heading, bold text, or a link.
Edit a section
To see the edit commands for a section, select the section.
Copy to another document
Use Open with to copy a notebook section to another document (such as a different notebook or a dashboard).
An easy way to start a new notebook is to use Open with to copy reusable sections from existing notebooks to a new notebook and then edit the copied sections in the new notebook.
Example
To copy a notebook section to a dashboard (as a dashboard tile)
-
In the notebook, select the notebook section that you want to copy to a dashboard.
-
Select > Open with.
-
In the Open with… window, select the Dashboards option.
A Select destination box is displayed.
-
In Select destination, you can create a new dashboard or select an existing dashboard.
-
Select Add.
The dashboard opens with the selected section copied into it.
For details, see Open with.
Duplicate section
To create a copy of a section within your notebook
- Select the section.
- Select > Duplicate section.
Move section
To move a section up or down within your notebook
- Select the section.
- Select and drag the section to a new location within the notebook.
Alternate method:
- Select the section.
- Select > Move section up or Move section down.
Delete section
To remove a section from your notebook
- Select the section.
- Select > Delete section.
Select segments
To filter data, you can specify segments for a section.
-
In the action bar for that section, select and, in Filter by segments, select a segment.
-
If the segment requires an additional value selection, select it now.
-
To add another segment, select Segment. Repeat this step for each segment you want to add for the selected notebook section.
-
Select Apply to apply the selection.
- The segment selector for that section now displays the name of the selected segment or, if you select more than one segment, the number of selected segments.
- To change your segment selection, select again, make your changes, and select Apply.
- To manage segments in general (list, create, view, edit, delete), select and then select the Manage segments link.
Run code
To run a code section
- Select the section.
- Select Run code.
After you run a code section, you can clear the code results
- Select the section.
- Select > Clear result.
Show or hide code
To display the code in a code section
-
Select the section.
-
Select Show code.
The code is displayed in a panel above the section.
To hide the code panel again, select Hide code.
Run query
To run a query section
- Select the section.
- Select Run query.
After you run a query section, you can clear the query results
- Select the section.
- Select > Clear result.
Show or hide query
To display the query in a query section
-
Select the section.
-
Select Show query.
The query is displayed in a panel above the section.
To hide the query panel again, select Hide query.
Options
To open the Options panel (where you can select and customize a visualization for your section)
- Select the section.
- Select Options.
Copy section link
To copy a link to a section
- Select the section.
- Select > Copy [section type] link.
Download result
To download (export) the result of the current dashboard tile or notebook section
-
Hover over the tile or section to display available commands.
-
On the command bar, select More actions > Download result > [format].
The result is downloaded to a local file in the selected format.
The selection of download formats available depends on the visualization.
- CSV: The result is downloaded to a local comma-separated values (*.csv) file
- JSON: The result is downloaded to a local JSON (*.json) file
Some visualizations offer no option for downloading the result.
Add notebook to Dock
To add your notebook to the Dock for easy access, open the menu next to the notebook name and select Add to Dock.
Share a notebook
If you own a document (dashboard or notebook), you can share it.
There are two ways to share a document with other Dynatrace users in your company:
- Share access: Create and maintain a list of users and user groups that can access the document.
- Share links: Create links (URLs) pointing to your document and distribute the links through the channel of your choice (email, for example).
These methods are not mutually exclusive. For example, you can maintain a focused list of users for ongoing access to the document (maybe everyone in a certain group edits the document regularly) and you can create and distribute view-only links for a wider audience as needed.
In either case, you control whether people can edit the document or only view it.
For details on sharing documents, see Share documents.
You can also export a notebook as a JSON file and send the JSON to others. For details, see export/import.
Change notebook owner
When you create a document (dashboard or notebook), you are the owner. To give ownership of the document to another Dynatrace user
- Open the document menu and select Change owner.
- Find and select a new owner, and then select Change owner.
Be aware that you will lose all access to the document unless the new owner gives you permission.
Print or export to PDF
To print a notebook or export it to PDF
-
Open your notebook.
-
optional Prepare your notebook sections for printing.
For example:
- Select Run to get the latest result before printing
- Select Hide input to hide a section query and display only the result
- Set visualization options, such as hiding sensitive or irrelevant table columns that you don't want to print and distribute
-
From the notebook menu, select Print view.
A printable view of the notebook is displayed on a Print preview page with print settings displayed at the top.
-
Select the page size (
A4
orUS Letter
) and orientation (Portrait
orLandscape
), and then select Print.The notebook is displayed in a print options window. Each notebook section prints to a new page.
-
Make additional print settings as needed, and then select Save or Print (depending on the print destination) to finish.
Known print limitations
- When printing in
Landscape
mode, a table may overlap the next section. - When Dynatrace is in dark mode, printing a notebook uses dark mode color schemes. To avoid this, you can temporarily switch Dynatrace to light mode: from the Dynatrace user menu (in the lower-left corner of Dynatrace), select Appearance > Light.
Start forecast analysis
From your notebook, you can trigger a series forecast analysis based on Davis AI.
In this example, we issue the following query:
timeseries avg(dt.host.cpu.usage), by:{ dt.entity.host }
and then run a forecast for a time series selected in the results.
-
In a notebook, select > DQL.
-
Enter a query such as
timeseries avg(dt.host.cpu.usage), by:{ dt.entity.host }
to chart time series. -
Select Run query.
-
Hover over the required time series in the sidebar and select > Filter and forecast.
-
The query is automatically updated to filter by the selected time series and the chart is extended to show the projection for the selected series.
For details, see Davis® forecast analysis
List notebooks
To list all notebooks
- Go to Notebooks.
- In the Notebooks panel, select All notebooks.
List my notebooks
To list all notebooks you own
- Go to Notebooks.
- In the Notebooks panel, select All notebooks.
- At the top of the Notebooks table, select My notebooks.
List notebooks shared with me
To list all notebooks that are shared with you
- Go to Notebooks.
- In the Notebooks panel, select All notebooks.
- At the top of the Notebooks table, select Shared with me.
List ready-made notebooks
To list all ready-made notebooks
- Go to Notebooks.
- In the Notebooks panel, select Ready-made notebooks.
Alternatively, you can select All notebooks and then change the filter at the top of the table from All notebooks to Ready-made.
- Created and automatically distributed by Dynatrace as examples and templates.
- Read-only: you can't change them, but you can make copies and edit the copies.
- This icon in a table of documents indicates that it's a ready-made document.
Manage notebooks
Create, duplicate
To create a new notebook, see Create a notebook
To duplicate a notebook
- At the top of the notebook, open the menu next to the notebook name.
- Select Make a copy from the menu.
Alternatively, you can also trigger the same action in the Recently modified section of the sidebar. Select > Make a copy.
Delete
To delete a notebook
- At the top of the notebook, open the menu next to the notebook name.
- Select Delete from the menu.
Alternatively, you can also trigger the same action in the Recently modified section of the sidebar. Select > Delete.
To delete multiple notebooks, select All notebooks and use the buttons in the table.
Export
To export a notebook
- At the top of the notebook, open the menu next to the notebook name.
- Select Download from the menu.
Alternatively, you can also trigger the same action in the Recently modified section of the sidebar. Select > Export as JSON.
Import
To import a notebook from a JSON file
-
Select All notebooks in the document sidebar.
-
In the upper-left corner of the page, select Upload. A file browser window opens.
-
Find and open the notebook JSON definition file.
The definition is imported as a new notebook and listed on the Notebooks page with Last modified set to the import date and time.
Search
The easiest way to search for a notebook is through the global search.
The search can be triggered from any context using the Cmd/⌘+K keyboard shortcut. Notebooks with matching titles will show up in the results.
Alternatively, select All notebooks in the sidebar. Enter a search term to list only matching notebooks.
Copy a task from another document
Using Open with, you can copy tasks from other documents to reuse in your workflows.
Example
In this example, we have a Grail query in a dashboard that we want to run as a task in a workflow.
To copy a Grail query from a dashboard to Workflows as a task in a workflow
-
In the dashboard, select the query tile that you want to copy to a workflow.
-
Select > Open with.
-
In the Open with… window, select the Automate DQL Query Workflows option.
A Select destination box is displayed.
-
In Select destination, you can create a new workflow or select an existing workflow.
-
Select Add.
The Workflows application opens with the selected query added as a workflow task.
-
Edit the workflow as needed.
For more details, see Open with.