Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.69 KB

File metadata and controls

36 lines (28 loc) · 1.69 KB

SLS

简介

flusher_sls flusher插件可以实现将采集到的数据,经过处理后,发送到SLS。

备注:采集到SLS时,需要对iLogtail进行AK、SK配置

配置参数

参数 类型 是否必选 说明
Type String 插件类型,指定为flusher_sls
Endpoint String SLS接入点地址
ProjectName String SLS Project名。
LogstoreName String SLS Logstore名。
EnableShardHash Boolean 是否启用Key路由Shard模式写入数据。仅当配置了aggregator_shardhash时有效。如果未添加该参数,则默认使用false,表示使用负载均衡模式写入数据。
KeepShardHash Boolean 是否在日志tag中增加__shardhash__:<shardhashkey>。仅当配置了aggregator_shardhash时有效。如果未添加该参数,则默认使用true,表示在日志中增加前述tag。
ShardHashKey Array 以Key路由Shard模式写入数据时,写入shard的判定依据字段。仅当配置了加速处理插件(processor_<type>_accelerate)时有效。如果未添加该参数,则默认以负载均衡模式写入数据

样例

采集/home/test-log/路径下的所有文件名匹配*.log规则的文件,并将采集结果发送到SLS。

enable: true
inputs:
  - Type: file_log
    LogPath: /home/test-log/
    FilePattern: "*.log"
flushers:
  - Type: flusher_sls
    Endpoint: cn-xxx.log.aliyuncs.com
    ProjectName: test_project
    LogstoreName: test_logstore