Menu
Grafana Cloud

Azure Metrics integration for Grafana Cloud

Azure is Microsoft’s cloud computing services offering.

Alongside with their compute offering, Azure provides services such as databases, with it’s well known Cosmos DB, storage with Blob Storage, serverless compute with Azure Functions, identity with Azure Active Directory and many others.

The Azure Metrics integration enabled you to send metrics from your Azure projects to Grafana Cloud.

This integration includes 1 pre-built dashboard to help monitor and visualize Azure Metrics metrics.

Before you begin

Grafana Alloy uses an embedded version of the azure-metrics-exporter to collect metrics from Azure Monitor, into Grafana Cloud. Also, Azure Resource Graph is used to identify the resources for gathering metrics.

The exporter uses underneath the Azure SDK. To see how to configure authentication in the environment where the agent will run, please refer to authenticate with Azure.

The Azure credentials used by Grafana Alloy needs:

Install Azure Metrics integration for Grafana Cloud

  1. In your Grafana Cloud stack, click Connections in the left-hand menu.
  2. Find Azure Metrics and click its tile to open the integration.
  3. Review the prerequisites in the Configuration Details tab and set up Grafana Agent to send Azure Metrics metrics to your Grafana Cloud instance.
  4. Click Install to add this integration’s pre-built dashboard to your Grafana Cloud instance, and you can start monitoring your Azure Metrics setup.

Configuration snippets for Grafana Alloy

Advanced mode

The following snippets provide examples to guide you through the configuration process.

To instruct Grafana Alloy to scrape your Azure Metrics instances, manually copy and append the snippets to your alloy configuration file, then follow subsequent instructions.

Advanced integrations snippets

alloy
prometheus.exporter.azure "integrations_azure_exporter" {
	subscriptions = ["<subscription_id>"]
	resource_type = "<resource_type>"
	metrics       = ["<metrics>"]
}

discovery.relabel "integrations_azure_exporter" {
	targets = prometheus.exporter.azure.integrations_azure_exporter.targets

	rule {
		target_label = "job"
		replacement  = "integrations/azure_exporter"
	}
}

prometheus.scrape "integrations_azure_exporter" {
	targets    = discovery.relabel.integrations_azure_exporter.output
	forward_to = [prometheus.remote_write.metrics_service.receiver]
	job_name   = "integrations/azure_exporter"
}

This integrations uses the prometheus.exporter.azure component to generate metrics from a Azure Metrics instance.

For the full array of configuration options, refer to the prometheus.exporter.azure component reference documentation.

Here’s the possible configuration values:

  • subscriptions: Required. The azure subscription(s) to scrape metrics from.
  • resource_type: Required. The Azure Resource Type to scrape metrics for. Valid values can be found as the heading on Supported Metrics with Azure Monitor. E.g.: Microsoft.Cache/redis or microsoft.containerservice/managedclusters.
  • metrics: Required. The metrics to scrape from resources. Valid values can be found in the Metric column for the resource_type on Supported Metrics with Azure Monitor. E.g.: node_cpu_usage_millicores for the microsoft.containerservice/managedclusters resource type.
  • included_dimensions: Optional. Used to include Dimensions available to a Metric definition on Supported Metrics with Azure Monitor. E.g.: node and nodepool in the node_cpu_usage_millicores metric, for the microsoft.containerservice/managedclusters resource type. Note that if you pick a set of dimensions, all metrics in the scrape config should also posses that same set of dimensions.
  • included_resource_tags: Optional. A list of resource tags to include on the final metrics. E.g.: node.

If you need to scrape multiple Azure services, or metrics with different dimension sets, create one exporter for each.

This exporter must be linked with a discovery.relabel component to apply the necessary relabelings.

You can then scrape them by including each discovery.relabel under targets within the prometheus.scrape component.

Grafana Agent static configuration (deprecated)

The following section shows configuration for running Grafana Agent in static mode which is deprecated. You should use Grafana Alloy for all new deployments.

Dashboards

The Azure Metrics integration installs the following dashboards in your Grafana Cloud instance to help monitor your system.

  • Azure Metrics Overview

Changelog

md
# 0.0.1 - March 2023

* Initial release

Cost

By connecting your Azure Metrics instance to Grafana Cloud, you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see Active series and dpm usage and Cloud tier pricing.