Skip to content

Commit 51bdeb5

Browse files
authored
Merge pull request #206765 from Lukeout/patch-23
Update agent-manage.md
2 parents 584134a + 5af241b commit 51bdeb5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

articles/azure-monitor/agents/agent-manage.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,35 @@ Run the following command to upgrade the agent.
7979
8080
`sudo sh ./omsagent-*.universal.x64.sh --upgrade`
8181
82+
### Enable Auto-Update for the Linux Agent
83+
84+
The **recommendation** is to enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../virtual-machines/automatic-extension-upgrade.md) feature, using the following PowerShell commands.
85+
# [Powershell](#tab/PowerShellLinux)
86+
```powershell
87+
Set-AzVMExtension \
88+
-ResourceGroupName myResourceGroup \
89+
-VMName myVM \
90+
-ExtensionName OmsAgentForLinux \
91+
-ExtensionType OmsAgentForLinux \
92+
-Publisher Microsoft.EnterpriseCloud.Monitoring \
93+
-TypeHandlerVersion latestVersion
94+
-ProtectedSettingString '{"workspaceKey":"myWorkspaceKey"}' \
95+
-SettingString '{"workspaceId":"myWorkspaceId","skipDockerProviderInstall": true}' \
96+
-EnableAutomaticUpgrade $true
97+
```
98+
# [Azure CLI](#tab/CLILinux)
99+
```powershell
100+
az vm extension set \
101+
--resource-group myResourceGroup \
102+
--vm-name myVM \
103+
--name OmsAgentForLinux \
104+
--publisher Microsoft.EnterpriseCloud.Monitoring \
105+
--protected-settings '{"workspaceKey":"myWorkspaceKey"}' \
106+
--settings '{"workspaceId":"myWorkspaceId","skipDockerProviderInstall": true}' \
107+
--version latestVersion \
108+
--enable-auto-upgrade true
109+
```
110+
82111
## Adding or removing a workspace
83112

84113
### Windows agent

0 commit comments

Comments
 (0)