Azure Cloud Service Metric Integration
Kloudfuse collects Azure metrics through a dedicated cloud exporter that Kloudfuse deploys inside your cluster. The exporter authenticates to your Azure subscriptions with a service principal and pulls metrics directly from the Azure Monitor API.
|
This integration does not use the Datadog agent, and it does not install anything on your Azure resources. You only need to create a service principal and grant it read access to the subscriptions you want to monitor. Kloudfuse then discovers your resources and scrapes a fixed, predefined set of metrics for the resource types it supports. See Metrics Collected for the exact list. |
Complete these tasks to collect Azure metrics:
How Kloudfuse Collects Azure Metrics
When you enable the Azure metrics exporter, Kloudfuse:
-
Authenticates to Azure using the service principal credentials (
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_CLIENT_SECRET) that you provide. -
Discovers the resources in each subscription you list.
-
Polls Azure Monitor every minute for the supported resource types and stores the results as Kloudfuse metrics.
The set of resource types and metrics that the exporter scrapes is predefined and fixed. Resource types that are not in the supported list — for example, virtual machines (Microsoft.Compute/virtualMachines) — are not collected, even though their metrics are available in Azure Monitor. To request coverage for a resource type that is not listed, see Requesting Additional Metrics.
Create an Azure App Registration and Service Principal
The exporter authenticates as an Azure application (service principal). Create one app registration, generate a client secret, and grant the service principal read access to every subscription you want to monitor. This produces the four values you supply to the cloud exporter: the client ID, tenant ID, client secret, and one or more subscription IDs.
Required Azure Roles
Assign both of the following built-in roles to the service principal, at the subscription scope, for every subscription you want to monitor:
| Azure Role | Purpose | Required For |
|---|---|---|
|
Read-only access to enumerate resources in the subscription. |
Resource discovery (required for all configurations). |
|
Read-only access to Azure Monitor metrics and metric definitions. |
Reading metric data (required for all configurations). |
Create the Service Principal (Azure CLI)
-
Create the app registration and service principal, and assign the
Readerrole on the first subscription:az ad sp create-for-rbac \ --name "kloudfuse-metrics-reader" \ --role "Reader" \ --scopes "/subscriptions/<SUBSCRIPTION_ID>"The command output contains the values you need:
Output field Cloud exporter value appIdAZURE_CLIENT_IDpasswordAZURE_CLIENT_SECRETtenantAZURE_TENANT_IDThe password(client secret) is shown only once. Copy it immediately and store it securely. -
Grant the
Monitoring Readerrole to the same service principal:az role assignment create \ --assignee "<AZURE_CLIENT_ID>" \ --role "Monitoring Reader" \ --scope "/subscriptions/<SUBSCRIPTION_ID>" -
To monitor additional subscriptions, repeat both role assignments for each subscription ID, reusing the same service principal:
az role assignment create --assignee "<AZURE_CLIENT_ID>" --role "Reader" \ --scope "/subscriptions/<ANOTHER_SUBSCRIPTION_ID>" az role assignment create --assignee "<AZURE_CLIENT_ID>" --role "Monitoring Reader" \ --scope "/subscriptions/<ANOTHER_SUBSCRIPTION_ID>"
Create the Service Principal (Azure Portal)
-
In the Azure portal, go to Microsoft Entra ID > App registrations > New registration. Enter a name (for example,
kloudfuse-metrics-reader) and select Register. -
On the app’s Overview page, copy the Application (client) ID (
AZURE_CLIENT_ID) and the Directory (tenant) ID (AZURE_TENANT_ID). -
Go to Certificates & secrets > New client secret. Copy the secret Value (
AZURE_CLIENT_SECRET) immediately — it is shown only once. -
For each subscription you want to monitor, go to Subscriptions > <your subscription> > Access control (IAM) > Add > Add role assignment, and assign both the Reader and Monitoring Reader roles to the app registration you created. Copy the Subscription ID for use in the cloud exporter configuration.
For detailed, illustrated steps, see the Microsoft documentation on registering an application with Microsoft Entra ID. Kloudfuse only requires the Reader and Monitoring Reader roles.
|
Enable the Cloud Exporter
To send Azure metrics to Kloudfuse, enable cloud-exporter in the global section of the custom-values.yaml file.
global:
cloud-exporter:
enabled: true
Specify Secret and Subscription Information in the Cloud Exporter
Under kfuse-cloud-exporter, add the following code, replacing the redacted values with your actual values from the Azure portal.
Because you can fetch metrics from multiple subscriptions in Azure at the same time, list all your subscriptions in the subscriptions section.
kfuse-cloud-exporter:
azure-metrics-exporter:
enabled: true
subscriptions:
- xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
secrets:
AZURE_CLIENT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
AZURE_TENANT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
AZURE_CLIENT_SECRET: "xxxx~xxxxxx"
Alternatively, you can mount authentication information from a secret instead of adding it in plain text in the custom-values.yaml file. In this case, add the following:
kfuse-cloud-exporter:
azure-metrics-exporter:
enabled: true
subscriptions:
- xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
extraEnv:
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
key: AZURE_CLIENT_ID
name: <Secret-name>
- name: AZURE_TENANT_ID
valueFrom:
secretKeyRef:
key: AZURE_TENANT_ID
name: <Secret-name>
- name: AZURE_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: AZURE_CLIENT_SECRET
name: <Secret-name>
The secret must contain these key-value pairs:
data:
AZURE_CLIENT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
AZURE_TENANT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
AZURE_CLIENT_SECRET: "xxxx~xxxxxx"
Apply the Changes
Apply the updated values to your Kloudfuse deployment:
helm upgrade --install kfuse oci://us-east1-docker.pkg.dev/mvp-demo-301906/kfuse-helm/kfuse \
-n kfuse \
--version <VERSION> \ (1)
-f custom-values.yaml
| 1 | Replace <VERSION> with a valid Kloudfuse release value; use the most recent one. |
After the exporter starts, Azure metrics appear in the Kloudfuse Metrics explorer with the azure_ prefix. If no Azure resource metrics appear, confirm that you have resources of a supported resource type in the configured subscriptions, and that the service principal has the Reader and Monitoring Reader roles.
Metrics Collected
When you enable the Azure metrics exporter, Kloudfuse scrapes the following Azure resource types. Each metric is collected at one-minute granularity and stored in Kloudfuse using the naming convention <prefix><azure-metric-name>, where any character that is not a letter or digit (for example, .) is converted to an underscore (_). For example, the AKS metric node_cpu_usage_percentage becomes azure_containerservice_managedclusters_node_cpu_usage_percentage.
| Azure Resource Type | Kloudfuse Metric Prefix | Metrics |
|---|---|---|
Azure Kubernetes Service (AKS) |
|
18 |
Azure Event Hubs |
|
26 |
Azure Data Explorer (Kusto) |
|
32 |
Azure IoT Hub |
|
19 |
Azure Database for PostgreSQL |
|
18 |
| For authoritative definitions of each Azure metric, see the Azure Monitor supported metrics reference. |
Azure Kubernetes Service (AKS)
Resource type Microsoft.ContainerService/managedClusters. Covers node CPU, memory, disk, and network utilization; Kubernetes node and pod status; cluster autoscaler activity; and API server load.
| Metric | Description |
|---|---|
|
Node CPU usage as a percentage. |
|
Node CPU usage in millicores. |
|
Node resident set size (RSS) memory, in bytes. |
|
Node RSS memory as a percentage. |
|
Node working-set memory, in bytes. |
|
Node working-set memory as a percentage. |
|
Node disk usage, in bytes. |
|
Node disk usage as a percentage. |
|
Bytes received by the node over the network. |
|
Bytes transmitted by the node over the network. |
|
Node status conditions (for example, |
|
Allocatable CPU cores per node. |
|
Allocatable memory per node, in bytes. |
|
Pod readiness status. |
|
Pod lifecycle phase. |
|
Pods the cluster autoscaler cannot schedule. |
|
Nodes the cluster autoscaler considers unneeded. |
|
In-flight requests to the Kubernetes API server. |
Azure Event Hubs
Resource type Microsoft.EventHub/Namespaces. Covers message and byte throughput, requests, connections, capture activity, errors, and namespace size.
| Metric | Description |
|---|---|
|
Messages sent to the namespace. |
|
Messages received from the namespace. |
|
Bytes sent to the namespace. |
|
Bytes received from the namespace. |
|
Requests made to the namespace. |
|
Successful requests. |
|
Throttled requests. |
|
User errors. |
|
Server errors. |
|
Quota-exceeded errors. |
|
Active connections. |
|
Connections opened. |
|
Connections closed. |
|
Event Hubs Capture backlog. |
|
Bytes captured by Event Hubs Capture. |
|
Messages captured by Event Hubs Capture. |
|
Size of the Event Hub, in bytes. |
|
Legacy throughput, request, and error metric aliases. |
Azure Data Explorer (Kusto)
Resource type Microsoft.Kusto/clusters. Covers cluster health and CPU, ingestion latency and results, query performance, cache utilization, batching, continuous export, and materialized views.
| Metric | Description |
|---|---|
|
Cluster health sentinel (returns |
|
Cluster CPU utilization. |
|
Number of cluster instances. |
|
Cache utilization. |
|
Cache utilization factor. |
|
Ratio of used ingestion capacity. |
|
Ingestion latency, in seconds. |
|
Number of ingestion operations, by result. |
|
Age of the oldest message in the ingestion queue. |
|
Events received by data connections. |
|
Events processed by data connections. |
|
Events dropped by data connections. |
|
Blobs received by data connections. |
|
Blobs processed by data connections. |
|
Blobs dropped by data connections. |
|
Number of blobs in an ingestion batch. |
|
Duration of an ingestion batch. |
|
Size of an ingestion batch. |
|
Number of ingestion batches processed. |
|
Query duration. |
|
Concurrent queries running on the cluster. |
|
Throttled commands. |
|
Data-connection discovery latency. |
|
Leader-follower synchronization latency. |
|
Weak-consistency query latency. |
|
Records exported by continuous export. |
|
Materialized view age, in minutes. |
|
Materialized view age, in seconds. |
|
Materialized view data-loss indicator. |
|
Materialized view health ( |
|
Records in the materialized view delta. |
|
Materialized view result. |
Azure IoT Hub
Resource type Microsoft.Devices/IotHubs. Covers device counts, device-to-cloud (D2C) and cloud-to-device (C2D) telemetry and command flow, and device twin read/update operations.
| Metric | Description |
|---|---|
|
Total registered devices. |
|
Connected devices across all protocols. |
|
Device-to-cloud telemetry messages sent successfully. |
|
Total device-to-cloud telemetry messages attempted. |
|
Device-to-cloud telemetry messages routed successfully. |
|
Device-to-cloud telemetry messages dropped. |
|
Device-to-cloud telemetry messages incompatible with the endpoint. |
|
Device-to-cloud telemetry messages written to the fallback route. |
|
Cloud-to-device commands completed. |
|
Cloud-to-device commands abandoned. |
|
Cloud-to-device commands rejected. |
|
Successful device-initiated twin reads. |
|
Failed device-initiated twin reads. |
|
Successful device-initiated twin updates. |
|
Failed device-initiated twin updates. |
|
Successful back-end-initiated twin reads. |
|
Failed back-end-initiated twin reads. |
|
Successful back-end-initiated twin updates. |
|
Failed back-end-initiated twin updates. |
Azure Database for PostgreSQL
Resource type Microsoft.DBforPostgreSQL/flexibleServers. Covers CPU, memory, and storage utilization; IOPS and throughput; connections; and database activity.
| Metric | Description |
|---|---|
|
CPU utilization percentage. |
|
Memory utilization percentage. |
|
Storage utilization percentage. |
|
Storage used, in bytes. |
|
Free storage, in bytes. |
|
I/O operations per second. |
|
Read I/O operations per second. |
|
Write I/O operations per second. |
|
Read throughput, in bytes per second. |
|
Write throughput, in bytes per second. |
|
Active connections to the database. |
|
Failed connection attempts. |
|
Network bytes received. |
|
Network bytes sent. |
|
Database availability ( |
|
Transactions per second. |
|
Number of backend connections. |
|
Number of deadlocks detected. |
Requesting Additional Metrics
The list of resource types and metrics above is the complete set that the exporter scrapes today. If you need metrics for a resource type that is not listed — for example, Microsoft.Compute/virtualMachines — file a feature request with your Kloudfuse contact, specifying the Azure resource type and the metrics you need. Support for the new resource type must be added to the exporter configuration before those metrics can be collected.