Issue with Collecting Metrics for Azure Arc-enabled SQL MI via API

Akash Sharma 0 Reputation points
2025-01-21T11:25:51.8266667+00:00

Hi team,

I am trying to collect metrics for Azure Arc-enabled SQL Managed Instance (SQL MI), but the API is not working. Here is the API I am using: https://management.azure.com/subscriptions/******/resourceGroups/******/providers/Microsoft.Sql/managedInstances/arcsqlmi-01/providers/microsoft.Insights/metrics?api-version=2017-09-01-preview

I have tested this API for Azure SQL MI, and it successfully collects data. However, it is not working for Azure Arc-enabled SQL MI.

Can you please help me troubleshoot this issue?

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
471 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rahul Podila 1,570 Reputation points Microsoft Vendor
    2025-01-22T07:08:27.8+00:00

    Hi @Akash Sharma

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    That metric collection is turned on for your Azure Arc-enabled SQL managed instance. In the Azure portal, view the diagnostic settings of your instance. If not already configured, you must configure it so that the metrics are sent to Azure Monitor.

    Using the API may not be the right fit for Azure Arc resources because Azure Arc is managed slightly differently. You'll want to double check the API endpoint and make sure it supports Azure Arc-enabled SQL MI. The method may be a valid resource provider Microsoft.HybridCompute, and the version of the API may need to be updated.

    Make sure your account has the proper permissions to access metrics. Your Azure Arc-enabled SQL MI will require at least the Monitoring Reader role, or higher, at the resource group or subscription level to monitor metrics.

    To collect metrics, the Azure Monitor agent needs to be installed and running on your Azure Arc-enabled SQL MI. It’s worth checking that the agent is installed and working properly.

    If the API still doesn’t work, you may want to let the Azure CLI or PowerShell try to pull the metrics. Sometimes these tools can give you detailed error messages that help you figure out what’s going on.

    The version of the API you are using (2017-09-01-preview) may not properly support Azure Arc-enabled SQL MIs. It might be worth checking if there is a version of the API specifically designed for Azure Arc.

    If you still have trouble after this step, I suggest you contact Microsoft support. They can help you with specific issues related to Azure Arc-enabled resources.

    If you have any concerns, please go through this link: -

    https://learn.microsoft.com/en-us/cli/azure/monitor/metrics?view=azure-cli-latest

    https://learn.microsoft.com/en-us/azure/azure-monitor/roles-permissions-security

    If you have any further queries, do let us know


    If the answer is helpful, please click "Accept Answer" and "Upvote it"


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.