Skip to content

Commit d7391db

Browse files
Merge pull request #210116 from NarineM/main
Fix broken linux agent auto update example, add proxy troubleshooting, update auto update support
2 parents 382138e + 379e3c6 commit d7391db

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Upgrade to the latest release of the Log Analytics agent for Windows and Linux m
2020

2121
| Environment | Installation method | Upgrade method |
2222
|--------|----------|-------------|
23-
| Azure VM | Log Analytics agent VM extension for Windows/Linux | Agent is automatically upgraded [after the VM model changes](../../virtual-machines/extensions/features-linux.md#how-agents-and-extensions-are-updated), unless you configured your Azure Resource Manager template to opt out by setting the property _autoUpgradeMinorVersion_ to **false**. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. Major version upgrade is always manual. See [VirtualMachineExtensionInner.AutoUpgradeMinorVersion Property](https://docs.azure.cn/dotnet/api/microsoft.azure.management.compute.fluent.models.virtualmachineextensioninner.autoupgrademinorversion?view=azure-dotnet). |
23+
| Azure VM | Log Analytics agent VM extension for Windows/Linux | Agent is automatically upgraded [after the VM model changes](../../virtual-machines/extensions/features-linux.md#how-agents-and-extensions-are-updated), unless you configured your Azure Resource Manager template to opt out by setting the property _autoUpgradeMinorVersion_ to **false**. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. Only Linux agent supports automatic update post deployment with _enableAutomaticUpgrade_ property(See [Enable Auto-Update for the Linux Agent](#enable-auto-update-for-the-linux-agent)). Major version upgrade is always manual(See [VirtualMachineExtensionInner.AutoUpgradeMinorVersion Property](https://docs.azure.cn/dotnet/api/microsoft.azure.management.compute.fluent.models.virtualmachineextensioninner.autoupgrademinorversion?view=azure-dotnet)). |
2424
| Custom Azure VM images | Manual install of Log Analytics agent for Windows/Linux | Updating VMs to the newest version of the agent needs to be performed from the command line running the Windows installer package or Linux self-extracting and installable shell script bundle.|
2525
| Non-Azure VMs | Manual install of Log Analytics agent for Windows/Linux | Updating VMs to the newest version of the agent needs to be performed from the command line running the Windows installer package or Linux self-extracting and installable shell script bundle. |
2626

@@ -90,10 +90,10 @@ Set-AzVMExtension \
9090
-ExtensionName OmsAgentForLinux \
9191
-ExtensionType OmsAgentForLinux \
9292
-Publisher Microsoft.EnterpriseCloud.Monitoring \
93-
-TypeHandlerVersion latestVersion
93+
-TypeHandlerVersion latestVersion \
9494
-ProtectedSettingString '{"workspaceKey":"myWorkspaceKey"}' \
9595
-SettingString '{"workspaceId":"myWorkspaceId","skipDockerProviderInstall": true}' \
96-
-EnableAutomaticUpgrade $true
96+
-EnableAutomaticUpgrade $true
9797
```
9898
# [Azure CLI](#tab/CLILinux)
9999
```powershell
@@ -105,7 +105,7 @@ az vm extension set \
105105
--protected-settings '{"workspaceKey":"myWorkspaceKey"}' \
106106
--settings '{"workspaceId":"myWorkspaceId","skipDockerProviderInstall": true}' \
107107
--version latestVersion \
108-
--enable-auto-upgrade true
108+
--enable-auto-upgrade true
109109
```
110110
---
111111

@@ -252,6 +252,15 @@ Perform the following steps if your Linux computers need to communicate through
252252
```
253253
sudo /opt/microsoft/omsagent/bin/service_control restart [<workspace id>]
254254
```
255+
If you see "cURL failed to perform on this base url" in the log, you can try removing '\n' in proxy.conf EOF to resolve the failure:
256+
```
257+
od -c /etc/opt/microsoft/omsagent/proxy.conf
258+
cat /etc/opt/microsoft/omsagent/proxy.conf | tr -d '\n' > /etc/opt/microsoft/omsagent/proxy2.conf
259+
rm /etc/opt/microsoft/omsagent/proxy.conf
260+
mv /etc/opt/microsoft/omsagent/proxy2.conf /etc/opt/microsoft/omsagent/proxy.conf
261+
sudo chown omsagent:omiusers /etc/opt/microsoft/omsagent/proxy.conf
262+
sudo /opt/microsoft/omsagent/bin/service_control restart [<workspace id>]
263+
```
255264
256265
## Uninstall agent
257266
Use one of the following procedures to uninstall the Windows or Linux agent using the command line or setup wizard.

0 commit comments

Comments
 (0)