tencent cloud

Cloud Log Service

LogListener Service Logs

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-06-09 19:09:41

Overview

LogListener service logs are used to record the operation, collection, and monitoring activities of LogListener, and you can configure visualized graphs to display such log data.

Default configuration

Default Configuration Item
Description
Log Topic
When the LogListener service logs feature is enabled for machine groups in a certain region for the first time, a cls_service_logging logset is automatically created in this region. The current and future LogListener service logs generated by all machine groups with this feature enabled in this region are saved to the following 3 log topics:
loglistener_status: the heartbeat status logs for the corresponding LogListener.
loglistener_alarm: logs corresponding to LogListener's monitoring by collection metric/error type .
loglistener_business: logs corresponding to LogListener's collection operations, with each log corresponds to one request.
Log Storage Duration
The default storage duration is 7 days, and the value cannot be modified.
Index
By default, the key-value index feature is enabled for all collected log data. The index configurations cannot be modified.
Dashboard
Default generation CLS Log Collection Status Monitoring Preset Dashboard.
Note:
LogListener service logs are only about collection and monitoring activities of LogListener, and do not support writing into other kinds of data.
Log data generated by this feature does not incur costs.
cls_service_logging is a unified logset for LogListener service logs.

Prerequisites

Currently, the service logs feature can be enabled only for Linux machine groups, and service logs can be reported only when the machine group is associated with a collection configuration. If a machine group is not associated with any collection configuration, no service logs will be reported.

Use Cases

Viewing LogListener status When the LogListener service logs are enabled, you can view LogListener running status and collection statistics. You can view the number of active LogListeners, LogListener status distribution and other statistical metrics on the service_log_dashboard dashboard.
Log collection monitoring configuration After enabling the Loglistener service log function, you can configure monitoring metrics of collection end by metric/error type, such as:
MEM, CPU, collection speed, collection latency, or other metrics.
The number of parsing errors of LogListener.
File-level monitoring With the LogListener service logs are enabled, you can view the monitoring logs of files and directories. For example:
All collection statistics files of one IP
The amount of logs collected under a certain path on a certain IP, such as app1 application logs located in /var/log/app1/. You can get the statistics of logs collected under this path.
The collection statistics of a topic.

Prerequisites

Machine groups support collecting monitoring service logs only in LogListener version 2.5.4 or later. You can upgrade to the latest version.

Directions

Enabling the service logs

1. Log in to the CLS console.
2. In the left sidebar, click Machine Group Management to go to the machine group management page.
3. On the machine group list page, select the target machine group and click

to enable the LogListener service logs.




Disabling LogListener service logs

1. Log in to the CLS console.
2. In the left sidebar, click Machine Group Management to view the machine group list.
3. Select the target machine group, and click

to disable the LogListener service logs.
Note:
After this feature is disabled, the log data saved in the logset cls_service_logging will not be deleted automatically. You can manually delete the logset where the service logs are saved.

Dashboard of Service Logs

After you enable LogListener service logs, CLS automatically generates a preconfigured dashboard for monitoring log collection status, which displays LogListener collection statistics.

CLS Log Collection Status Monitoring Dashboard

You can find the dashboard named CLS log collection monitoring dashboard under the Preset dashboard tag on the Dashboard page in the CLS console.



Click the dashboard name to view LogListener collection statistics, including metrics such as LogListener status display, LogListener parsing failure rate, and LogListener sending success rate.


Log Field Description

LogListener Status Logs (loglistener_status)

The parameters of the log topic loglistener_status are detailed as follows:
Parameter
Description
InstanceId
The unique identifier of LogListener. You can view its specific value in the etc/loglistener.conf file under the LogListener installation directory, or in the machine group details.
IP
Machine group IP
Label
An array of machine IDs
Version
Version number
MemoryUsed
Memory utilization of LogListener
MemMax
Memory utilization threshold on this machine set by the Agent
CpuUsage
LogListener CPU utilization
Status
LogListener running status. The value description is as follows:
1: Heartbeat normal.
10: Authentication failed.
11: Log topic does not exist.
13: Log upload request frequency exceeded.
20: CPU utilization exceeded the limit.
21: Number of target collection files exceeded the limit.
22: Number of target collection directories exceeded the limit.
23: Memory usage exceeded the limit.
TotalSendLogSize
Size of logs sent
SendSuccessLogSize
Size of successfully sent logs
SendFailureLogSize
Size of sending-failed logs
SendTimeoutLogSize
Size of logs with sending timed out
TotalParseLogCount
Total number of logs parsed
ParseFailureLogCount
Number of parsing-failed logs
TotalSendLogCount
Number of logs sent
SendSuccessLogCount
Number of successful sent logs
SendFailureLogCount
Number of sending-failed logs
SendTimeoutLogCount
Number of logs with sending timed out
TotalSendReqs
Total number of requests sent
SendSuccessReqs
Number of successful sent requests
SendFailureReqs
The number of sending-failed requests
SendTimeoutReqs
Number of requests with sending timed out
TotalFinishRsps
Total number of RSP files received
TotalSuccessFromStart
Total number of successfully sent requests since LogListener was enabled
AvgReqSize
Average request packet size
SendAvgCost
Average sending time
AvailConnNum
Number of available connections
QueueSize
The size of queued requests

LogListener Alarm Logs (loglistener_alarm)

The parameters of the log topic loglistener_alarm are detailed as follows:
Monitoring Metric
Description
InstanceId
LogListener unique identifier
Label
An array of machine IDs
IP
Machine group IP
Version
LogListener version
AlarmType.count
Statistics of alarm types
AlarmType.example
Sample alarm type
AlarmType:
alarm type
type ID
Description
UnknownError
0
Initializing the alarm type.
UnknownError
1
Failed to parse.
CredInvalid
2
Failed to verify.
SendFailure
3
Failed to send.
RunException
4
Abnormal LogListener running.
MemLimited
5
Reached the memory utilization threshold.
FileProcException
6
Exceptions occurred in file processing.
FilePosGetError
7
Failed to get the file publishing info.
HostIpException
8
Exceptions occurred in the server IP thread.
StatException
9
Failed to get the process info.
UpdateException
10
Exceptions occurred in the CLS modification feature.
DoSendError
11
Failed to confirm sending.
FileAddError
12
Failed to create the file.
FileMetaError
13
Failed to create the metadata file.
FileOpenError
14
Failed to open the file.
FileOpenError
15
Failed to read the file.
FileStatError
16
Failed to get the file status.
getTimeError
17
Failed to get the time from the log content.
HandleEventError
18
Exceptions occurred in processing the file.
handleFileCreateError
19
Exceptions occurred in handleFileCreateEvent().
LineParseError
20
Failed to parse the log directory.
Lz4CompressError
21
Failed to compress.
readEventException
22
Failed to read.
ReadFileBugOn
23
A bug exists.
ReadFileException
24
Exceptions occurred in the read file.
ReadFileInodeChange
25
File node changed.
ReadFileTruncate
26
The read file is truncated.
WildCardPathException
27
Exceptions occurred in addWildcardPathInotify().

LogListener Collection Logs (loglistener_business)

The parameters of the log topic loglistener_business are detailed as follows:
Parameter
Description
InstanceId
LogListener unique identifier
Label
An array of machine IDs
IP
Machine group IP
Version
LogListener version
TopicId
The target topic of the collected file
FileName
File path name
RealPath
Actual file path
FileInode
File node
FileSize
File size
LastReadTime
The most recent read time of the file
ParseFailLines
Number of parsing-failed logs within a time window
ParseFailSize
Size of parsing-failed logs within a time window
ParseSuccessLines
Number of logs successful parsed within a time window
ParseSuccessSize
Size of logs successful parsed within a time window
ReadOffset
Offset of file reading in bytes
TruncateSize
Size of truncated log files within a time window
ReadAvgDelay
Average time delay for reads within a time window
TimeFormatFailuresLines
Number of timestamp matching errors within a time window
SendSuccessSize
Size of logs successful sent within a time window
SendSuccessCount
Number of logs successful sent within a time window
SendFailureSize
Size of sending-failed logs within a time window
SendFailureCount
Number of sending-failed logs within a time window
SendTimeoutSize
Size of logs with sending timed out within a time window
SendTimeoutCount
Number of logs with sending timed out within a time window
DroppedLogSize
Size of dropped logs within a time window
DroppedLogCount
Number of dropped logs in a time window
ProcessBlock
Whether the current file has triggered collection blocking in a statistical period (collection blocking will be triggered if the sliding window of a file has not moved for 10 minutes)


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백