You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/essentials/self-managed-prometheus-remote-write.md
+35-16Lines changed: 35 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,16 +70,18 @@ Administrator permissions for the cluster or resource are required to complete t
70
70
71
71
## Set up authentication for remote-write
72
72
73
-
Depending on the environment where Prometheus is running, you can use one of the following authentication methods to configure remote-write to send data to Azure Monitor workspace.
73
+
Depending on the environment where Prometheus is running, you can configure remote-write to use user-assigned managed identity or Microsoft Entra ID application authentication to send data to Azure Monitor workspace.
74
74
75
-
### [Remote-write with user-assigned managed identity](#tab/managed-identity)
75
+
Use the Azure portal or CLI to create a user-assigned managed identity or Microsoft Entra ID application.
76
+
77
+
### [Remote-write using user-assigned managed identity](#tab/managed-identity)
78
+
#### Remote-write using user-assigned managed identity authentication
76
79
77
80
To configure a user-assigned managed identity for remote-write to Azure Monitor workspace, complete the following steps.
78
81
79
82
#### Create a user-assigned managed identity
80
83
81
-
Create a user-managed identity to use in your remote-write configuration
82
-
Use the following CLI, or to use the portal, see [Manage user-assigned managed identities](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities#create-a-user-assigned-managed-identity).
84
+
To create a user-managed identity to use in your remote-write configuration, see [Manage user-assigned managed identities](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities#create-a-user-assigned-managed-identity).
83
85
84
86
Note the value of the `clientId` of the managed identity that you created. This ID is used in the Prometheus remote write configuration.
85
87
@@ -122,13 +124,14 @@ Assign the `Monitoring Metrics Publisher` role on the workspace's data collectio
122
124
123
125
124
126
### [Microsoft Entra ID application](#tab/entra-application)
127
+
#### Remote-write using Microsoft Entra ID application authentication.
125
128
126
129
To configure remote-write to Azure Monitor workspace using a Microsoft Entra ID application, create an Entra application and assign it the `Monitoring Metrics Publisher` role on the workspace's data collection rule to the application.
127
130
128
131
> [!NOTE]
129
132
> Your Azure Entra application uses a client secret or password. Client secrets have an expiration date. Make sure to create a new client secret before it expires so you don't lose authenticated access
130
133
131
-
#### Create a Microsoft Entra ID application using the Azure portal
134
+
#### Create a Microsoft Entra ID application
132
135
133
136
To create a Microsoft Entra ID application using the portal, see [Create a Microsoft Entra ID application and service principal that can access resources](/entra/identity-platform/howto-create-service-principal-portal#register-an-application-with-microsoft-entra-id-and-create-a-service-principal).
134
137
@@ -185,15 +188,18 @@ Note the value of the `clientId` of the managed identity that you created. This
185
188
1. Create a user-assigned managed identity using the following CLI command:
186
189
187
190
```azurecli
188
-
az account set --subscription <subscription id>
189
-
az identity create --name <idnetity name> --resource-group <resource group name>
191
+
az account set \
192
+
--subscription <subscription id>
193
+
az identity create \
194
+
--name <idnetity name> \
195
+
--resource-group <resource group name>
190
196
```
191
197
192
198
The following is an example of the output displayed:
The following is an example of the output displayed:
260
276
```azurecli
@@ -313,12 +329,13 @@ To find your client for managed identity authentication in the portal, go to the
313
329
To find the client ID for the Microsoft Entra ID application, use the following CLI or see the first step in the [Create an Microsoft Entra ID application using the Azure portal](#create-an-microsoft-entra-id-application-using-the-azure-portal) section.
314
330
315
331
```azurecli
316
-
$ az ad app list --display-name < application name.>
332
+
$ az ad app list --display-name < application name>
317
333
```
318
334
For more information, see [az ad app list](/cli/azure/ad/app?view=azure-cli-latest#az-ad-app-list).
319
335
320
336
321
-
After editing the configuration file, restart Prometheus to apply the changes.
337
+
>[!NOTE]
338
+
> After editing the configuration file, restart Prometheus for the changes to apply.
322
339
323
340
324
341
## Verify if the remote-write data is flowing
@@ -338,7 +355,9 @@ To use the Prometheus explorer, from to your Azure Monitor workspace in the Azur
338
355
Use PromQL queries in Grafana and verify that the results return expected data. See [getting Grafana setup with Managed Prometheus](../essentials/prometheus-grafana.md) to configure Grafana.
339
356
340
357
341
-
## Troubleshoot remote write
358
+
359
+
360
+
## Troubleshoot remote write <<<< Move to separate article and link from all related articles>>>>
342
361
343
362
It takes about 30 minutes for the assignment of the role to take effect.
344
363
During this time you may see an HTTP 403 error in the Prometheus log. Check that you have configured the managed identity or Microsoft Entra ID application correctly, and if so, wait 30 minutes for the role assignment to take effect.
0 commit comments