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:
- Azure Monitor workspace overview
- Enable monitoring for Azure Kubernetes Service (AKS) cluster
- Azure Monitor managed service for Prometheus
- Metric alert rules for Kubernetes clusters (preview)
Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.