Path

Estimated time: 3 min

Connect to Azure account

In this milestone, you’ll establish the connection between your Azure account and Grafana Cloud using the service principal you created in the previous milestone. This connection enables Grafana Cloud to securely access your Azure metrics and begin monitoring your resources.

Navigate to the Add new credential page in Grafana Cloud if you’re not already there.

  1. Enter your Azure service principal credentials on the Add new credential page.

  2. In the Name field, enter a descriptive name for your credential, for example production-azure-monitoring.

  3. In the Client id field, paste the appId value from the service principal output.

  4. In the Client secret field, paste the password value from the service principal output.

  5. In the Tenant id field, paste the tenant value from the service principal output.

  6. Your Azure service principal credentials are entered on the form.

(Optional) Add Azure resource tags to label your metrics, limit which resources are collected, or both.

By default, resource information including tags is available on the target_info metric. For each tag you add, you choose whether to add it as a label on your metrics (Add tag to metrics), use it to collect only resources whose Azure tag matches a value (Filter by tag value), or both.

Tag filters apply to every resource type the credential discovers. To use different filters for different resource types, create separate credentials.

Skip the following section if you don’t need tags.

  1. In the Tags field, type the Azure resource tag key, for example environment, and press Enter. Use the Azure tag format, not the Prometheus format.

  2. In the table that appears, select Add tag to metrics to add the tag as a label on your metrics, or select Filter by tag value and enter a value in Tag value filter, for example production, to collect only resources with that tag value. Select at least one option for each tag.

(Optional) Add static labels for easier filtering and grouping in Grafana Cloud.

Static labels are key-value pairs applied to all metrics exported by this credential. Use them to distinguish metrics from different environments or teams—for example, add a key of environment and a value of production.

Static labels apply to every metric from this credential. To apply different labels to different Azure resources, create separate credentials.

Skip the following section if you don’t need static labels on your metrics.

  1. In the Static labels section, enter a label key, for example environment.

  2. Enter a label value, for example production.

  3. Click Add in the Static labels section to save the label.

The connection information is entered and ready to be used for metric collection.

In your next milestone, you’ll configure which metrics to collect from your Azure environment.