edit-icon download-icon

Logtail quick diagnosis tool

Last Updated: Apr 23, 2018

If an exception occurs during the log collection, you can use the Logtail automatic diagnosis tool to check if an exception exists in the client and troubleshoot the problem quickly as instructed by the tool.

If the Logtail heartbeat status is Fail, see Logtail heartbeat error.

Preparations

Download the diagnosis tool script

wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/checkingtool.sh

wget http://logtail-corp.oss-cn-hangzhou-zmf.aliyuncs.com/linux64/checkingtool.sh

Common parameters for the diagnosis tool

  • --help: View help document.
  • --logFile [LogFileFullPath]: Check if Logtail collects logs from LogFileFullPath and check the basic running environment of Logtail such as installation file integrity, running status, Alibaba Cloud user ID, and network connectivity.
  • --logFileOnly [LogFileFullPath]: Only check if Logtail collects logs from LogFileFullPath.
  • --envOnly: Only check the running environment of Logtail.

Usage

Run the script ./checkingtool.sh --logFile [LogFileFullPath] to perform the check. If the script detects an exception, proceed as instructed by the script.

Note: If the specific log file passes the check and the Logtail running environment is normal, we recommend that you log on to the Alibaba Cloud console to view the configuration exception logs of Log Service. For more information, see Query log collection errors.

检测示例

Causes and solutions of common Logtail log collection errors

You can find the causes of Logtail log collection errors by running the Logtail quick diagnosis tool and then use the corresponding solution to solve the problem. The causes and solutions of common Logtail log collection errors are as follows.

Cause Solution
Installation file is missing Reinstall Logtail.
Logtail is not running Use the command /etc/init.d/ilogtaild start to start Logtail.
Multiple Logtail processes Use the command /etc/init.d/ilogtaild stop to stop Logtail and then use the command /etc/init.d/ilogtaild start to start Logtail.
Port 443 is disabled Open the port 443 in the firewall.
Cannot find the configuration server Check if the installation is correct. If not, uninstall and then reinstall Logtail.
User configuration does not exist Confirm that the Logtail configuration is created in the console, the machine group contains the client, and the configuration is applied to the machine group.
The specified log file is not matched Check if the Logtail configuration is correct.
The specified log file is matched more than once Logtail selects one configuration randomly when multiple matches exist. We recommend that you retain only one configuration that matches the specified log file.

Instructions

Thank you! We've received your feedback.