Skip to content

Commit 855e271

Browse files
authored
Update agent-linux-troubleshoot.md
1 parent 189ebe8 commit 855e271

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

articles/azure-monitor/agents/agent-linux-troubleshoot.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ The Troubleshooting Tool is automatically included when the Log Analytics agent
3636

3737
The Troubleshooting Tool checks the following scenarios:
3838

39-
- The agent is unhealthy, heartbeat doesn't work properly.
40-
- The agent doesn't start, can't connect to Log Analytic Services.
39+
- The agent is unhealthy; the heartbeat doesn't work properly.
40+
- The agent doesn't start or can't connect to Log Analytics.
4141
- The agent Syslog isn't working.
4242
- The agent has high CPU or memory usage.
4343
- The agent has installation issues.
4444
- The agent custom logs aren't working.
45-
- Collect agent logs.
45+
- Agent logs can't be collected.
4646

4747
For more information, see the [Troubleshooting Tool documentation on GitHub](https://github.com/microsoft/OMS-Agent-for-Linux/blob/master/docs/Troubleshooting-Tool.md).
4848

@@ -54,9 +54,11 @@ For more information, see the [Troubleshooting Tool documentation on GitHub](htt
5454
A clean reinstall of the agent fixes most issues. This task might be the first suggestion from our support team to get the agent into an uncorrupted state. Running the Troubleshooting Tool and Log Collector tool and attempting a clean reinstall helps to solve issues more quickly.
5555

5656
1. Download the purge script:
57-
- `$ wget https://raw.githubusercontent.com/microsoft/OMS-Agent-for-Linux/master/tools/purge_omsagent.sh`
57+
58+
`$ wget https://raw.githubusercontent.com/microsoft/OMS-Agent-for-Linux/master/tools/purge_omsagent.sh`
5859
1. Run the purge script (with sudo permissions):
59-
- `$ sudo sh purge_omsagent.sh`
60+
61+
`$ sudo sh purge_omsagent.sh`
6062

6163
## Important log locations and the Log Collector tool
6264

@@ -145,9 +147,9 @@ A clean reinstall of the agent fixes most issues. This task might be the first s
145147
</match>
146148
```
147149

148-
Debug logging allows you to see batched uploads to Azure Monitor separated by type, number of data items, and time taken to send:
150+
Debug logging allows you to see batched uploads to Azure Monitor separated by type, number of data items, and time taken to send.
149151

150-
**Example debug-enabled log:**
152+
Here's an example debug-enabled log:
151153

152154
```
153155
Success sending oms.nagios x 1 in 0.14s
@@ -157,7 +159,7 @@ Success sending oms.syslog.authpriv.info x 1 in 0.91s
157159

158160
### Verbose output
159161

160-
Instead of using the OMS output plug-in, you can also output data items directly to `stdout`, which is visible in the Log Analytics agent for Linux log file.
162+
Instead of using the OMS output plug-in, you can output data items directly to `stdout`, which is visible in the Log Analytics agent for Linux log file.
161163

162164
In the Log Analytics general agent configuration file at `/etc/opt/microsoft/omsagent/<workspace id>/conf/omsagent.conf`, comment out the OMS output plug-in by adding a `#` in front of each line:
163165

@@ -205,13 +207,13 @@ Below the output plug-in, uncomment the following section by removing the `#` in
205207
### Probable causes
206208

207209
* Date and time are incorrect on the Linux server.
208-
* The Workspace ID and Workspace Key used aren't correct.
210+
* The workspace ID and workspace key aren't correct.
209211

210212
### Resolution
211213

212214
1. Check the time on your Linux server with the command date. If the time is +/- 15 minutes from the current time, onboarding fails. To correct this situation, update the date and/or time zone of your Linux server.
213215
1. Verify that you've installed the latest version of the Log Analytics agent for Linux. The newest version now notifies you if time skew is causing the onboarding failure.
214-
1. Reonboard by using the correct Workspace ID and Workspace Key following the installation instructions earlier in this article.
216+
1. Reonboard by using the correct workspace ID and workspace key in the installation instructions earlier in this article.
215217

216218
## Issue: You see a 500 and 404 error in the log file right after onboarding
217219

@@ -341,7 +343,8 @@ This error indicates that the Linux diagnostic extension (LAD) is installed side
341343
1. If you're using a proxy, check the preceding proxy troubleshooting steps.
342344
1. In some Azure distribution systems, the omid OMI server daemon doesn't start after the virtual machine is rebooted. If this is the case, you won't see Audit, ChangeTracking, or UpdateManagement solution-related data. The workaround is to manually start the OMI server by running `sudo /opt/omi/bin/service_control restart`.
343345
1. After the OMI package is manually upgraded to a newer version, it must be manually restarted for the Log Analytics agent to continue functioning. This step is required for some distros where the OMI server doesn't automatically start after it's upgraded. Run `sudo /opt/omi/bin/service_control restart` to restart the OMI.
344-
* In some situations, the OMI can become frozen. The OMS agent might enter a blocked state waiting for the OMI, which blocks all data collection. The OMS agent process will be running but there will be no activity, which is evidenced by no new log lines (such as sent heartbeats) present in `omsagent.log`. Restart the OMI with `sudo /opt/omi/bin/service_control restart` to recover the agent.
346+
347+
In some situations, the OMI can become frozen. The OMS agent might enter a blocked state waiting for the OMI, which blocks all data collection. The OMS agent process will be running but there will be no activity, which is evidenced by no new log lines (such as sent heartbeats) present in `omsagent.log`. Restart the OMI with `sudo /opt/omi/bin/service_control restart` to recover the agent.
345348
1. If you see a DSC resource *class not found* error in omsconfig.log, run `sudo /opt/omi/bin/service_control restart`.
346349
1. In some cases, when the Log Analytics agent for Linux can't talk to Azure Monitor, data on the agent is backed up to the full buffer size of 50 MB. The agent should be restarted by running the following command: `/opt/microsoft/omsagent/bin/service_control restart`.
347350
@@ -406,10 +409,11 @@ This error indicates that the Linux diagnostic extension (LAD) is installed side
406409
407410
**Background:** `omsconfig` is the Log Analytics agent for Linux configuration agent that looks for new portal-side configuration every five minutes. This configuration is then applied to the Log Analytics agent for Linux configuration files located at /etc/opt/microsoft/omsagent/conf/omsagent.conf.
408411
409-
* In some cases, the Log Analytics agent for Linux configuration agent might not be able to communicate with the portal configuration service. This scenario results in the latest configuration not being applied.
410-
1. Check that the `omsconfig` agent is installed by running `dpkg --list omsconfig` or `rpm -qi omsconfig`. If it isn't installed, reinstall the latest version of the Log Analytics agent for Linux.
412+
In some cases, the Log Analytics agent for Linux configuration agent might not be able to communicate with the portal configuration service. This scenario results in the latest configuration not being applied.
411413
412-
1. Check that the `omsconfig` agent can communicate with Azure Monitor by running the following command: `sudo su omsagent -c 'python /opt/microsoft/omsconfig/Scripts/GetDscConfiguration.py'`. This command returns the configuration that the agent receives from the service, including Syslog settings, Linux performance counters, and custom logs. If this command fails, run the following command: `sudo su omsagent -c 'python /opt/microsoft/omsconfig/Scripts/PerformRequiredConfigurationChecks.py'`. This command forces the omsconfig agent to talk to Azure Monitor and retrieve the latest configuration.
414+
1. Check that the `omsconfig` agent is installed by running `dpkg --list omsconfig` or `rpm -qi omsconfig`. If it isn't installed, reinstall the latest version of the Log Analytics agent for Linux.
415+
416+
1. Check that the `omsconfig` agent can communicate with Azure Monitor by running the following command: `sudo su omsagent -c 'python /opt/microsoft/omsconfig/Scripts/GetDscConfiguration.py'`. This command returns the configuration that the agent receives from the service, including Syslog settings, Linux performance counters, and custom logs. If this command fails, run the following command: `sudo su omsagent -c 'python /opt/microsoft/omsconfig/Scripts/PerformRequiredConfigurationChecks.py'`. This command forces the omsconfig agent to talk to Azure Monitor and retrieve the latest configuration.
413417
414418
## Issue: You aren't seeing any custom log data
415419
@@ -427,8 +431,8 @@ This error indicates that the Linux diagnostic extension (LAD) is installed side
427431
428432
1. Verify onboarding to Azure Monitor was successful by checking if the following file exists: `/etc/opt/microsoft/omsagent/<workspace id>/conf/omsadmin.conf`. If not, either:
429433
430-
1. Reonboard by using the omsadmin.sh command line [instructions](https://github.com/Microsoft/OMS-Agent-for-Linux/blob/master/docs/OMS-Agent-for-Linux.md#onboarding-using-the-command-line).
431-
1. Under **Advanced Settings** in the Azure portal, ensure that the setting **Apply the following configuration to my Linux Servers** is enabled.
434+
1. Reonboard by using the omsadmin.sh command line [instructions](https://github.com/Microsoft/OMS-Agent-for-Linux/blob/master/docs/OMS-Agent-for-Linux.md#onboarding-using-the-command-line).
435+
1. Under **Advanced Settings** in the Azure portal, ensure that the setting **Apply the following configuration to my Linux Servers** is enabled.
432436
433437
1. Check that the `omsconfig` agent can communicate with Azure Monitor by running the following command: `sudo su omsagent -c 'python /opt/microsoft/omsconfig/Scripts/GetDscConfiguration.py'`. This command returns the configuration that the agent receives from the service, including Syslog settings, Linux performance counters, and custom logs. If this command fails, run the following command: `sudo su omsagent -c 'python /opt/microsoft/omsconfig/Scripts/PerformRequiredConfigurationChecks.py'`. This command forces the `omsconfig` agent to talk to Azure Monitor and retrieve the latest configuration.
434438

0 commit comments

Comments
 (0)