SLS

简介

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

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

版本

Stable

配置参数

参数类型是否必选说明

Type

String

插件类型,指定为flusher_sls

Region

String

区域,一般取接入点公网服务入口前缀(需要向多个Endpoint发送时必须配置)

Endpoint

String

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)时有效。如果未添加该参数,则默认以负载均衡模式写入数据

安全性说明

flusher_sls 默认使用 HTTPS 协议发送数据到 SLS,也可以使用data_server_port参数更高发送协议。

样例

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

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

Last updated