tencent cloud

LogListener Installation Guide(Linux)
Last updated:2025-12-16 21:43:38
LogListener Installation Guide(Linux)
Last updated: 2025-12-16 21:43:38
LogListener is a log collector provided by CLS. You can install and deploy it on a server to collect logs quickly.

Installation Environment

LogListener supports only Linux 64-bit operating systems and does not support Windows now. It is compatible with mainstream Linux operating system versions. If LogListener is incompatible with the Linux operating system version you use, submit a ticket for assistance.
LogListener version
Processor Architecture
Operating System Category
Supported Installation Environment
v2.x.x
x64/ARM
TencentOS Server
TencentOS Server 3.1,TencentOS Server 2.4
CentOS (64-bit)
CentOS_6.8_64-bit, CentOS_6.9_64-bit, CentOS_7.2_64-bit, CentOS_7.3_64-bit, CentOS_7.4_64-bit, CentOS_7.5_64-bit, CentOS_7.6_64-bit, CentOS_8.0_64-bit
Ubuntu (64-bit)
Ubuntu Server_14.04.1_LTS_64-bit, Ubuntu Server_16.04.1_LTS_64-bit, Ubuntu Server_18.04.1_LTS_64-bit, Ubuntu Server_20.04.1_LTS_64-bit, Ubuntu Server_22.04.1_LTS_64-bit
Debian (64-bit)
Debian_8.2_64-bit, Debian_9.0_64-bit, Debian_12.0_64-bit
openSUSE (64-bit)
openSUSE_42.3_64-bit

Supported Features

Key features supported by different LogListener versions are as listed below. For more information, see LogListener Updates.

Installation and startup

1. Downloading and installing LogListener

Download links of the latest version LogListener: Download via public network, Download via private network.
Download the LogListener installation package and decompress it to the installation path (/usr/local/ in this example). Then, go to the LogListener directory /usr/local/loglistener/tools and run the installation command.
Note:
No version number extensions are added to the installation package of LogListener on v2.8.3 and later. The latest version will be installed with loglistener-linux-x64 by default. To install a specific version, specify the version number, for example, replace loglistener-linux-x64 with loglistener-linux-x64-2.8.0 to install the 2.8.0 version.
Operation command for the public network:
wget http://mirrors.tencent.com/install/cls/loglistener-linux-x64.tar.gz && tar zxvf loglistener-linux-x64.tar.gz -C /usr/local/ && cd /usr/local/loglistener/tools && ./loglistener.sh install
Operation command for the private network:
wget http://mirrors.tencentyun.com/install/cls/loglistener-linux-x64.tar.gz && tar zxvf loglistener-linux-x64.tar.gz -C /usr/local/ && cd /usr/local/loglistener/tools && ./loglistener.sh install

2. Initializing LogListener

In the case of the /usr/local/ installation path, go to the /usr/local/loglistener/tools path and run the following command to initialize LogListener as the root user (by default, the private network is used to access the service):
./loglistener.sh init -secretid AKID******************************** -secretkey ******************************** -region ap-xxxxxx
Note:
You need to replace -secretid, -secretkey, -region, and -network in the command with the actual values. For more information, please see Parameter description below.
If the root account has granted read/write permissions for the CLS to the collaborator, it is recommended to use the collaborator's key.
The -region parameter specifies the location of your CLS, not the location of your business machine. When the CLS location is inconsistent with your business machine location, configure the -network parameter as internet to enable access over public network.
When the Cloud Virtual Machine (CVM) and the logset are in the same region, it is recommended to access the service domain name via the private network. Conversely, if they are located in different regions, it is recommended to access the service domain name via the public network.
For details on log collection permissions, see LogListener Log Collection Permissions.

Parameter description

Parameter Name
Required
Type Description
secretid
Yes
Part of the Cloud API Key, SecretId is used to identify the API caller. Ensure that the account associated with the Cloud API key has the appropriate LogListener log collection permission.
secretkey
Yes
Part of the Cloud API Key SecretKey is used to encrypt signature strings and is the server-side verification key for signature strings. Please ensure the associated account of the Cloud API Key has appropriate LogListener Log Collection Permissions.
encryption
No
Whether to encrypt and store the Cloud API Key. To encrypt the key, set the parameter to true; if encryption of the key is not required, set it to false. For details, see Key Encryption Storage.
network
No
It indicates how LogListener accesses the CLS service. Values: intra for private network access(default) and internet for public network access.
Private network access: Applicable to Tencent Cloud servers located in the same region as the machine group.
Public network access: Applicable to non-Tencent Cloud servers or to servers located in regions that do not match those of the machine group.
region
If domain is configured, this parameter is not required. Otherwise, it is required.
region indicates the region where the CLS is deployed. Enter the appropriate domain name abbreviation, such as ap-beijing or ap-guangzhou.
Note:
When the CLS location is inconsistent with your business machine location, configure the network parameter as internet to enable access over public network.
domain
Yes. (Unless region is configured)
The domain name representing the CLS region. For example, ap-beijing.cls.tencentyun.com or ap-guangzhou.cls.tencentyun.com.
Note:
When the CLS service area used by your business machine is inconsistent with its region, configure a public network domain name, such as ap-beijing.cls.tencentcs.com.
ip
No
The IP address of the machine that can be associated with the machine group using the configured IP address. For details, see Machine Group. If not specified, LogListener will automatically obtain the local IP address.
label
No
Machine ID. Once entered, the machine will be associated with the machine group also having the filled machine identification. For details, see Machine Group. Multiple identifiers separated by commas.
Note:
If a machine label is configured, the machine can only be associated with the machine group using the machine label instead of the IP address; if not configured, the machine group can only be associated with the machine using the IP address.
A private network domain name is used by default:

If you need to access the service by domain name through the public network, run the following command to set the network parameter internet explicitly:
./loglistener.sh init -secretid AKID******************************** -secretkey ******************************** -region ap-xxxxxx -network internet

Note:
We recommend that you use a collaborator key if the collaborator has been assigned the CLS read/write permission by the root account.
region indicates the region of the CLS you use, instead of the region where your business machine resides.
If your CVM instance and logset are in the same region, we recommend you access the service domain name over the private network; otherwise, use the public network.
For more information on log collection permissions, see Access Policy Templates.

3. Starting LogListener

LogListener is on v2.8.3 or later and the operating system has systemd.
systemctl start loglistenerd
LogListener is earlier than v2.8.3, or LogListener is on v2.8.3 or later but the operating system does not have systemd.
/etc/init.d/loglistenerd start




Common LogListener Operations

Note:
The operation commands used in this document are applicable only to LogListener v2.2.4 and later versions. For operation commands applicable to earlier versions, see Earlier-Version LogListener Installation Guide.

Checking the LogListener version

/etc/init.d/loglistenerd -v

Viewing LogListener help documentation

/etc/init.d/loglistenerd -h

Managing LogListener process

LogListener is on v2.8.3 or later and the operating system has systemd.
systemctl (start|restart|stop) loglistenerd # Start, restart, stop
LogListener is earlier than v2.8.3, or LogListener is on v2.8.3 or later but the operating system does not have systemd.
/etc/init.d/loglistenerd (start|restart|stop) # Start, restart, stop

Checking LogListener process status

/etc/init.d/loglistenerd status
LogListener normally runs two processes:



Checking LogListener heartbeat and configuration

/etc/init.d/loglistenerd check




Uninstalling LogListener

In the case of the /usr/local/ installation path, go to the /usr/local/loglistener/tools path and run the uninstallation command as the admin:
./loglistener.sh uninstall

Manually Updating LogListener

Reusing the breakpoint file (logs are not repeatedly collected)

1. Run the stop command to stop the existing LogListener.
2. Back up the breakpoint file directory (loglistener/data) on the earlier version; for example, back up the legacy breakpoint file to the /tmp/loglistener-backup directory.
cp -r loglistener-2.2.3/data /tmp/loglistener-backup/
3. Run the uninstallation command to uninstall the existing LogListener.
4. Download the latest version of LogListener. Then, install and initialize it with relevant commands.
5. Copy the breakpoint file directory backed up in step 2 to the new LogListener directory.
cp -r /tmp/loglistener-backup/data loglistener-<version>/
Change the value of <version> as required. The following is an example:
cp -r /tmp/loglistener-backup/data loglistener-2.8.2/
6. Run the start command to start the latest version of LogListener.

Not reusing the breakpoint file (logs may be repeatedly collected)

1. Run the stop command to stop the existing LogListener.
2. Run the uninstallation command to uninstall the earlier version of LogListener.
3. Download the latest version of LogListener. Then, install and initialize it with relevant commands.
4. Run the start command to start the latest version of LogListener.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback