Skip to content

Commit 3bb4034

Browse files
authored
Update cli commands in documentation
Update the doc and cli command to make it clear which id needs to be given the Monitoring Metrics Publisher role
1 parent 861bf4f commit 3bb4034

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

articles/azure-monitor/containers/container-insights-update-metrics.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ To update a specific cluster in your subscription by using Azure CLI, run the fo
8383
```azurecli
8484
az login
8585
az account set --subscription "<subscriptionName>"
86-
az aks show -g <resourceGroupName> -n <clusterName>
86+
az aks show -g <resourceGroupName> -n <clusterName> --query "servicePrincipalProfile"
87+
az aks show -g <resourceGroupName> -n <clusterName> --query "addonProfiles.omsagent.identity"
8788
az role assignment create --assignee <clientIdOfSPN> --scope <clusterResourceId> --role "Monitoring Metrics Publisher"
8889
```
8990

@@ -93,7 +94,8 @@ To get the value for `clientIdOfSPNOrMsi`, you can run the command `az aks show`
9394
```azurecli
9495
az login
9596
az account set --subscription "<subscriptionName>"
96-
az aks show -g <resourceGroupName> -n <clusterName>
97+
az aks show -g <resourceGroupName> -n <clusterName> --query "servicePrincipalProfile"
98+
az aks show -g <resourceGroupName> -n <clusterName> --query "addonProfiles.omsagent.identity"
9799
az role assignment create --assignee <clientIdOfSPNOrMsi> --scope <clusterResourceId> --role "Monitoring Metrics Publisher"
98100
```
99101

0 commit comments

Comments
 (0)