Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logstash-input-datahub

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logstash-input-datahub

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Aliyun DataHub Plugin for LogStash

Getting Started


介绍

  • 该插件是基于logstash开发的输入插件,它主要完成消费DataHub(阿里云产品)服务上的数据。

安装

  • 环境要求linux, jdk1.7+, logstash(可选,如果没安装也没关系)
  • 从流计算官网下载tar包,使用以下命令安装

如果之前没安装过logstash,请使用以下步骤安装

$ tar -xzvf logstash-with-datahub-2.3.0.tar.gz
$ cd logstash-with-datahub-2.3.0

如果之前安装过logstash,拿到logstash-input-datahub-1.0.0.gem,再使用以下命令安装

$ ${LOGSTASH_HOME}/bin/logstash-plugin install --local logstash-input-datahub-1.0.0.gem

样例

logstash的配置如下:

input {
    datahub {
        access_id => "Your accessId"
        access_key => "Your accessKey"
        endpoint => "http://dh-cn-hangzhou.aliyuncs.com"
        project_name => "test_project"
        topic_name => "test_logstash"
        interval=> 5
        #cursor => {
        #    "0"=>"20000000000000000000000003110091"
        #    "2"=>"20000000000000000000000003110091"
        #    "1"=>"20000000000000000000000003110091"
        #    "4"=>"20000000000000000000000003110091"
        #    "3"=>"2000000000000000000000000311000"
        #}
        shard_ids => []
        pos_file => "/home/admin/logstash/logstash-2.4.0/pos_file"
    }
}

output {
    file {
        path => "/home/admin/logstash/logstash-2.4.0/output"
    }
}

参数介绍

access_id(Required): 阿里云access id
access_key(Required): 阿里云access key
endpoint(Required): 阿里云datahub的服务地址
project_name(Required): datahub项目名称
topic_name(Required): datahub topic名称
retry_times(Optional): 重试次数,-1为无限重试、0为不重试、>0表示需要有限次数
retry_interval(Optional): 下一次重试的间隔,单位为秒
shard_ids(Optional):数组类型,需要消费的shard列表,空列表默认全部消费
cursor(Optional):消费起点,默认为空,表示从头开始消费
pos_file(Required):checkpoint记录文件,必须配置,优先使用checkpoint恢复消费offset

相关参考


  • LogStash主页
  • LogStash插件开发

Authors && Contributors


License


licensed under the Apache License 2.0

FAQs

Package last updated on 14 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc