Skip to content

Commit f77a2d9

Browse files
authored
Merge pull request #273309 from RepinStyle/repinstyle-ama-tshoot-winClient
Add AMA Windows Client Troubleshooter Steps
2 parents a28c4ae + 906a8e4 commit f77a2d9

7 files changed

+61
-6
lines changed
Loading
Loading
Loading
Loading
Loading
Loading

articles/azure-monitor/agents/troubleshooter-ama-windows.md

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ The Azure Monitor Agent (AMA) Troubleshooter is designed to help identify issues
2121
### Troubleshooter existence check
2222
Check for the existence of the AMA Agent Troubleshooter directory on the machine to be diagnosed to confirm the installation of the agent troubleshooter:
2323

24-
***C:/Packages/Plugins/Microsoft.Azure.Monitor.AzureMonitorWindowsAgent***
25-
26-
# [PowerShell](#tab/WindowsPowerShell)
24+
# [AMA Extension - PowerShell](#tab/WindowsPowerShell)
2725
To verify the Agent Troubleshooter is present, copy the following command and run in PowerShell as administrator:
2826
```powershell
2927
Test-Path -Path "C:/Packages/Plugins/Microsoft.Azure.Monitor.AzureMonitorWindowsAgent"
@@ -33,7 +31,7 @@ If the directory exists, the Test-Path cmdlet returns `True`.
3331

3432
:::image type="content" source="./media/use-azure-monitor-agent-troubleshooter/ama-win-prerequisites-powershell.png" alt-text="Screenshot of the PowerShell window, which shows the result of Test-Path PowerShell cmdlet." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-prerequisites-powershell.png":::
3533

36-
# [Windows Command Prompt](#tab/WindowsCmd)
34+
# [AMA Extension - Command Prompt](#tab/WindowsCmd)
3735
To verify the Agent Troubleshooter is present, copy the following command and run in Command Prompt as administrator:
3836
```command
3937
cd "C:/Packages/Plugins/Microsoft.Azure.Monitor.AzureMonitorWindowsAgent"
@@ -43,6 +41,31 @@ If the directory exists, the cd command changes directories successfully.
4341

4442
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-prerequisites-cmd.png" alt-text="Screenshot of the command prompt window, which shows the result of cd command." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-prerequisites-cmd.png":::
4543

44+
# [AMA Standalone - PowerShell](#tab/WindowsPowerShellStandalone)
45+
To verify the Agent Troubleshooter is present, copy the following command and run in PowerShell as administrator:
46+
```powershell
47+
$installPath = (Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureMonitorAgent").AMAInstallPath
48+
Test-Path -Path $installPath\Troubleshooter
49+
```
50+
51+
If the directory exists, the Test-Path cmdlet returns `True`.
52+
53+
:::image type="content" source="./media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-prerequisites-powershell.png" alt-text="Screenshot of the PowerShell window, which shows the result of Test-Path PowerShell cmdlet." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-prerequisites-powershell.png":::
54+
55+
# [AMA Standalone - Command Prompt](#tab/WindowsCmdStandalone)
56+
To verify the Agent Troubleshooter is present, copy the following command and run in Command Prompt as administrator:
57+
58+
> [!Note]
59+
> If you have customized the AMAInstallPath, you'll need to adjust the below path to your custom path.
60+
61+
```command
62+
cd "C:\Program Files\Azure Monitor Agent\Troubleshooter"
63+
```
64+
65+
If the directory exists, the cd command changes directories successfully.
66+
67+
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-prerequisites-cmd.png" alt-text="Screenshot of the command prompt window, which shows the result of cd command." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-prerequisites-cmd.png":::
68+
4669
---
4770

4871
If directory doesn't exist or the installation is failed, follow [Basic troubleshooting steps](../agents/azure-monitor-agent-troubleshoot-windows-vm.md#basic-troubleshooting-steps-installation-agent-not-running-configuration-issues).
@@ -52,7 +75,7 @@ Yes, the directory exists. Proceed to [Run the Troubleshooter](#run-the-troubles
5275
## Run the Troubleshooter
5376
On the machine to be diagnosed, run the Agent Troubleshooter.
5477

55-
# [PowerShell](#tab/WindowsPowerShell)
78+
# [AMA Extension - PowerShell](#tab/WindowsPowerShell)
5679
To start the Agent Troubleshooter, copy the following command and run in PowerShell as administrator:
5780
```powershell
5881
$currentVersion = ((Get-ChildItem -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Azure\HandlerState\" `
@@ -70,7 +93,7 @@ It runs a series of activities that could take up to 15 minutes to complete. Be
7093

7194
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-run-troubleshooter-powershell.png" alt-text="Screenshot of the PowerShell window, which shows the result of the AgentTroubleshooter." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-run-troubleshooter-powershell.png":::
7295

73-
# [Windows Command Prompt](#tab/WindowsCmd)
96+
# [AMA Extension - Command Prompt](#tab/WindowsCmd)
7497
To start the Agent Troubleshooter, copy the following command and run in Command Prompt as administrator:
7598

7699
> [!Note]
@@ -85,12 +108,44 @@ It runs a series of activities that could take up to 15 minutes to complete. Be
85108

86109
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-run-troubleshooter-cmd.png" alt-text="Screenshot of the command prompt window, which shows the result of the AgentTroubleshooter." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-run-troubleshooter-cmd.png":::
87110

111+
# [AMA Standalone - PowerShell](#tab/WindowsPowerShellStandalone)
112+
To start the Agent Troubleshooter, copy the following command and run in PowerShell as administrator:
113+
```powershell
114+
$installPath = (Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureMonitorAgent").AMAInstallPath
115+
Set-Location -Path $installPath\Troubleshooter
116+
Start-Process -FilePath $installPath\Troubleshooter\AgentTroubleshooter.exe -ArgumentList "--ama"
117+
Invoke-Item $installPath\Troubleshooter
118+
```
119+
120+
It runs a series of activities that could take up to 15 minutes to complete. Be patient until the process completes.
121+
122+
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-run-troubleshooter-powershell.png" alt-text="Screenshot of the PowerShell window, which shows the result of the AgentTroubleshooter." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-run-troubleshooter-powershell.png":::
123+
124+
# [AMA Standalone - Command Prompt](#tab/WindowsCmdStandalone)
125+
To start the Agent Troubleshooter, copy the following command and run in Command Prompt as administrator:
126+
127+
> [!Note]
128+
> If you have customized the AMAInstallPath, you'll need to adjust the below path to your custom path.
129+
130+
```command
131+
cd "C:\Program Files\Azure Monitor Agent\Troubleshooter"
132+
AgentTroubleshooter.exe --ama
133+
```
134+
135+
It runs a series of activities that could take up to 15 minutes to complete. Be patient until this process completes.
136+
137+
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-run-troubleshooter-cmd.png" alt-text="Screenshot of the command prompt window, which shows the result of the AgentTroubleshooter." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-run-troubleshooter-cmd.png":::
138+
88139
---
89140

90141
Log file is created in the directory where the AgentTroubleshooter.exe is located.
91142

143+
Example for extension-based install:
92144
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-verify-log-exists.png" alt-text="Screenshot of the Windows explorer window, which shows the output of the AgentTroubleshooter." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-verify-log-exists.png":::
93145

146+
Example for standalone install:
147+
:::image type="content" source="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-verify-log-exists.png" alt-text="Screenshot of the Windows explorer window, which shows the output of the AgentTroubleshooter." lightbox="media/use-azure-monitor-agent-troubleshooter/ama-win-standalone-verify-log-exists.png":::
148+
94149
## Frequently Asked Questions
95150

96151
### Can I copy the Troubleshooter from a newer agent to an older agent and run it on the older agent to diagnose issues with the older agent?

0 commit comments

Comments
 (0)