How to Resolve Errors When Enabling Prometheus Alert Rules in Azure

SwathiDhanwada-MSFT 18,916 Reputation points Moderator
2024-08-01T04:39:57.6133333+00:00

I followed the migration guidelines for migrating from metric rules to Prometheus rules as per the documentation, but I am encountering errors during deployment. The error indicates issues with the Scopes property requiring valid AMW(Azure Monitor Workspace) and AKS IDs. How can I resolve this?

PS - Based on common issues that we have seen from customers and other sources, we are posting these questions to help the Azure community.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,606 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,916 Reputation points Moderator
    2024-08-01T04:40:50.82+00:00

    The error encountered during the migration process from metric rules to Prometheus rules is due to an incorrect value for the azureMonitorWorkspaceResourceId parameter. The deployment script expects an Azure Monitor Workspace (AMW) Resource ID, instead of Log Analytics Workspace ID instead. Kindly note Log Analytics workspaces contain logs and metrics data from multiple Azure resources, whereas Azure Monitor workspaces currently contain only metrics related to Prometheus.

    To resolve this issue, one needs to change the azureMonitorWorkspaceResourceId parameter to an Azure Monitor Workspace Resource ID . If one does not have an Azure Monitor Workspace, it can be set up by referring to Manage an Azure Monitor workspace.

    Example resource ID of Azure Monitor Workspace :

    
    subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/microsoft.monitor/accounts/defaultazuremonitorworkspace-eus
    
    

    Additionally, after enabling the Prometheus alerts, you should activate the Managed Prometheus and Grafana services to ensure proper monitoring and alerting.

    For detailed instructions on setting up an Azure Monitor Workspace and enabling monitoring for Azure Kubernetes Service (AKS), refer to the following documentation:

    Resources:

    Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

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.