Homeโ€บ๐Ÿ“ก SNMP Extensionsโ€บModule 61 min read ยท 7/16

Screens & Dashboards

Hands-on2 exercises

Entity Screens

Screens define what users see when they click on an entity. Every entity type needs a screen with two parts:

SectionPurposeShows
listSettingsEntity list pageAll devices in a table
detailsSettingsEntity detail pageOne device with charts + children
screens:
  - entityType: my_ext:device
    listSettings:
      layout:
        autoGenerate: false
        cards:
          - key: device_list
            type: ENTITIES_LIST
    detailsSettings:
      staticContent:
        showProblems: true
        showProperties: true
      layout:
        autoGenerate: false
        cards:
          - key: overview_charts
            type: CHART_GROUP
          - key: interface_list
            type: ENTITIES_LIST

Chart Cards

Define charts in chartsCards: โ€” referenced by key from the layout:

chartsCards:
  - key: overview_charts
    displayName: Overview
    charts:
      - displayName: CPU Usage
        visualizationType: GRAPH_CHART
        graphChartConfig:
          metrics:
            - metricSelector: my_ext.cpu:splitBy("dt.entity.my_ext:device")

โš ๏ธ Always include :splitBy("dt.entity.TYPE") in metricSelector โ€” without it, charts show nothing.

Visualization Types

TypeBest ForConfig Key
GRAPH_CHARTTime series (CPU, traffic, errors over time)graphChartConfig
SINGLE_VALUECurrent value (uptime, status)singleValueConfig
TABLETabular data (top-N lists)tableChartConfig
๐Ÿ›  Try it

Add a SINGLE_VALUE chart for sysUpTime to the chartsCards. Use metricSelector com.dynatrace.extension.screen-lab.sysuptime:splitBy("dt.entity.screen_lab:device").

extension.yamlYAML
Loading...

Entity List Cards

Show child entities on the parent detail page:

entitiesListCards:
  - key: interface_list
    pageSize: 10
    displayName: Interfaces
    entitySelectorTemplate: type(my_ext:interface),fromRelationships.isChildOf($(entityConditions))
    charts:
      - displayName: Traffic
        visualizationType: GRAPH_CHART
        graphChartConfig:
          metrics:
            - metricSelector: "my_ext.if.in.octets.count:splitBy()"

๐Ÿ’ก $(entityConditions) is a magic variable โ€” Dynatrace replaces it with the current entity's selector. Adding charts: shows inline sparklines per child row.

Card Type Reference

Card TypeReferencesUsed In
CHART_GROUPchartsCards by keyDetail page
ENTITIES_LISTentitiesListCards by keyList page or detail page
INJECTIONSBuilt-in Dynatrace cardsDetail page
๐Ÿ›  Try itExercise 2

Add an entitiesListCards entry to show child interfaces on the device page. Use fromRelationships.isChildOf($(entityConditions)).

extension.yamlYAML
Loading...

What's Next

Module 7 โ€” Calculated metrics with func: โ€” compute uptime in hours, memory percentage, bandwidth utilization without writing code.