目录

Huawei Cloud DIS Plugins for Logstash

DIS Logstash Plugin是数据接入服务(DIS)为Logstash开发的插件,包含DIS Input与DIS Output。DIS Input用于从DIS服务下载数据到Logstash,DIS Output用于将Logstash中的数据上传到DIS服务。

一、安装插件

1.1 安装logstash-input-dis

bin/logstash-plugin install logstash-input-dis

安装完成后,显示类似如下内容,表示安装成功。

Validating logstash-input-dis
Installing logstash-input-dis
Installation successful

1.2 安装logstash-output-dis

bin/logstash-plugin install logstash-output-dis

安装完成后,显示类似如下内容,表示安装成功。

Validating logstash-output-dis
Installing logstash-output-dis
Installation successful

二、参数配置

2.1 logstash-input-dis参数配置

input
{
   dis {
        streams => ["YOU_DIS_STREAM_NAME"]
        endpoint => "https://dis.cn-north-1.myhuaweicloud.com"
        ak => "YOU_ACCESS_KEY_ID"
        sk => "YOU_SECRET_KEY_ID"
        region => "cn-north-1"
        project_id => "YOU_PROJECT_ID"
        group_id => "YOU_GROUP_ID"
        decorate_events => true
        auto_offset_reset => "earliest"
    }
}
Name Description Default
streams 指定在DIS服务上创建的通道名称。 -
ak 用户的Access Key,可从华为云控制台“我的凭证”页获取。 -
sk 用户的Secret Key,可从华为云控制台“我的凭证”页获取。 -
region 将数据上传到指定Region的DIS服务。 cn-north-1
project_id 用户所属区域的项目ID,可从华为云控制台“我的凭证”页获取。 -
endpoint DIS对应Region的数据接口地址。 https://dis.cn-north-1.myhuaweicloud.com
group_id DIS App名称,用于标识一个消费组,值可以为任意字符串。 -

2.2 logstash-output-dis参数配置

output
{
   dis {
        stream => ["YOU_DIS_STREAM_NAME"]
        endpoint => "https://dis.cn-north-1.myhuaweicloud.com"
        ak => "YOU_ACCESS_KEY_ID"
        sk => "YOU_SECRET_KEY_ID"
        region => "cn-north-1"
        project_id => "YOU_PROJECT_ID"
        group_id => "YOU_GROUP_ID"
        decorate_events => true
        auto_offset_reset => "earliest"
    }
}
Name Description Default
stream 指定在DIS服务上创建的通道名称。 -
ak 用户的Access Key,可从华为云控制台“我的凭证”页获取。 -
sk 用户的Secret Key,可从华为云控制台“我的凭证”页获取。 -
region 将数据上传到指定Region的DIS服务。 cn-north-1
project_id 用户所属区域的项目ID,可从华为云控制台“我的凭证”页获取。 -
endpoint DIS对应Region的数据接口地址。 https://dis.cn-north-1.myhuaweicloud.com

三、源码编译

3.1 logstash-input-dis源码编译

3.2 logstash-output-dis源码编译

License

Apache License 2.0

关于
81.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号