Skip to content

Commit 935f725

Browse files
authored
Merge pull request #100682 from bragi92/patch-2
Update prometheus documentation
2 parents b59bada + 24731a0 commit 935f725

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

articles/azure-monitor/containers/container-insights-prometheus-metrics-addon.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The output will be similar to the following:
136136

137137
- Register the `AKS-PrometheusAddonPreview` feature flag in the Azure Kubernetes clusters subscription with the following command in Azure CLI: `az feature register --namespace Microsoft.ContainerService --name AKS-PrometheusAddonPreview`.
138138
- The Azure Monitor workspace and Azure Managed Grafana workspace must already be created.
139-
- The template needs to be deployed in the same resource group as the cluster.
139+
- The template needs to be deployed in the Azure Managed Grafana workspaces resource group.
140140

141141
### Retrieve list of Grafana integrations
142142
If you're using an existing Azure Managed Grafana instance that already has been linked to an Azure Monitor workspace then you need the list of Grafana integrations. Open the **Overview** page for the Azure Managed Grafana instance and select the JSON view. Copy the value of the `azureMonitorWorkspaceIntegrations` field. If it doesn't exist, then the instance hasn't been linked with any Azure Monitor workspace.
@@ -157,7 +157,7 @@ If you're using an existing Azure Managed Grafana instance that already has been
157157
```
158158

159159
### Retrieve System Assigned identity for Grafana resource
160-
If you're using an existing Azure Managed Grafana instance that already has been linked to an Azure Monitor workspace then you need the list of Grafana integrations. Open the **Overview** page for the Azure Managed Grafana instance and select the JSON view. Copy the value of the `principalId` field for the `SystemAssigned` identity.
160+
The system assigned identity for the Azure Managed Grafana resource is also required. To get to it, open the **Overview** page for the Azure Managed Grafana instance and select the JSON view. Copy the value of the `principalId` field for the `SystemAssigned` identity.
161161

162162
```json
163163
"identity": {
@@ -166,8 +166,7 @@ If you're using an existing Azure Managed Grafana instance that already has been
166166
"type": "SystemAssigned"
167167
},
168168
```
169-
170-
Assign the `Monitoring Data Reader` role to the Grafana System Assigned Identity. This is the principalId on the Azure Monitor Workspace resource. This will let the Azure Managed Grafana resource read data from the Azure Monitor Workspace and is a requirement for viewing the metrics.
169+
Please assign the `Monitoring Data Reader` on the Azure Monitor Workspace for the Grafana System Identity i.e. take the principal ID that you got from the Azure Managed Grafana Resource, open the Access Control Blade for the Azure Monitor Workspace and assign the `Monitoring Data Reader` Built-In role to the principal ID (System Assigned MSI for the Azure Managed Grafana resource). This will let the Azure Managed Grafana resource read data from the Azure Monitor Workspace and is a requirement for viewing the metrics.
171170

172171
### Download and edit template and parameter file
173172

@@ -207,14 +206,15 @@ Assign the `Monitoring Data Reader` role to the Grafana System Assigned Identity
207206
},
208207
{
209208
"azureMonitorWorkspaceResourceId": "full_resource_id_2"
210-
}
209+
},
211210
{
212-
"azureMonitorWorkspaceResourceId": "[parameters('azureMonitorWorkspaceResourceId')]"
211+
"azureMonitorWorkspaceResourceId": "[parameters('azureMonitorWorkspaceResourceId')]"
213212
}
214213
]
215214
}
216215
}
217216
````
217+
For e.g. In the above code snippet `full_resource_id_1` and `full_resource_id_2` were already present on the Azure Managed Grafana resource and we're manually adding them to the ARM template. The final `azureMonitorWorkspaceResourceId` already exists in the template and is being used to link to the Azure Monitor Workspace resource ID provided in the parameters file. Please note, You do not have to replace `full_resource_id_1` and `full_resource_id_2` and any other resource id's if no integrations are found in the retrieval step.
218218

219219

220220
### Deploy template
@@ -268,7 +268,9 @@ ama-metrics-ksm-5fcf8dffcd 1 1 1 11h
268268

269269

270270
## Uninstall metrics addon
271-
Currently, Azure CLI is the only option to remove the metrics addon and stop sending Prometheus metrics to Azure Monitor managed service for Prometheus. The following command removes the agent from the cluster nodes and deletes the recording rules created for the data being collected from the cluster, it doesn't remove the DCE, DCR, or the data already collected and stored in your Azure Monitor workspace.
271+
272+
Currently, Azure CLI is the only option to remove the metrics addon and stop sending Prometheus metrics to Azure Monitor managed service for Prometheus.
273+
The aks-preview extension needs to be installed using the command `az extension add --name aks-preview`. For more information on how to install a CLI extension, see [Use and manage extensions with the Azure CLI](/azure/azure-cli-extensions-overview). The following command removes the agent from the cluster nodes and deletes the recording rules created for the data being collected from the cluster, it doesn't remove the DCE, DCR, or the data already collected and stored in your Azure Monitor workspace.
272274

273275
```azurecli
274276
az aks update --disable-azuremonitormetrics -n <cluster-name> -g <cluster-resource-group>

0 commit comments

Comments
 (0)