Skip to content

Commit 7240a09

Browse files
authored
Merge pull request #216835 from shayoniseth/patch-107
Update azure-monitor-agent-data-collection-endpoint.md
2 parents 7e41586 + 89237d6 commit 7240a09

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

articles/azure-monitor/agents/azure-monitor-agent-data-collection-endpoint.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Define network settings and enable network isolation for Azure Moni
44
ms.topic: conceptual
55
author: shseth
66
ms.author: shseth
7-
ms.date: 10/14/2022
7+
ms.date: 11/01/2022
88
ms.custom: references_region
99
ms.reviewer: shseth
1010

@@ -54,37 +54,35 @@ The Azure Monitor Agent extensions for Windows and Linux can communicate either
5454
# [Windows VM](#tab/PowerShellWindows)
5555

5656
```powershell
57-
$settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
58-
$protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
59-
60-
Set-AzVMExtension -ExtensionName AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.0 -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
57+
$settingsString = '{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": true}}';
58+
$protectedSettingsString = '{"proxy":{"username":"[username]","password": "[password]"}}';
59+
Set-AzVMExtension -ExtensionName AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion <type-handler-version> -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
6160
```
6261

6362
# [Linux VM](#tab/PowerShellLinux)
6463

6564
```powershell
66-
$settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
67-
$protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
68-
69-
Set-AzVMExtension -ExtensionName AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.5 -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
65+
$settingsString = '{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": true}}';
66+
$protectedSettingsString = '{"proxy":{"username":"[username]","password": "[password]"}}';
67+
Set-AzVMExtension -ExtensionName AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion <type-handler-version> -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
7068
```
7169

7270
# [Windows Arc-enabled server](#tab/PowerShellWindowsArc)
7371

7472
```powershell
75-
$settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
76-
$protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
73+
$settings = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
74+
$protectedSettings = @{"proxy" = @{username = "[username]"; password = "[password]"}}
7775
78-
New-AzConnectedMachineExtension -Name AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settingsString -ProtectedSetting $protectedSettingsString
76+
New-AzConnectedMachineExtension -Name AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settings -ProtectedSetting $protectedSettings
7977
```
8078

8179
# [Linux Arc-enabled server](#tab/PowerShellLinuxArc)
8280

8381
```powershell
84-
$settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
85-
$protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
82+
$settings = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
83+
$protectedSettings = @{"proxy" = @{username = "[username]"; password = "[password]"}}
8684
87-
New-AzConnectedMachineExtension -Name AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settingsString -ProtectedSetting $protectedSettingsString
85+
New-AzConnectedMachineExtension -Name AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settings -ProtectedSetting $protectedSettings
8886
```
8987

9088
---

0 commit comments

Comments
 (0)