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/prometheus-remote-write-virtual-machines.md
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.date: 04/15/2024
10
10
11
11
# Send Prometheus metrics from Virtual Machines to an Azure Monitor workspace
12
12
13
-
Prometheus isn't limited to monitoring Kubernetes clusters. Use Prometheus to monitor applications and services running on your servers, wherever they're running. For example, you can monitor applications running on Virtual Machines, Virtual Machine Scale Sets, or even on-premises servers. Install prometheus on your servers and configure remote-write to send metrics to an Azure Monitor workspace.
13
+
Prometheus isn't limited to monitoring Kubernetes clusters. Use Prometheus to monitor applications and services running on your servers, wherever they're running. For example, you can monitor applications running on Virtual Machines, Virtual Machine Scale Sets, or even on-premises servers. You can also send Prometheus metrics to an Azure Monitor workspace from your self-managed cluster and Prometheus server. Install prometheus on your servers and configure remote-write to send metrics to an Azure Monitor workspace.
14
14
15
15
This article explains how to configure remote-write to send data from a self-managed Prometheus instance to an Azure Monitor workspace.
16
16
@@ -26,15 +26,17 @@ Use user-assigned managed identity authentication for services running self mana
26
26
- Azure Virtual Machines
27
27
- Azure Virtual Machine Scale Sets
28
28
- Azure Arc-enabled Virtual Machines
29
+
- Azure Kubernetes Service (AKS)
29
30
30
31
To set up remote write for Azure managed resources, see [Remote-write using user-assigned managed identity](#remote-write-using-user-assigned-managed-identity-authentication).
31
32
32
33
33
-
## Virtual machines running on non-Azure environments.
34
+
## Virtual machines and Kubernetes clusters running on non-Azure environments.
34
35
35
-
Onboarding to Azure Arc-enabled services, allows you to manage and configure non-Azure virtual machines in Azure. Once onboarded, configure [Remote-write using user-assigned managed identity](#remote-write-using-user-assigned-managed-identity-authentication) authentication. For more Information on onboarding Virtual Machines to Azure Arc-enabled servers, see [Azure Arc-enabled servers](/azure/azure-arc/servers/overview).
36
+
If you have virtual machines, or a Kubernetes cluster in non-Azure environments, and you don't want to onboard to Azure Arc, install self-managed Prometheus, and configure remote-write using Microsoft Entra ID application authentication. For more information, see [Remote-write using Microsoft Entra ID application authentication](#remote-write-using-microsoft-entra-id-application-authentication).
37
+
38
+
Onboarding to Azure Arc-enabled services allows you to manage and configure non-Azure virtual machines in Azure. Once onboarded, configure [Remote-write using user-assigned managed identity](#remote-write-using-user-assigned-managed-identity-authentication) authentication. For more Information on onboarding Virtual Machines to Azure Arc-enabled servers, see [Azure Arc-enabled servers](/azure/azure-arc/servers/overview) and [Azure Arc-enabled Kubernetes](/azure/azure-arc/kubernetes/overview).
36
39
37
-
If you have virtual machines in non-Azure environments, and you don't want to onboard to Azure Arc, install self-managed Prometheus and configure remote-write using Microsoft Entra ID application authentication. For more information, see [Remote-write using Microsoft Entra ID application authentication](#remote-write-using-microsoft-entra-id-application-authentication).
38
40
39
41
## Prerequisites
40
42
@@ -69,7 +71,7 @@ Note the value of the `clientId` of the managed identity that you created. This
69
71
70
72
#### Assign the Monitoring Metrics Publisher role to the application
71
73
72
-
Assign the `Monitoring Metrics Publisher` role on the workspace's data collection rule to the managed identity.
74
+
On the workspace's data collection rule, assign the `Monitoring Metrics Publisher` role to the managed identity.
73
75
74
76
1. On the Azure Monitor workspace Overview page, select the **Data collection rule** link.
75
77
@@ -91,7 +93,7 @@ Assign the `Monitoring Metrics Publisher` role on the workspace's data collectio
91
93
92
94
:::image type="content" source="media/prometheus-remote-write-virtual-machines/select-members.png" lightbox="media/prometheus-remote-write-virtual-machines/select-members.png" alt-text="A screenshot showing the select members menu for a data collection rule.":::
93
95
94
-
#### Assign the managed identity to a Virtual Machine or Virtual Machine Scale Set.
96
+
#### Assign the managed identity to a Virtual Machine or Virtual Machine Scale Set
95
97
96
98
> [!IMPORTANT]
97
99
> To complete the steps in this section, you must have owner or user access administrator permissions for the Virtual Machine or Virtual MAchine Scale Set.
@@ -104,11 +106,19 @@ Assign the `Monitoring Metrics Publisher` role on the workspace's data collectio
104
106
105
107
:::image type="content" source="media/prometheus-remote-write-virtual-machines/assign-user-identity.png" lightbox="media/prometheus-remote-write-virtual-machines/assign-user-identity.png" alt-text="A screenshot showing the Add user assigned managed identity page.":::
106
108
109
+
#### Assign the managed identity for an Azure Kubernetes Service
110
+
111
+
For Azure Kubernetes services (AKS), the managed identity must be assigned to the virtual machine scale sets.
112
+
113
+
AKS creates a resource group containing the virtual machine scale sets. The resource group name is in the format `MC_<resource group name>_<AKS cluster name>_<region>`.
114
+
For each Virtual Machine Scale Set in the resource group, assign the managed identity according to the steps in the previous section, [Assign the managed identity to a Virtual Machine or Virtual Machine Scale Set](#assign-the-managed-identity-to-a-virtual-machine-or-virtual-machine-scale-set).
115
+
116
+
107
117
108
118
### [Microsoft Entra ID application](#tab/entra-application)
109
119
### Remote-write using Microsoft Entra ID application authentication
110
120
111
-
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.
121
+
To configure remote-write to Azure Monitor workspace using a Microsoft Entra ID application, create an Entra application. On Azure Monitor workspace's data collection rule, assign the `Monitoring Metrics Publisher` role to the Entra application.
112
122
113
123
> [!NOTE]
114
124
> 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
0 commit comments