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/agents/azure-monitor-agent-manage.md
+27-40Lines changed: 27 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,52 +134,47 @@ Use the following CLI commands to install the Azure Monitor agent on Azure virtu
134
134
135
135
#### User-assigned managed identity
136
136
137
-
# [Windows](#tab/CLIWindows)
137
+
**Windows**
138
138
139
139
```azurecli
140
140
az vm extension set --name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true --settings '{"authentication":{"managedIdentity":{"identifier-name":"mi_res_id","identifier-value":"/subscriptions/<my-subscription-id>/resourceGroups/<my-resource-group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<my-user-assigned-identity>"}}}'
141
141
```
142
142
143
-
# [Linux](#tab/CLILinux)
143
+
**Linux**
144
144
145
145
```azurecli
146
146
az vm extension set --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true --settings '{"authentication":{"managedIdentity":{"identifier-name":"mi_res_id","identifier-value":"/subscriptions/<my-subscription-id>/resourceGroups/<my-resource-group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<my-user-assigned-identity>"}}}'
147
147
```
148
148
149
-
---
150
-
151
149
#### System-assigned managed identity
152
150
153
-
# [Windows](#tab/CLIWindows)
151
+
**Windows**
154
152
155
153
```azurecli
156
154
az vm extension set --name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true
157
155
```
158
156
159
-
# [Linux](#tab/CLILinux)
157
+
**Linux**
160
158
161
159
```azurecli
162
160
az vm extension set --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true
163
161
```
164
162
165
-
---
166
-
167
163
### Install on Azure Arc-enabled servers
168
164
169
165
Use the following CLI commands to install the Azure Monitor agent on Azure Arc-enabled servers.
Use the following CLI commands to uninstall the Azure Monitor agent on Azure virtual machines.
277
270
278
-
# [Windows](#tab/CLIWindows)
271
+
**Windows**
279
272
280
273
```azurecli
281
274
az vm extension delete --resource-group <resource-group-name> --vm-name <virtual-machine-name> -name AzureMonitorWindowsAgent
282
275
```
283
276
284
-
# [Linux](#tab/CLILinux)
277
+
**Linux**
285
278
286
279
287
280
```azurecli
288
281
az vm extension delete --resource-group <resource-group-name> --vm-name <virtual-machine-name> -name AzureMonitorLinuxAgent
289
282
```
290
-
---
291
283
292
284
### Uninstall on Azure Arc-enabled servers
293
285
294
286
Use the following CLI commands to uninstall the Azure Monitor agent on Azure Arc-enabled servers.
295
287
296
-
# [Windows](#tab/CLIWindowsArc)
288
+
**Windows**
297
289
298
290
```azurecli
299
291
az connectedmachine extension delete --name AzureMonitorWindowsAgent --machine-name <arc-server-name> --resource-group <resource-group-name>
300
292
```
301
-
# [Linux](#tab/CLILinuxArc)
293
+
**Linux**
302
294
303
295
```azurecli
304
296
az connectedmachine extension delete --name AzureMonitorLinuxAgent --machine-name <arc-server-name> --resource-group <resource-group-name>
305
297
```
306
-
---
307
298
308
299
---
309
300
@@ -323,47 +314,45 @@ To perform a one-time update of the agent, you must first uninstall the existing
323
314
324
315
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../virtual-machines/automatic-extension-upgrade.md) feature by using the following PowerShell commands.
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../azure-arc/servers/manage-automatic-vm-extension-upgrade.md#manage-automatic-extension-upgrade) feature by using the following PowerShell commands.
@@ -378,49 +367,47 @@ To perform a one-time update of the agent, you must first uninstall the existing
378
367
379
368
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../virtual-machines/automatic-extension-upgrade.md) feature by using the following CLI commands.
380
369
381
-
# [Windows](#tab/CLIWindows)
370
+
**Windows**
382
371
383
372
```azurecli
384
373
az vm extension set -name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --vm-name <virtual-machine-name> --resource-group <resource-group-name> --enable-auto-upgrade true
385
374
```
386
-
# [Linux](#tab/CLILinux)
375
+
376
+
**Linux**
387
377
388
378
```azurecli
389
379
az vm extension set -name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --vm-name <virtual-machine-name> --resource-group <resource-group-name> --enable-auto-upgrade true
390
380
```
391
-
---
392
381
393
382
### Upgrade on Azure Arc-enabled servers
394
383
395
384
To perform a one-time upgrade of the agent, use the following CLI commands.
396
385
397
-
# [Windows](#tab/CLIWindowsArc)
386
+
**Windows**
398
387
399
388
```azurecli
400
389
az connectedmachine upgrade-extension --extension-targets "{\"Microsoft.Azure.Monitor.AzureMonitorWindowsAgent\":{\"targetVersion\":\"<target-version-number>\"}}" --machine-name <arc-server-name> --resource-group <resource-group-name>
401
390
```
402
391
403
-
# [Linux](#tab/CLILinuxArc)
392
+
**Linux**
404
393
405
394
```azurecli
406
395
az connectedmachine upgrade-extension --extension-targets "{\"Microsoft.Azure.Monitor.AzureMonitorWindowsAgent\":{\"targetVersion\":\"<target-version-number>\"}}" --machine-name <arc-server-name> --resource-group <resource-group-name>
407
396
```
408
-
---
409
397
410
398
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../azure-arc/servers/manage-automatic-vm-extension-upgrade.md#manage-automatic-extension-upgrade) feature by using the following PowerShell commands.
0 commit comments