Try it free

Azure topology

  • Latest Dynatrace
  • Explanation

Overview

Dynatrace Azure Cloud Platform Monitoring periodically scans your Azure topology and stores it in Smartscape on Grail. Each Azure resource within your Azure environment is represented as an entity in Dynatrace (in the form of a Smartscape node) containing the resource configuration, its tags, and its relationships to other resources (in the form of Smartscape edges).

When telemetry for resources in your Azure subscription is ingested in Dynatrace (Azure Monitor native platform metrics, Azure logs and events), it's linked to the Smartscape node representing the resource producing it, setting telemetry in context.

This provides you a complete view of your resources with their configuration and telemetry in Clouds Clouds as well as the ability to perform advanced queries on your topology across all monitored Azure subscriptions via Dynatrace Query Language (DQL). Topology also powers Azure tag enrichment for your ingested telemetry.

Use cases

Azure topology on Smartscape on Grail enables multiple powerful use cases, like:

  • Access the inventory of your resources across all your monitored Azure subscriptions, including its configuration, together with their telemetry in Clouds Clouds.

  • Use DQL to query telemetry using topology context. For example, show PercentageCPU for all VM resources registered with a specific Azure Load Balancer or show DataDiskReadOperations_Sec and DataDiskWriteOperations_Sec for all the Azure Managed Disks attached to a given VM instance.

    This helps with simplified observability with topology context as the context data (like load balancer or attached VM resources) is not available as Azure Monitor native platform metric dimensions.

  • Use DQL to query the configuration state of your resources across monitored Azure Subscriptions such as:

    • List all Virtual Machines that do not have VM disk encryption enabled.
    • Pull up a report of VM resources per resource type
    • List internet-facing load balancers

Key concepts

Entities (Smartscape nodes)

Dynatrace scans your Azure Subscriptions' topology by querying Azure Resource Graph to retrieve resource configuration and tag information.

Resources are then persisted as entities in Smartscape on Grail.

In addition to the Smartscape on Grail common attributes, all Azure entities have the following attributes:

  • azure.subscription
  • azure.location
  • azure.resource.id
  • azure.resource.group
  • azure.resource.name
  • azure.resource.type
  • tags

Smartscape node types for Azure follow the resource type notation, making all letters uppercase and substituting . & / with _. For example, a Azure resource type microsoft.compute/virtualmachines would be persisted in Smartscape as node type AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES.

Smartscape nodes can be fetched via DQL in Notebooks Notebooks with the smartscapeNodes command as in this example:

smartscapeNodes "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"

Entities are produced from information from Azure Resource Graph and Azure Resource Manager APIs and contain the resource configuration in the azure.object attribute. The azure.object attribute is a JSON structure with the following format:

{
"configuration": "<output_of_arg_or_arm_api>"
}

Relationships (Smartscape edges)

While scanning Azure topology, Dynatrace also discovers relationships between resources and persists them in Smartscape on Grail as static edges.

For details, see Smartscape on Grail.

Topology data freshness

Dynatrace performs a full scan of your topology data on your Azure Subscriptions every hour. In addition, Dynatrace refreshes tag information and checks for resource changes (using Azure Resource Graph) every 5 minutes.

You can see the timestamp when a given Smartscape node was updated looking at the lifetime.end attribute.

When querying topology, make sure you select at least the last hour on the query timeframe to list all active resources.

Dynatrace scans the topology of the Azure Regions that have been selected for monitoring.

Tag-based filtering and topology

Azure tag-based filters configured on the connection apply to topology ingest as well as metric ingest.

Azure tag-based filters instruct the Dynatrace poll services to include or exclude signals for ingest based on Azure tag key-value pairs.

  • Filters apply to both metric ingest and topology ingest.
  • You can configure a maximum of five include and five exclude tag key-value pairs per connection.
  • Filters evaluate only the tags that Azure reports for the resource itself. Dynatrace doesn't add, derive, or inherit tags before filtering.

Why a resource is still monitored after you add an include filter

An include filter can only match a resource that Azure reports the tag for. A resource remains monitored when:

  • Its Azure resource type doesn't support tags. Many types—especially child types—have no tags property. For example, Microsoft.DBforPostgreSQL/flexibleServers supports tags, but Microsoft.DBforPostgreSQL/flexibleServers/configurations doesn't. To check a type, see Tag support for Azure resources.

  • The tag is set on the resource group or the parent resource, not on the resource. Azure resources don't inherit tags from a resource group or subscription, and Dynatrace doesn't propagate tags from a parent resource to its children. The same applies to resources in Azure-managed resource groups, such as the MC_<cluster-name>_<region> group that Azure Kubernetes Service creates. Dynatrace collects these resources together with their parent, but Azure doesn't inherit the parent's tags to them. Configure tag inheritance in Azure instead—see Configure tag inheritance in Azure.

Configure tag inheritance in Azure

Because Dynatrace filters on the tags Azure reports, make sure the tag exists in Azure on every resource you want the filter to match.

Repeat the following steps for each tag key you filter on.

  1. In the Azure portal, go to Policy > Assignments and select Assign policy.

  2. On the Basics tab, set Scope to the subscription or management group that contains your resources.

  3. For Policy definition, search for Inherit a tag and select the built-in definition that matches where your tag is set:

    • Inherit a tag from the resource group: adds the tag, or replaces its value, on resources when they are created or updated.
    • Inherit a tag from the resource group if missing: adds the tag only when the resource doesn't already have it, and keeps any existing value.
    • Inherit a tag from the subscription and Inherit a tag from the subscription if missing: the same behavior, for a tag set on the subscription.
  4. On the Parameters tab, enter the tag key.

  5. On the Remediation tab, select Create a remediation task so the policy also tags resources that already exist. Without it, the policy tags only resources that are created or updated after you assign it.

  6. Select Review + create, and then Create.

For child resource types that have no tags property, tag inheritance isn't possible in Azure. Filter on the parent resource type instead, and use Smartscape relationships to reach the children in Clouds Clouds and DQL.

For details, see Assign policy definitions for tag compliance in the Azure documentation.

Verify which entities your tag filter matches

To find the Azure resource types in your environment that carry no value for the tag key you filter on, run this query in Notebooks Notebooks. Replace environment with your filter tag key and set the timeframe to at least the last hour.

smartscapeNodes "AZURE*"
| filter isNull(`tags:azure`[environment])
| summarize count = count(), by: {azure.subscription, azure.resource.group, azure.resource.type}
| sort count desc

Each row is a resource type an include filter on that key can't match. For each one, check whether the type supports tags in Tag support for Azure resources, whether the resource group is Azure-managed, or whether the tag is set only on the parent.

To inspect every Azure tag on one resource:

smartscapeNodes "AZURE*"
| filter azure.resource.name == "my-resource-name"
| fields azure.resource.id, azure.resource.type, `tags:azure`

Access Azure topology data in Dynatrace

You can access topology data via Clouds Clouds to visualize entities and their telemetry or via Notebooks Notebooks to perform advanced DQL queries.

Query topology data via DQL

By using DQL in Notebooks Notebooks, you can perform advanced topology queries across all your monitored Azure Subscriptions. To help you get started, you can find some useful query examples below.

List the count of entities by type

The following query gives you an overview of your Azure entities discovered by Dynatrace, broken down by Azure Subscription ID and Region, sorted by number of entities.

smartscapeNodes "AZURE*"
| summarize count=count(), by:{azure.subscription, azure.location, type}
| sort count desc

Query all Virtual Machines with a specific tag

The following query fetches Smartscape nodes of type AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES that have the tag owner_team with value team-acme.

smartscapeNodes "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"
| filter `tags:azure`[owner_team]=="team-acme"

Query all Virtual Machines including a subset of their configuration attributes

The following query fetches Smartscape nodes of type AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES, including the attributes managedDiskId, storageAccountType, and diskSizeGB.

smartscapeNodes "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"
| parse azure.object, "JSON:azurejson"
| fieldsAdd managedDiskId=azurejson[configuration][properties][storageProfile][osDisk][managedDisk][id],
storageAccountType=azurejson[configuration][properties][storageProfile][osDisk][managedDisk][storageAccountType],
diskSizeGB=azurejson[configuration][properties][storageProfile][osDisk][diskSizeGB]
| fieldsRemove azure.object, azurejson

Query the discovered relationship (edge) types by source resource type and target resource type

Fetches the count of relationship types by source resource type and target resource types discovered for your monitored Azure Subscriptions.

smartscapeEdges "*"
| summarize count=count(), by: {edgeType=type, sourceType=source_type, targetType=target_type}

Supported Azure services

For a full list of supported Azure services, including topology relationships and available metric collection sets, see Supported Azure services.

What's next?

We recommend experimenting with our purpose-built Azure topology notebooks, which you can find linked in Clouds Clouds. These notebooks contain multiple example DQL queries and use cases.

Related tags
Infrastructure Observability