SecretId
and SecretKey
in the Tencent Cloud console.winlogbeat
folder under the Program Files
directory for decompression.cd C:\\Program Filescd .\\winlogbeat-7.6.2-windows-x86_64.\\install-service-winlogbeat.ps1
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
command and select y
. Then, enter the above command again..\\winlogbeat.exe test config -c .\\winlogbeat.yml -e
config OK
is returned, the environment is normal.Start-Service winlogbeat
winlogbeat.yml
file in C:\\Program Files\\Winlogbeat
, change output.kafka
to the following to send logs to CLS.output.kafka:enabled: truehosts: ["${region}-producer.cls.tencentyun.com:9095"] # TODO: Service address. The public network port is 9096, and the private network port is 9095.topic: "${topicID}" # TODO: Topic IDversion: "0.11.0.2"compression: "${compress}" # Configure the compression method. Valid values: `gzip`, `snappy`, `lz4`.username: "${logsetID}"password: "${SecurityId}#${SecurityKey}"
Parameter | Description |
LinkType | Currently, SASL_PLAINTEXT is supported. |
hosts | |
topic | Log topic ID, such as 76c63473-c496-466b-XXXX-XXXXXXXXXXXX. |
username | Logset ID, such as 0f8e4b82-8adb-47b1-XXXX-XXXXXXXXXXXX. |
password | Password in the format of ${SecurityId}#${SecurityKey} , such as XXXXXXXXXXXXXX#YYYYYYYY. |
filebeat.yml
file.# Module: mssql# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.3/filebeat-module-mssql.html- module: mssql# Fileset for native deploymentlog:enabled: true# Set custom paths for the log files. If left empty,# Filebeat will choose the paths depending on your OS.var.paths: ["D:/Program Files/Microsoft SQL Server/MSSQL10_50.MSSQLSERVER/MSSQL/Log/ERROR*"]
# Enter the specific Filebeat pathcd c:/filebeat# Run the installation script to install Filebeat.\\install-service-filebeat.ps1# Start the mssql module.\\filebeat.exe modules enable mssql# Install the template file.\\filebeat.exe setup -e# Start Filebeatstart-service filebeat
filebeat.yml
file, change output.kafka
to the following to send logs to CLS:output.kafka:enabled: truehosts: ["${region}-producer.cls.tencentyun.com:9095"] # TODO: Service address. The public network port is 9096, and the private network port is 9095.topic: "${topicID}" # TODO: Topic IDversion: "0.11.0.2"compression: "${compress}" # Configure the compression method. Valid values: `gzip`, `snappy`, `lz4`.username: "${logsetID}"password: "${SecurityId}#${SecurityKey}"
Parameter | Description |
LinkType | Currently, SASL_PLAINTEXT is supported. |
hosts | |
topic | Log topic ID, such as 76c63473-c496-466b-XXXX-XXXXXXXXXXXX. |
username | Logset ID, such as 0f8e4b82-8adb-47b1-XXXX-XXXXXXXXXXXX. |
password | Password in the format of ${SecurityId}#${SecurityKey} , such as XXXXXXXXXXXXXX#YYYYYYYY. |
Region | Network Type | Port Number | Service Entry |
Guangzhou | Private network | 9095 | gz-producer.cls.tencentyun.com:9095 |
| Public network | 9096 | gz-producer.cls.tencentcs.com:9096 |
문제 해결에 도움이 되었나요?