WMI tutorial - custom topology
Having a well-defined topology model helps make sense of all the metrics and data ingested in Dynatrace.
For an Extensions 2.0 extension, this all happens in the topology
section, which is split into two parts:
types
- defines which new entity types the extension monitorsrelationships
- defines if and how these entity types relate to each other
Key aspects when defining types
idPattern
- Must be unique enough to represent each device instance without duplicating itsources
- Must define rules for all metrics of the extension that should be split by this entitycondition
- Can make use of functions like$prefix(...)
to define patterns for metric keysattributes
- Are optional details that can be extracted from the dimensions of metrics
Key aspects when defining relationships
sources
- Any metric that matches the pattern will be evaluated for a relationship. This means it should belong to both entity types part of the relationship
Find your new entities un UI
Navigate to ../ui/entity/list/{entity-type}
on your Dynatrace environment. For example:
../ui/entity/list/wmi:generic_host
../ui/entity/list/wmi:generic_network_device
Tasks
- Add the
topology
section to yourextension.yaml
using the template below. Define two entity types for a Generic Host and a Generic Network Device.
- Ensure that network devices are aware of the type (
Adapter
orInterface
). Create a relationship between the two where a Generic Network Device runs on a Generic Host.
Package and upload a new version of your extension.
Validate the new entities are created.
For more information on extending the Dynatrace topology, see Custom topology model
1topology:2 types:3 - name: wmi:generic_host4 displayName: Generic Host5 enabled: true6 rules:7 - idPattern: wmi_generic_host_{dt.entity.host}8 sources:9 - sourceType: Metrics10 condition: $prefix(custom.demo.host-observability)11 attributes: []12 requiredDimensions: []13 instanceNamePattern: Generic Host on {dt.entity.host}14 - name: wmi:generic_network_device15 displayName: Network device16 enabled: true17 rules:18 - idPattern: wmi_generic_{dt.entity.host}_{network.type}_{network.name}19 sources:20 - sourceType: Metrics21 condition: $prefix(custom.demo.host-observability.network)22 attributes:23 - pattern: '{network.name}'24 key: wmi_network_name25 displayName: Name26 - pattern: '{network.type}'27 key: wmi_network_type28 displayName: Type29 requiredDimensions: []30 instanceNamePattern: Network {network.type} {network.name} on {dt.entity.host}31 relationships:32 - typeOfRelation: RUNS_ON33 fromType: wmi:generic_network_device34 toType: wmi:generic_host35 enabled: true36 sources:37 - sourceType: Metrics38 condition: $prefix(custom.demo.host-observability)
Results
You should see new entities created for your generic host and generic network device entity types:
Next step: Unified analysis page