cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dashboards and Notebooks 101

zietho
Dynatrace Leader
Dynatrace Leader

Let me share some things I've often encountered when talking to you. 

I'll also use this to tie it back to some of the improvements we shipped, ship or that might wait for you next year

0. Get started

Use the Getting Started dashboard or notebook, particularly the links to the Dynatrace Playground environment, to find examples with variations for common visualization types such as Graph, Single value, Pie/Donut, and more.  

zietho_1-1734714516073.png

 

1. Units

Regardless of the visualization type, sometimes you want to change a unit, or the decimals. 
There is more you can do with Units and formats. For example, you can find it in the Visual tab in Dashboards

Example 1 - Select the (base) unit

Revenue over time

zietho_2-1734712954954.png

What if I now want decimals? 

Go to units and formats (or search, which will get to your environments with 1.306, the next release). 

zietho_1-1734709260333.png

Create a new mapping

zietho_3-1734713071454.png

zietho_4-1734713081007.png

Choose the unit that the number is in 

zietho_5-1734713100639.png

Pick the number of decimals 

zietho_6-1734713157691.png

Voila.... 

zietho_7-1734713168154.png

Example 2 - Transform to another (display) unit 

For example, if your numbers are byte-based, some prefer to look at them with base 2 or base 10.

Start with Unit "Byte" (neutral)

zietho_0-1734713601041.png

Now, pick your desired base by selecting Gibibyte (GiB) or Gigabyte (GB), and we will transform it for you! 

zietho_1-1734713627430.png

zietho_2-1734713887473.png

or

zietho_3-1734713897581.png

zietho_4-1734713907737.png

Improvements?

What we know and will improve next year: 

  • Auto selection when mapping
  • Adding commonly used units on top so you don't always have to search for them. 
  • Improve the search
  • and more!

2. Reuse via hidden variables 

What if you want to repeatedly use (join, correlate,..) the same data in multiple tiles and their DQL statements?
Let's create a health tile
 for Kubernetes nodes and make the input data (nodes) dynamic via a hidden variable that might be used in multiple tiles. 

1. Provide the data - Create a DQL tile and use the following query, which joins meta information for Kubernetes nodes with active problems

 

 

fetch dt.entity.kubernetes_node 
| lookup [ 
 fetch dt.davis.problems 
 | filter event.status == "ACTIVE" 
 | expand affected_entity_ids 
], sourceField:id, lookupField:affected_entity_ids 
| fields 
 id, 
 `dt.entity.kubernetes_node.name` = entity.name, 
 `active problems`= if(isNotNull(lookup.affected_entity_ids), 
 "active problem", else: "healthy"), `problem id`= lookup.display_id

 

 

2. Map the data - Go to the "Visual" tab, open the "Data mapping" section, and select "active problems."

zietho_0-1735293510057.png

3. Tailor 

Legend - Go to the "Legend and tooltip" section. De-select all entries in the dropdown and then only select the respective name of the entity to display the name.  

zietho_1-1735293666853.png

Colors - encode the states using color like

zietho_2-1735293706818.png

This should produce a working health tile for your Kubernetes nodes

zietho_3-1735293769174.png

At this point to replicate this for other entity types, it's as easy as replacing the entity type in the first line where it says fetch dt.entity..... For example, I could easily replace dt.entity.kubernetes_node with dt.entity.kubernetes_cluster. Adjust the visual settings above and get. 

zietho_4-1735293942777.png

4. Make the input dynamic with a hidden variable 

4.1 create the fetch call dynamically in a new DQL variable $node with the query: 

 

 

fetch dt.entity.kubernetes_node
| fields id

 

 

 and replace our initial query with: 

 

 

data record(dt.entity.kubernetes_node=array($node))
| expand dt.entity.kubernetes_node
| lookup [
  fetch dt.davis.problems
  | filter event.status == "ACTIVE"
  | expand affected_entity_ids
], sourceField:dt.entity.kubernetes_node, lookupField:affected_entity_ids
| fields 
  dt.entity.kubernetes_node, 
  `dt.entity.kubernetes_node.name` = entityName(dt.entity.kubernetes_node),
  `active problems`= if(isNotNull(lookup.affected_entity_ids), "active problem", else: "healthy"),
  `problem id`= lookup.display_id, 
  `event id`= lookup.event.id

 

 

We changed our initial...

  • Line 1: we now dynamically fetch all possible nodes via a hidden variable $node. And added another line to expand this information to a list in DQL. 
  • Line 9: Using a variable, we now can't directly use the Smartscape information otherwise directly available when using  "fetch dt.entity...". . However, we can access the same information using DQL functions such as entityName(), or entityAttr(). So the initial line 9 becomes `dt.entity.kubernetes_node.name` = entityName(dt.entity.kubernetes_node),

Would we now replicate the tile and, for example, show a table with other additional entity information next to the initial honeycomb? We could now use the same first lines and, this way, hold these two in sync. Any changes needed on the initial input data can be made in the variable $node. The change and results would be immediately reflected in both tiles that use the hidden variable $node.  For example, if you want to constrain the result of your health information to a certain team, the infrastructure area throughout multiple tiles is a non-changeable way for your dashboard consumers.  

zietho_0-1735296177091.png

3. Health tiles

While we're working on the tile and section template for all health tiles, let me share 99% of the work in the following dashboard on the Playground for multiple health tile variants. Use any of the examples by copying and pasting them to your dashboards with the keyboard shortcuts "CMD/CTRL + C" on the Playground example and "CMD/CTRL + V" on your own dashboard.

Alternatively, copy and paste the base code for a service health tile from below.

{"tiles":{"0":{"type":"data","title":"Services","query":"fetch dt.entity.service\n| lookup [\n  fetch dt.davis.problems\n  | filter event.status == \"ACTIVE\"\n  | expand affected_entity_ids\n], sourceField:id, lookupField:affected_entity_ids\n| fields \n  id, \n  name = entity.name,\n  `active problems`= if(isNotNull(lookup.affected_entity_ids), \"active problem\", else: \"healthy\"),\n  problem.id= lookup.display_id,\n  event.id= lookup.event.id","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"honeycomb","visualizationSettings":{"thresholds":[],"chartSettings":{"xAxisScaling":"analyzedTimeframe","gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"curve":"linear","pointsDisplay":"auto","categoricalBarChartSettings":{"categoryAxisLabel":"id,name,active problems","valueAxisLabel":"","tooltipVariant":"single","categoryAxis":["id","name","active problems"],"valueAxis":[]},"hiddenLegendFields":[],"truncationMode":"middle"},"singleValue":{"showLabel":true,"label":"error","prefixIcon":"","autoscale":true,"alignment":"center","colorThresholdTarget":"value","recordField":"error","trend":{"trendType":"auto","isVisible":true}},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"linewrapEnabled":false,"lineWrapIds":[],"monospacedFontEnabled":false,"monospacedFontColumns":[],"columnWidths":{"[\"entity.name\"]":269.09375},"columnTypeOverrides":[]},"honeycomb":{"shape":"hexagon","legend":{"hidden":false,"position":"auto"},"colorMode":"custom-colors","colorPalette":"categorical","dataMappings":{"value":"active problems"},"displayedFields":["name"],"customColors":[{"id":0,"value":"healthy","comparator":"=","color":{"Default":"var(--dt-colors-charts-categorical-themed-swamps-color-01-default, #006650)"}},{"id":577652.3999999985,"value":"active problem","comparator":"=","color":{"Default":"var(--dt-colors-charts-categorical-color-12-default, #cd3741)"}}],"truncationMode":"middle"},"histogram":{"dataMappings":[],"variant":"single","displayedFields":["id","active problems"]},"autoSelectVisualization":false},"timeframe":{"tileTimeframeEnabled":false,"tileTimeframe":{"from":"now()-7d","to":"now()"}},"querySettings":{"maxResultRecords":1000,"defaultScanLimitGbytes":500,"maxResultMegaBytes":1,"defaultSamplingRatio":10,"enableSampling":false}}},"layouts":{"0":{"x":0,"y":5,"w":7,"h":6}},"variables":[],"variableValues":{}}

 

 

 

0 REPLIES 0

Featured Posts