Dashboarding
Dynatrace dashboards, notebooks, and data explorer explained.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Migration from Old Dashboard to New Dashboard

MarwanC
Advisor

I am trying to convert this code from the old dash board to have it working on the new dashboard but is not showing.

The migration of the dashboard did not get this righ.

 

Count The no of Management Zone:

timeseries {
management_zone_count = count(dt.entities, filter: { entity.type == "MANAGEMENT_ZONE" })
}

 

Count the Numbers of Tag:

 

timeseries {
applied_tags_count = count(dt.entities, filter: { entity.type == "TAG" })
}

 

I also tried this but none is working - 

fetch dt.metrics
| filter startsWith(metric.key, "dt.sfm.server.automatically_applied_tags")

 

fetch dt.entities
| filter entity.type == "TAG"
| summarize count()

 

fetch dt.metrics
| filter startsWith(metric.key, "dt.sfm.server.management_zones")

 

fetch dt.entities
| filter entity.type == "MANAGEMENT_ZONE"
| summarize count()

 

Any help is much appreciated.

Marwan

2 REPLIES 2

Michal_Gebacki
Community Team
Community Team

Hi everyone!

 

Do you know what might help to solve issue Marwan described above?

 

Any help is highly appreciated, thank you!

Hi,

This behaviour is expected.
In the new Dashboards (v3) the concept of dt.entities is no longer available in Grail, so the queries from the old dashboards cannot be migrated directly.

dt.entities does not exist

Tags are not entities → entity.type == "TAG" will never return data

Management Zones are not entities → entity.type == "MANAGEMENT_ZONE" will never return data

You can only count entities that have a Management Zone assigned, for example:

fetch dt.entity.service
| filter isNotNull(managementZones)
| expand managementZones
| summarize entities_in_mz = countDistinct(id)

t_pawlak_0-1764018675143.png


And you can count entities that contain tags:

fetch dt.entity.service
| filter isNotNull(tags)
| expand tags
| summarize entities_with_tags = countDistinct(id)


t_pawlak_1-1764018705218.png

These queries count entities using MZs or tags —
but not the number of MZs or the number of tags themselves, because those are no longer represented as queryable entities in Grail.

However, the new entity model does expose individual entity types, such as:

  • dt.entity.service
  • dt.entity.host
  • dt.entity.process_group
  • dt.entity.application

These entities contain a field called managementZones, so you can build a table of “how many entities belong to each management zone”, like this:

fetch dt.entity.service
| expand managementZones
| summarize by:{managementZones}, count = countDistinct(id)

t_pawlak_2-1764018872138.png

 



 

Featured Posts