Notebooks

  • 11min

Latest Dynatrace

Permissions

The following table describes the required permissions.

Permission
Description
app-engine:apps:run
Allows the user to run functions
app-engine:functions:run
Allows the user to run functions
document:documents:read
Allows the user to access notebooks
document:documents:write
Allows the user to create and update notebooks
document:documents:delete
Allows the user to delete notebooks
document:trash.documents:read
Allows the user to access deleted notebooks
document:trash.documents:delete
Allows the user to permanently delete notebooks
document:trash.documents:restore
Allows the user to restore deleted notebooks
document:environment-shares:read
Allows the user to access shared notebooks
document:direct-shares:read
Allows the user to access shared notebooks

With Notebooks Notebooks, you can create powerful, data-driven documents for custom analytics.

Create powerful, data-driven documents.Explore, analyze, and directly interact with all your data.Transform data into insights and uncover the story behind the numbers.Create and share stunning reports with persisted data.Include Davis AI powered anomaly detection and forecasting.
1 of 5Create powerful, data-driven documents.

Use notebooks

List all

To list all notebooks

  1. Go to Notebooks.
  2. In the Notebooks panel, select All notebooks.

List my notebooks

To list all notebooks you own

  1. Go to Notebooks.
  2. In the Notebooks panel, select All notebooks.
  3. At the top of the Notebooks table, select My notebooks.

List notebooks shared with me

To list all notebooks that are shared with you

  1. Go to Notebooks.
  2. In the Notebooks panel, select All notebooks.
  3. At the top of the Notebooks table, select Shared with me.

List ready-made notebooks

What's special about ready-made documents
  • Created and automatically distributed by Dynatrace as examples and templates.
  • Read-only: you can edit them for use during your session, and you can save a copy with your changes, but you can't save your changes to the original document.
  • This icon in a table of documents indicates that it's a ready-made document.

To list all ready-made notebooks

  1. Go to Notebooks.

  2. In the Notebooks panel, select Ready-made notebooks.

    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.

For more about ready-made documents, see Ready-made documents.

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.

To create a new notebook

  1. Go to Notebooks Notebooks.
  2. In the app header, select Notebook.

Now you need to create one or more sections within your notebook. For details, see Create a section.

To make a copy of a notebook

  1. At the top of the notebook, open the menu next to the notebook name.
  2. 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.

To add your notebook to the Dock for easy access

  1. Open the menu next to the notebook name.
  2. Select Add to Dock.

To delete a notebook

  1. At the top of the notebook, open the menu next to the notebook name.
  2. 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.

Create a section

Every notebook needs one or more sections.

To create a notebook section using Davis CoPilot to translate your natural language questions into DQL queries

  1. Go to Notebooks Notebooks and open or create a notebook you can edit.

  2. Open the Add menu and select Davis CoPilot. A new Davis CoPilot notebook section is created with an empty prompt box.

  3. 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.

  4. optional If your prompt doesn't specify the timeframe, you can still specify it in your section header. The default is Last 2 hours.

  5. 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.

  6. 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.
  7. 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.

The Explore sections offer the easiest way to get started.

  • To learn more about Explore sections first, see Explore data.
  • To dive right in, just display a notebook, open the Add menu, and select an Explore option such as Logs, Metrics, Events, Problems, or Business Events.

The fastest and easiest way to explore your data is with an Explore section. In a few seconds, you can find and analyze your logs, metrics, or business events. No DQL required!

To add data to a notebook

  1. Open the Add menu and select DQL.

    An empty section is added to the notebook and an Options side panel opens on the right.

  2. In the section edit box, use the Dynatrace Query Language (DQL) to define your query.

  3. Select Run Run to execute the DQL query. The Notebooks Notebooks app automatically visualizes the result.

  4. Select Add title to add the title header to this notebook section.

  5. Select a visualization to display your results in your preferred format. Adjust visualization settings as needed.

    Automatically select visualization

    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.

To add code fetching data for your notebook using Dynatrace functions

  1. Open the Add menu and select Code.
  2. Select Run query to execute code. The Notebooks Notebooks app automatically visualizes the result.
  3. Select Add title to add the title header to this notebook section.
  4. Select a visualization to display your results in your preferred format. Adjust visualization settings as needed.
    Automatically select visualization

    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.

To add a Markdown-formatted annotation to a notebook

  1. Open the Add menu and select Markdown.

  2. Enter your text. Use Markdown to format your text and add links and images.

    • While you're typing in the edit box, your Markdown is rendered in the section.
    • Press Ctrl+Space on an empty line to pop up a selectable list of available Markdown elements.

    You can use the toolbar to insert common elements like a heading, bold text, or a link:

    Example: Notebooks: edit Markdown section

  • Italics: wrap text in single asterisks (*like this*) to get italics like this.

  • Bold: wrap text in double asterisks (**like this**) to get bold text like this.

  • Strikethrough: wrap text in double tildes (~~like this~~) to get strikethrough (crossed out) text like this.

  • Blockquote: start a line with > to get blockquotes, where everything before you press Enter is quoted.

  • Code:

    • Wrap text in backticks (`like this`) to get code text like this.
    • Wrap text in triple backticks (```like this```) to show a code block (multiple lines of code text).
  • Headings: start a line with one or more # characters to create headings.

  • Horizontal line: to visually separate sections of your annotation, add a horizontal line with three dashes (---).

  • Lists: each line of an unordered (bulleted) list starts with an asterisk (*):

    * Line 1
    * Line 2

    Alternatively, you can use a dash (-):

    - Line 1
    - Line 2

    An ordered (numbered) list starts with a number and a period (1.) followed by a space and then your text:

    1. The first line of my procedure.
    2. The second line of my procedure.
    3. The third line of my procedure.

    If you use 1. for each line number, the lines are renumbered automatically when you display the notebook.

  • Tables: to add a table, define the headers, the column formatting row, and then the rows of data you want to display

    | Header 1 | Header2
    --- | ---
    content2 | content2
    Header 1
    Header2
    content2
    content2
  • Special characters: you can use any printable characters, including emojis such as 😃 and 🌍 and ❤️.

  • Links: to link to a website, use this format:

    [Example text label](https://www.example.com)

    Here's a link to the [Dynatrace website](www.dynatrace.com).
  • Images: to link to a picture, use this format:

    ![alternate text](https://www.example.com/file-name.jpg)

    Here are some of the people who started [Dynatrace](https://www.dynatrace.com).
    ![Dynatrace founders](https://dt-cdn.net/images/original-dynatrace-team-1500-7334dbe9a8.jpg)

Several data and code snippets are available out of the box. Use our predefined DQL or code snippets to quickly start your data analytics journey.

To get started based on a snippet

  1. In a notebook, select Add.

  2. Scroll down to the Start with a snippet section and choose one of the snippets. For example, select the Fetch logs snippet, which is displayed in a preview panel.

  3. When you select a snippet, a notebook section is created for the snippet.

  4. Edit the query or code (depending on the snippet type you selected) and the visualization settings as needed.

  5. Select Run to see results.

The list of available snippets is long and growing. Create a new notebook and try them out.

When you find something interesting:

  • Inspect it to see how it works
  • See if you can tweak and adapt it to your own purposes

Edit a section

To see the edit commands for a section, select the section. If you have edit permission, the edit commands are displayed.

  • is for dragging the section into a different position.
  • Run Run starts your query.
  • sets the segment.
  • displays timeframe options.
  • and decrement and increment the timeframe.
  • and hide and show the input.
  • opens the options panel, where you can select and adjust the visualization.
  • opens a menu of further options:
    • Duplicate section creates a copy of the selected section.
    • Create DQL section creates a DQL section from the selected section.
    • Move section up and Move section down move the section up or down one row.
      Alternative: use to drag the section into a new position.
    • Clear result clears the result. Select Run Run again to get new results.
    • Delete section removes the section from the notebook.
    • Open with opens the section in another document. For details, see Open with.
    • Copy query link copies a link to the clipboard. If you open the link in a browser, the query will be opened in a new or existing notebook.
    • Download result downloads (exports) the result of the current notebook section.
    • Dynatrace Query Language opens DQL documentation.

The available edit options will vary depending on the type of section you're editing.

  • Davis CoPilot section: type a plain-text prompt in the edit box and select Run Run to get an answer.

    Example: Notebooks: edit Davis Copilot section

  • Explore data section: These sections are a great shortcut to results. To learn more about Explore sections, see Explore data.

  • DQL section

    Example: Notebooks: edit DQL section

  • Code section

    Example: Notebooks: edit Code section

  • Markdown section

    Example: Notebooks: edit Markdown section

To filter data for a section, you can specify segments for a section.

  1. In the action bar for that section, select and, in Filter by segments, select a segment.

  2. If the segment requires an additional value selection, select it now.

  3. To add another segment, select Segment. Repeat this step for each segment you want to add for the selected notebook section.

  4. 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.

To open the Options panel (where you can select and customize a visualization for your section)

  1. Select the section.
  2. Select Options.

Manage sections

To move a section up or down within your notebook

  1. Select the section.
  2. Select and drag the section to a new location within the notebook.

Alternate method:

  1. Select the section.
  2. Select > Move section up or Move section down.

To create a copy of a section within your notebook

  1. Select the section.
  2. Select > Duplicate section.

Use Open with to copy a notebook section to another document (such as a different notebook or a dashboard).

  1. Select the section.
  2. Select > Open with.

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)

  1. In the notebook, select the notebook section that you want to copy to a dashboard.

  2. Select > Open with.

  3. In the Open with… window, select the Dashboards option.

    A Select destination box is displayed.

  4. In Select destination, you can create a new dashboard or select an existing dashboard.

  5. Select Add.

    The dashboard opens with the selected section copied into it.

Delete a section

To remove a section from your notebook

  1. Select the section.
  2. Select > Delete section.

To download (export) the result of the current dashboard tile or notebook section

  1. Hover over the tile or section to display available commands.

  2. 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.

When you open a document (dashboard or notebook) for which you don't have write permission, you can still edit the document during your session. After you're finished, you have two options:

  • Save your changes to a new document
  • Discard your changes

Example:

  1. Go to Notebooks Notebooks, list the ready-made notebooks, and select the Getting started notebook.

    It says Ready-made in the upper-left corner, next to the document name.

  2. Select the Line chart section and then select Options.

  3. Change the visualization from Line to Area.

    Now you are offered two buttons: Save as new and Discard changes.

  4. Use the updated notebook as needed. You have full edit access for this session.

  5. When you're finished, select what to do with your changes:

    • Save as new—saves your changes in a new copy of the edited notebook.
    • Discard changes—discards your changes and returns you to the unedited read-only notebook.

Run a section

To run a code section

  1. Select the section.
  2. Select Run code.

After you run a code section, you can clear the code results

  1. Select the section.
  2. Select > Clear result.

To display the code in a code section

  1. Select the section.

  2. Select Show code.

    The code is displayed in a panel above the section.

To hide the code panel again, select Hide code.

To run a query section

  1. Select the section.
  2. Select Run query.

After you run a query section, you can clear the query results

  1. Select the section.
  2. Select > Clear result.

To display the query in a query section

  1. Select the section.

  2. Select Show query.

    The query is displayed in a panel above the section.

To hide the query panel again, select Hide query.

Share with others

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, and then they can import the JSON.

To export a notebook

  1. At the top of the notebook, open the menu next to the notebook name.
  2. 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.

To import a notebook from a JSON file

  1. Select All notebooks in the document sidebar.

  2. In the upper-left corner of the page, select Upload. A file browser window opens.

  3. 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.

When you create a document (dashboard or notebook), you are the owner. To give ownership of the document to another Dynatrace user

  1. Open the document menu and select Change owner.

  2. Find and select a new owner, and then select Change owner.

    When you change the document owner, you immediately lose access to the document.

    • Be sure you are ready to transfer ownership before you select this command.
    • You can regain access to the document only if the new owner gives you permisssion.
  3. After the transfer is complete, the new owner will receive email about the document ownership transfer.

To print a notebook or export it to PDF

  1. Open your notebook.

  2. 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
  3. From the notebook menu, select Print view.

    Open notebook menu from current notebook

    A printable view of the notebook is displayed on a Print preview page with print settings displayed at the top.

  4. Select the page size (A4 or US Letter) and orientation (Portrait or Landscape), and then select Print.

    The notebook is displayed in a print options window. Each notebook section prints to a new page.

  5. 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.

Analyze data

To analyze data using Davis analyzers

  1. Explore a timeseries.

    In your document (dashboard or notebook)

    1. Select to add a new section or tile, and then select Metrics to explore metrics.

      Example: select Add > Metrics

    2. In Select metric, select Infrastructure > CPU > CPU usage %.

      Example: select metric "CPU usage %"

    3. Set Split by to host.name.

      Example: set "Split by" to host.name

    4. Set Limit to the maximum number of series to analyze. Davis analyzer currently supports analysis up to 1000 series.

    You should get something like this:

    Example: complete query

  2. Run the query.

  3. In the options panel on the right, scroll down and expand Davis AI.

    Example: select Davis AI settings

    Example: initial panel for Davis AI

  4. On the Davis AI panel, set Analyzers to the analyzer you want to use, and then configure the analyzer.

    • Number of signal fluctuations—how many times the signal fluctuation is added to the baseline to produce the actual threshold for alerting.
    • Alert condition—your selection depends on whether you want to know when the metric is above, below, or outside (above or below) the normal range.

    For details, see Anomaly detection configuration.

    • Tolerance—the higher the tolerance, the broader the confidence band, leading to fewer triggered events.
    • Alert condition—your selection depends on whether you want to know when the metric is above, below, or outside (above or below) the normal range.

    For details, see Anomaly detection configuration.

    • Threshold—a hard limit that a metric should not violate.
    • Unit—the unit of the value.
    • Alert condition—your selection depends on whether you want to know when the metric is above or below the threshhold value.
    • Suggest threshold—Davis AI can help you to find the right threshold based on historical data.

    For details, see Anomaly detection configuration.

    • Data points to predict—the total steps the time series is forecasted. More steps generally results in less reliable forecasts and longer analyzer runtimes.
    • Forecast offset—an offset for the start of the forecast. For example, if the offset is set to 2, the last two data points are ignored and a forecast for these points is returned as well.

    For details, see Davis® forecast analysis.

    You can use the default values or turn on Show advanced properties to fine-tune these settings.

    • Alert on missing data—alert if no data is detected within the sliding window.
    • Violating samples—number of samples in the sliding window that must violate to trigger an event.
    • Sliding window—number of samples that form the sliding window.
    • Dealerting samples—number of samples in the sliding window that must go back to normal to close the event.
  5. By default, the analyzer is not enabled. To enable it, turn on the switch at the top of the edit panel (switch from Davis analyzer is not active to Davis analyzer is active).

  6. To view the results, select the Davis AI analysis visualization and expand the Davis AI analysis chart section to review or change the visualization-specific settings:

    Example: select "Davis AI analysis" visualization and display visualization-specific settings

    The Davis AI analysis visualization has two sections: chart and visualization. You can use the Visible sections setting to display either or both of them.

    • All—show a chart and a table. The chart reflects your table selections.
    • Table—show only a table. You can sort columns that display a sort icon in the header. Select the column header to toggle the sort order up or down .
    • Chart—show only a chart. Use the table to select entries you want to show on the chart.

Example: anomalous CPU usage percent

To detect when CPU usage percent exceeds 70 percent, in your document (dashboard or notebook)

  1. Select to add a new section or tile, and then select Metrics to explore metrics.

    Example: select Add > Metrics

  2. In Select metric, select Infrastructure > CPU > CPU usage %.

    Example: select metric "CPU usage %"

  3. Set Split by to host.name.

    Example: set "Split by" to host.name

  4. Set Limit to the maximum number of series to analyze. Davis analyzer currently supports analysis up to 1000 series.

    Example: complete query

  5. Select Run.

  6. In the edit panel, expand Davis AI.

    Example: select Davis AI settings

    Example: initial panel for Davis AI

  7. In the Analyzers list, select Static threshold anomaly detection.

    Example: select "Static threshold anomaly detection" analyzer

  8. Set Threshold to 70 (enter a value) and Alert condition to Alert if metric is above (default).

    Example: configure settings for "Static threshold anomaly detection" analyzer

  9. Activate the analyzer: at the top of the edit panel, switch from Davis analyzer is not active to Davis analyzer is active.

  10. To view the results, select the Davis AI analysis visualization. Expand the Davis AI analysis chart section to see visualization-specifc settings.

    Example: select "Davis AI analysis" visualization and display visualization-specific settings

  11. In the Davis AI analysis chart section, set Visible sections to All.

  12. Review the results.

    In this example, we selected the hosts that exceeded the threshold.

    • The chart shows a line for the selected metric (CPU usage %) for each selected host.
    • A red bar across the top of the visualization indicates where the threshold for that metric was exceeded.
    • The table under the chart has those hosts selected.

    Example analyzer results in dashboard with "Davis AI analysis" visualization

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.

  1. In a notebook, select > DQL.

  2. Enter a query such as timeseries avg(dt.host.cpu.usage), by:{ dt.entity.host } to chart time series.

  3. Select Run query.

  4. Hover over the required time series in the sidebar and select > Filter and forecast.

    Filter and forecast: select

  5. 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.

    Filter and forecast: results

For details, see Davis® forecast analysis.