Skip to content

Commit c381015

Browse files
authored
Merge pull request #98205 from rishabhsaha/patch-1
Update cli commands in documentation
2 parents 66315df + 3bb4034 commit c381015

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)