Skip to content

Commit 2e78791

Browse files
authored
Merge pull request #189051 from shayoniseth/patch-38
Fixed proxy config syntax errors
2 parents f2a576f + 7f1f2a3 commit 2e78791

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

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

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ There's no cost for the Azure Monitor agent, but you might incur charges for the
120120
The Azure Monitor agent doesn't require any keys but instead requires a [system-assigned managed identity](../../active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm.md#system-assigned-managed-identity). You must have a system-assigned managed identity enabled on each virtual machine before you deploy the agent.
121121

122122
## Networking
123-
The Azure Monitor agent supports Azure service tags (both AzureMonitor and AzureResourceManager tags are required). It supports connecting via private links, direct proxies and Log Analytics gateway as described below.
123+
The Azure Monitor agent supports Azure service tags (both AzureMonitor and AzureResourceManager tags are required). It supports connecting via **direct proxies, Log Analytics gateway and private links** as described below.
124124

125125
### Proxy configuration
126126
If the machine connects through a proxy server to communicate over the internet, review requirements below to understand the network configuration required.
@@ -130,36 +130,48 @@ The Azure Monitor agent extensions for Windows and Linux can communicate either
130130
> [!IMPORTANT]
131131
> Proxy configuration is not supported for [Azure Monitor Metrics (preview)](../essentials/metrics-custom-overview.md) as a destination. As such, if you are sending metrics to this destination, it will use the public internet without any proxy.
132132
133-
1. Use this flowchart to determine the values of the *setting* and *protectedSetting* parameters first.
133+
1. Use this flowchart to determine the values of the *settings* and *protectedSettings* parameters first.
134134

135-
![Flowchart to determine the values of setting and protectedSetting parameters when you enable the extension.](media/azure-monitor-agent-overview/proxy-flowchart.png)
135+
![Flowchart to determine the values of settings and protectedSettings parameters when you enable the extension.](media/azure-monitor-agent-overview/proxy-flowchart.png)
136136

137-
2. After the values for the *setting* and *protectedSetting* parameters are determined, provide these additional parameters when you deploy the Azure Monitor agent by using PowerShell commands. The following examples are for Azure virtual machines.
137+
2. After the values for the *settings* and *protectedSettings* parameters are determined, provide these additional parameters when you deploy the Azure Monitor agent by using PowerShell commands. The following examples are for Azure virtual machines.
138138

139139
| Parameter | Value |
140140
|:---|:---|
141-
| Setting | A JSON object from the preceding flowchart converted to a string. Skip if not applicable. An example is {"proxy":{"mode":"application","address":"http://[address]:[port]","auth": false}}. |
142-
| ProtectedSetting | A JSON object from the preceding flowchart converted to a string. Skip if not applicable. An example is {"proxy":{"username": "[username]","password": "[password]"}}. |
141+
| settingsHashtable | A JSON object from the preceding flowchart converted to a hashtable. Skip if not applicable. An example is {"proxy":{"mode":"application","address":"http://[address]:[port]","auth": false}}. |
142+
| protectedSettingsHashtable | A JSON object from the preceding flowchart converted to a hashtable. Skip if not applicable. An example is {"proxy":{"username": "[username]","password": "[password]"}}. |
143143

144144
# [Windows VM](#tab/PowerShellWindows)
145145

146146
```powershell
147-
Set-AzVMExtension -ExtensionName AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.0 -Setting <settingString> -ProtectedSetting <protectedSettingString>
147+
$settingsHashtable = @{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": false}};
148+
$protectedSettingsHashtable = @{"proxy":{"username": "[username]","password": "[password]"}};
149+
150+
Set-AzVMExtension -ExtensionName AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.0 -Settings <settingsHashtable> -ProtectedSettings <protectedSettingsHashtable>
148151
```
149152

150153
# [Linux VM](#tab/PowerShellLinux)
151154
```powershell
152-
Set-AzVMExtension -ExtensionName AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.5 -Setting <settingString> -ProtectedSetting <protectedSettingString>
155+
$settingsHashtable = @{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": false}};
156+
$protectedSettingsHashtable = @{"proxy":{"username": "[username]","password": "[password]"}};
157+
158+
Set-AzVMExtension -ExtensionName AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.5 -Settings <settingsHashtable> -ProtectedSettings <protectedSettingsHashtable>
153159
```
154160

155161
# [Windows Arc enabled server](#tab/PowerShellWindowsArc)
156162
```powershell
157-
New-AzConnectedMachineExtension -Name AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting <settingString> -ProtectedSetting <protectedSettingString>
163+
$settingsHashtable = @{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": false}};
164+
$protectedSettingsHashtable = @{"proxy":{"username": "[username]","password": "[password]"}};
165+
166+
New-AzConnectedMachineExtension -Name AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Settings <settingsHashtable> -ProtectedSettings <protectedSettingsHashtable>
158167
```
159168

160169
# [Linux Arc enabled server](#tab/PowerShellLinuxArc)
161170
```powershell
162-
New-AzConnectedMachineExtension -Name AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting <settingString> -ProtectedSetting <protectedSettingString>
171+
$settingsHashtable = @{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": false}};
172+
$protectedSettingsHashtable = @{"proxy":{"username": "[username]","password": "[password]"}};
173+
174+
New-AzConnectedMachineExtension -Name AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Settings <settingsHashtable> -ProtectedSettings <protectedSettingsHashtable>
163175
```
164176

165177
---

0 commit comments

Comments
 (0)