产品动态
公告
logstash-plugin install logstash-output-cls
logstash -f logstash-sample.conf
example/fluent.conf。input {}## 若需要指定日志中的时间字段作为日志时间戳, 可配置如下时间解析配置filter {date {match => ["produce_log_time","yyyy-MM-dd HH:mm:ss.SSS"]target => "@timestamp"}}output {cls{endpoint => "[CLS数据接入域名]"topic_id => "[日志主题id]"access_key_id => ""access_key_secret => ""}}
参数名 | 类型 | 是否必填 | 默认值 | 描述 |
endpoint | string | 是 | - | 示例: 广州内网域名:ap-guangzhou.cls.tencentyun.com 广州公网域名:ap-guangzhou.cls.tencentcs.com |
topic_id | string | 是 | - | 目标上传的日志主题 ID。 |
source | string | 否 | 本地网卡 IP | 日志的来源 IP。 |
access_key_id | string | 是 | - | |
access_key_secret | string | 是 | - | |
max_buffer_items | int | 否 | 4000 | 日志上传按照批次上传。该参数控制每一批次最多可以有多少条日志。 |
max_buffer_bytes | int | 否 | 2097152 | 日志上传按照批次上传。该参数控制每一批次的日志总大小最多为多少。单位为Bytes。 |
max_buffer_seconds | int | 否 | 3 | 日志上传按照批次上传。 该参数控制每一批次从创建到可发送的最大逗留时间。 |
total_size_in_bytes | int | 否 | 104857600 | 实例能缓存的日志大小上限。 单位为Bytes。 |
max_send_retry | int | 否 | 10 | 日志上传失败时, 最大重试次数。 |
send_retry_interval | int | 否 | 200 | 日志上传失败时,下一次重试的时间间隔。 |
to_json | boolean | 否 | true | 是否对采集的日志进行 Json 解析。 |
time_key | string | 否 | @timestamp | 日志时间戳的来源字段 key 名。 |
文档反馈