logstash-plugin install logstash-output-cls
logstash -f logstash-sample.conf
example/fluent.conf.input {}## If you need to specify a time field in the log as the timestamp, you can configure the following time parsing settings:filter {date {match => ["produce_log_time","yyyy-MM-dd HH:mm:ss.SSS"]target => "@timestamp"}}output {cls{endpoint => "[CLS data access domain name]"topic_id => "[Log topic ID]"access_key_id => ""access_key_secret => ""}}
Parameter Name | Type | Required | Default Value | Description |
endpoint | string | Yes | - | Example: Private network domain name of Guangzhou: ap-guangzhou.cls.tencentyun.com Public network domain name of Guangzhou: ap-guangzhou.cls.tencentcs.com |
topic_id | string | Yes | - | ID of the log topic to which the log will be uploaded. |
source | string | No | IP address of the local NIC | IP address of the source from which the log originates. |
access_key_id | string | Yes | - | |
access_key_secret | string | Yes | - | Part of the cloud API key. SecretKey is the key used to encrypt the signature string and verify the signature string on the server side. |
max_buffer_items | int | No | 4000 | Logs are uploaded by batch. This parameter controls the maximum number of log entries that can be included in one batch. |
max_buffer_bytes | int | No | 2097152 | Logs are uploaded by batch. This parameter controls the maximum total size of each batch in bytes. |
max_buffer_seconds | int | No | 3 | Logs are uploaded by batch. This parameter controls the maximum dwell time from creation to sending for each batch. |
total_size_in_bytes | int | No | 104857600 | Maximum size of logs that the instance can cache, in bytes. |
max_send_retry | int | No | 10 | Maximum number of retries when log upload fails. |
send_retry_interval | int | No | 200 | Time interval between retries when log upload fails. |
to_json | boolean | No | true | Whether to perform JSON parsing on collected logs. |
time_key | string | No | @timestamp | Key name of the source field for log timestamp. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback