Installation Guide

Last updated: 2019-10-30 17:07:37


LogListener is a log collection client provided by Tencent Cloud's Cloud Log Service (CLS). You can install and deploy it on the target server to collect logs quickly and in real time.

Supported Environment

LogListener supports the following Linux 64-bit operating systems:

  • CentOS
  • Debian
  • SUSE
  • OpenSUSE
  • Ubuntu

Installation Procedure

1. Downloading LogListener

The download address of the latest version of LogListener is as follows: Download LogListener.

2. Installing LogListener

Decompress the downloaded installer package. The installation decompression path is /usr/local/. Execute the commands as follows:

tar -zxvf [Installer package] -C /usr/local/ && cd /usr/local/loglistener/tools

Enter the installation directory of LogListener /loglistener/tools, and execute the following commands with root permission:

./ [SecretId] [SecretKey] [region]

Parameter Sample:

./ AKIDc9YlmrBcFk4C8sbmXQ8i65XXXXXXXXXX LUSE4nPK1d4tX5SHyXv6tZXXXXXXXXXX ap-guangzhou 
Parameter Name Type Description
SecretId Part of the Cloud API key, which is used to identify the API caller
SecretKey Part of the Cloud API key, which is used to encrypt signature strings and verify server-side signature strings
region Region of the log service
  • It is recommended to use a collaborator key, and the collaborator should be granted the read-write permission of CLS by the root account.
  • The field "region" is where CLS is available instead of the region in which your business server resides.
  • The installation script uses rc.local to ensure that the client starts normally upon server restart.

Working with LogListener

Launching LogListener

You can launch the LogListener by running the following script:

cd /usr/local/loglistener/tools; ./

Stopping LogListener

You can stop the LogListener by running the following script:

cd /usr/local/loglistener/tools; ./

Viewing the Processes

You can view the processes of LogListener using the following command:

cd /usr/local/loglistener/tools; ./

Normally, there are three processes:

bin/loglistenerm -d                                # Daemon
bin/loglistener --conf=etc/loglistener.conf        # Main process     
bin/loglisteneru -u --conf=etc/loglistener.conf    # Update process

Uninstalling LogListener

You can uninstall the LogListener using the following command:

cd /usr/local/loglistener/tools; ./

Uninstalling LogListener deletes the auto-restart tool from rc.local.

Updating LogListener

We recommend that you update LogListener to the latest version. Full RegEx collection is not supported for LogListner of versions earlier than 2.2.2. You can view the LogListener version information in loglistener/version.txt.

  • If your LogListener version is later than 2.0.0 but earlier than 2.2.2, the following updating procedures apply:
    1. Download a new installer package.
    2. Decompress the new compressed package to the installation directory (the same level as the directory of LogListener).
    3. After the decompression, restart LogListener to complete the update process.
  • If your LogListener version is earlier than 2.0.0, update it manually by following the procedures below:
    1. Stop the earlier version of LogListener.
    2. Back up the earlier version of LogListener.
    3. Download and install the latest LogListener.