Dynatrace Notebook Skill
Overview
Dynatrace notebooks are JSON documents stored in the Document Store containing an ordered array of sections — markdown blocks for narrative and dql blocks for DQL queries with visualizations. Sections render top-to-bottom in array order.
When to use: Creating, modifying, querying, or analyzing notebooks.
Notebook JSON Structure
{
"name": "My Notebook",
"type": "notebook",
"content": {
"version": "7",
"defaultTimeframe": { "from": "now()-2h", "to": "now()" },
"sections": [
{ "id": "1", "type": "markdown", "markdown": "# Title" },
{
"id": "2", "type": "dql", "title": "Query Section", "showInput": true,
"state": {
"input": { "value": "fetch logs | summarize count()" },
"visualization": "table",
"visualizationSettings": { "autoSelectVisualization": true, "chartSettings": {} },
"querySettings": {
"maxResultRecords": 1000, "defaultScanLimitGbytes": 500,
"maxResultMegaBytes": 1, "defaultSamplingRatio": 10, "enableSampling": false
}
}
}
]
}
}
- Sections render in array order.
- Section types:
markdown, dql. (function exists but is rare.)
- Use string-int IDs (
"1", "2", …); UUIDs are also accepted.
content.defaultTimeframe sets the default timeframe; each section can override via section.state.input.timeframe. Hardcoded time filters in DQL are allowed.
Optional content properties: defaultSegments.
Reading & Analyzing
Fetch full content with dtctl get notebook <id> -o json --plain (describe returns metadata only), then inspect the JSON to discover its available properties. Carefully read references/analyzing.md before analyzing.
Create/Update Workflow (Mandatory Order)
Carefully follow the workflow described in references/create-update.md.
Key rules:
- Load domain skills BEFORE generating queries — do not invent DQL.
- Validate ALL section queries before adding to the notebook.
- Set
name before deploying.
- Prefer
autoSelectVisualization: true in visualizationSettings unless the user requested a specific visualization type — when false, state.visualization must be set explicitly.
- Updating — ALWAYS download first:
dtctl get notebook <id> -o json --plain > notebook.json, modify, then deploy the downloaded file. Never reconstruct JSON from scratch or inject an id manually — both silently overwrite UI edits the user made since last deployment.
- Deploy with
dtctl apply — validation runs automatically, and the local file is deleted on success.
Visualization Types
Notebooks support a subset of Dynatrace visualizations:
- Time-series (require
timeseries/makeTimeseries): lineChart, areaChart, barChart, bandChart
- Categorical (
summarize ... by:{field}): categoricalBarChart, pieChart, donutChart
- Single value / gauge / meter:
singleValue, meterBar, gauge
- Tabular (any data shape):
table, raw, recordView
- Distribution/status:
histogram, honeycomb
- Geographic maps:
choropleth, dotMap, connectionMap, bubbleMap
- Matrix/correlation:
heatmap, scatterplot
Required field types per visualization: references/sections.md.
References
| File |
When to Load |
| create-update.md |
Creating/updating notebooks |
| sections.md |
Section types, visualization field requirements, settings |
| analyzing.md |
Reading notebooks, extracting queries, purpose identification |
1---2name: dt-app-notebooks3description: Work with Dynatrace notebooks - create, modify, query, and analyze notebook JSON including sections, DQL queries, and visualizations.4license: Apache-2.05metadata:6 source: https://skillmd.com/skills/om-scogo/dt-app-notebooks7---89# Dynatrace Notebook Skill1011## Overview1213Dynatrace notebooks are JSON documents stored in the Document Store containing an ordered array of **sections** — markdown blocks for narrative and `dql` blocks for DQL queries with visualizations. Sections render top-to-bottom in array order.1415**When to use:** Creating, modifying, querying, or analyzing notebooks.1617## Notebook JSON Structure1819```json20{21 "name": "My Notebook",22 "type": "notebook",23 "content": {24 "version": "7",25 "defaultTimeframe": { "from": "now()-2h", "to": "now()" },26 "sections": [27 { "id": "1", "type": "markdown", "markdown": "# Title" },28 {29 "id": "2", "type": "dql", "title": "Query Section", "showInput": true,30 "state": {31 "input": { "value": "fetch logs | summarize count()" },32 "visualization": "table",33 "visualizationSettings": { "autoSelectVisualization": true, "chartSettings": {} },34 "querySettings": {35 "maxResultRecords": 1000, "defaultScanLimitGbytes": 500,36 "maxResultMegaBytes": 1, "defaultSamplingRatio": 10, "enableSampling": false37 }38 }39 }40 ]41 }42}43```4445- Sections render in array order.46- Section types: `markdown`, `dql`. (`function` exists but is rare.)47- Use string-int IDs (`"1"`, `"2"`, …); UUIDs are also accepted.48- `content.defaultTimeframe` sets the default timeframe; each section can override via `section.state.input.timeframe`. Hardcoded time filters in DQL are allowed.4950**Optional content properties:** `defaultSegments`.5152## Reading & Analyzing5354Fetch full content with `dtctl get notebook <id> -o json --plain` (`describe` returns metadata only), then inspect the JSON to discover its available properties. Carefully read [references/analyzing.md](references/analyzing.md) before analyzing.5556## Create/Update Workflow (Mandatory Order)5758Carefully follow the workflow described in [references/create-update.md](references/create-update.md).5960**Key rules:**61- Load domain skills BEFORE generating queries — do not invent DQL.62- Validate ALL section queries before adding to the notebook.63- Set `name` before deploying.64- **Prefer `autoSelectVisualization: true`** in `visualizationSettings` unless the user requested a specific visualization type — when `false`, `state.visualization` must be set explicitly.65- **Updating — ALWAYS download first:** `dtctl get notebook <id> -o json --plain > notebook.json`, modify, then deploy the downloaded file. Never reconstruct JSON from scratch or inject an `id` manually — both silently overwrite UI edits the user made since last deployment.66- **Deploy with `dtctl apply`** — validation runs automatically, and the local file is deleted on success.6768## Visualization Types6970Notebooks support a subset of Dynatrace visualizations:7172- **Time-series** (require `timeseries`/`makeTimeseries`): `lineChart`, `areaChart`, `barChart`, `bandChart`73- **Categorical** (`summarize ... by:{field}`): `categoricalBarChart`, `pieChart`, `donutChart`74- **Single value / gauge / meter**: `singleValue`, `meterBar`, `gauge`75- **Tabular** (any data shape): `table`, `raw`, `recordView`76- **Distribution/status**: `histogram`, `honeycomb`77- **Geographic maps**: `choropleth`, `dotMap`, `connectionMap`, `bubbleMap`78- **Matrix/correlation**: `heatmap`, `scatterplot`7980Required field types per visualization: [references/sections.md](references/sections.md).8182## References8384| File | When to Load |85|------|-------------|86| [create-update.md](references/create-update.md) | Creating/updating notebooks |87| [sections.md](references/sections.md) | Section types, visualization field requirements, settings |88| [analyzing.md](references/analyzing.md) | Reading notebooks, extracting queries, purpose identification |