If the preview page is blank or the query page displays no data when you use Logtail to collect logs, perform the following steps to troubleshoot the errors:
Procedure
- Check whether a matched log file is updated.
Logtail collects only incremental logs. For more information, see Read log files.
- If a log file is not updated after the applied Logtail configuration is delivered to the server, Logtail does not collect logs from the file.
- If a log file is updated after the applied Logtail configuration is delivered to the server, proceed to the next step.
- Check whether the heartbeat status of your machine group is normal. View the heartbeat status of your machine group in the Log Service console. For more information, see View the status of a machine group.
- If a value in the Heartbeat column is FAIL, troubleshoot the error by following the instructions that are provided in What do I do if a Logtail machine group has no heartbeats?.
- If all values in the Heartbeat column are OK, proceed to the next step.
- Check whether a Logtail configuration is created.
- If no Logtail configuration is created, create a Logtail configuration by following the instructions that are provided in Create Logtail configurations.
- If a Logtail configuration is created, proceed to the next step.
Important- Make sure that the log path specified in the Logtail configuration matches the log files on the servers from which you want to collect logs.
- By default, you can use only one Logtail configuration to collect logs from a log file. For more information about how to use multiple Logtail configurations to collect logs from a log file, see What do I do if I want to use multiple Logtail configurations to collect logs from a log file?
- Check whether the Logtail configuration is applied to your machine group. On the Machine Group Settings page, check whether the Logtail configuration is applied to your machine group. For more information, see Manage machine groups.
- If the Logtail configuration is not applied to your machine group, apply the Logtail configuration by following the instructions that are provided in Apply Logtail configurations to a machine group.
- If the Logtail configuration is applied to your machine group, proceed to the next step.
- View collection errors.
- View error information.
For more information, see How do I view Logtail collection errors?.
- View the logs of Logtail. Logtail records important information and all WARNING and ERROR logs. If you want to view the details of the errors, you can access the logs of Logtail in the following paths:
- Linux: /usr/local/ilogtail/ilogtail.LOG and /usr/local/ilogtail/logtail_plugin.LOG . The files contain logs that are collected when the Logtail configuration uses a data source such as HTTP, MySQL Binlog, or MySQL query results.
- 64-bit Windows: C:\Program Files (x86)\Alibaba\Logtail\logtail_*.log.
- 32-bit Windows: C:\Program Files\Alibaba\Logtail\logtail_*.log.
- Container: /usr/local/ilogtail/ilogtail.LOG and /usr/local/ilogtail/logtail_plugin.LOG. The files are generated for the Logtail container.
- Check whether usage limits are exceeded.
If you want to collect a large amount of log data or collect logs from a large number of files, you can modify the startup parameters of Logtail to increase the throughput for log collection. For more information, see Configure the startup parameters of Logtail.
If the errors persist after you perform the preceding operations, submit a ticket and provide important information that you found in troubleshooting.
- View error information.