logstash-input-sls 0.0.4 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/README.md +1 -9
- data/README_CN.md +1 -11
- data/lib/logstash/inputs/logservice.rb +12 -4
- data/lib/logstash/vendor/jar-dependencies/runtime-jars/logstash-input-sls-1.0-SNAPSHOT.jar +0 -0
- data/logstash-input-sls.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d078654c254e06fa9d3362f8b80e2db781e3501782007538111a3712a1a339e4
|
4
|
+
data.tar.gz: 3b2f83edfe02b4c943fbbe2a101251430d56b5434b56f6ee1c11cd312f8a757b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cda08ff744c29a60c2545af0922fbb8fef0bf4e1cd5a02d9af698d98d5996e4c88f0ed01998fad714d11119abded6b6bf252f7c79580de454ac453f689eb91c
|
7
|
+
data.tar.gz: c209c2e19d420a99c59171606fc9964d4236f9a62c9e9385f13569f5e3ec8e697e7da628121372c5e19969d91aca125c9524f9a525e07f9672ccdf29410c8ee5
|
data/Gemfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
source 'https://
|
1
|
+
source 'https://gems.ruby-china.com'
|
2
2
|
gemspec
|
data/README.md
CHANGED
@@ -50,20 +50,12 @@ This plugin supports the following configuration options
|
|
50
50
|
|
51
51
|
## Install the plugin
|
52
52
|
|
53
|
-
[logstash-input-sls-0.0.2.gem](https://github.com/aliyun/logstash-input-logservice/raw/master/logstash-input-sls-0.0.2.gem)
|
54
|
-
|
55
53
|
you can build the gem and install it using:
|
56
54
|
|
57
|
-
- Build your plugin gem
|
58
|
-
|
59
|
-
```sh
|
60
|
-
gem build logstash-input-sls.gemspec
|
61
|
-
```
|
62
|
-
|
63
55
|
- Install the plugin from the Logstash home
|
64
56
|
|
65
57
|
```sh
|
66
|
-
logstash-plugin install
|
58
|
+
logstash-plugin install logstash-input-sls
|
67
59
|
```
|
68
60
|
|
69
61
|
- Start Logstash
|
data/README_CN.md
CHANGED
@@ -63,20 +63,10 @@ output {
|
|
63
63
|
|
64
64
|
## 安装插件
|
65
65
|
|
66
|
-
* 注意:如果没有修改源码可直接安装
|
67
|
-
|
68
|
-
下载地址:[logstash-input-sls-0.0.2.gem](https://github.com/aliyun/logstash-input-logservice/raw/master/logstash-input-sls-0.0.2.gem)
|
69
|
-
|
70
|
-
- 构建 插件
|
71
|
-
|
72
|
-
```sh
|
73
|
-
gem build logstash-input-sls.gemspec
|
74
|
-
```
|
75
|
-
|
76
66
|
- 安装 日志服务 input 插件
|
77
67
|
|
78
68
|
```sh
|
79
|
-
logstash-plugin install
|
69
|
+
logstash-plugin install logstash-input-sls
|
80
70
|
```
|
81
71
|
|
82
72
|
- 启动 Logstash
|
@@ -53,6 +53,7 @@ class LogStash::Inputs::LogService < LogStash::Inputs::Base
|
|
53
53
|
LogHubStarter.startWorker(@endpoint, @access_id, @access_key, @project, @logstore, @consumer_group, @consumer_name + @ip_suffix + @process_pid, @position, @checkpoint_second, @include_meta, @queue_size)
|
54
54
|
|
55
55
|
consume(queue)
|
56
|
+
|
56
57
|
rescue Exception => e
|
57
58
|
@logger.error("Start logstash-input-logservice", :endpoint => @endpoint, :project => @project, :logstore => @logstore,
|
58
59
|
:consumer_group => @consumer_group, :consumer_name => @consumer_name, :position => @position,
|
@@ -63,10 +64,17 @@ class LogStash::Inputs::LogService < LogStash::Inputs::Base
|
|
63
64
|
def consume(queue)
|
64
65
|
while !stop?
|
65
66
|
while !Processor.LogstashLogHubProcessor.queueCache.isEmpty
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
begin
|
68
|
+
textmap = Processor.LogstashLogHubProcessor.queueCache.poll
|
69
|
+
event = LogStash::Event.new(textmap)
|
70
|
+
decorate(event)
|
71
|
+
queue << event
|
72
|
+
rescue Exception => e
|
73
|
+
@logger.error("Consume logstash-input-logservice", :endpoint => @endpoint, :project => @project, :logstore => @logstore,
|
74
|
+
:consumer_group => @consumer_group, :consumer_name => @consumer_name, :position => @position,
|
75
|
+
:checkpoint_second => @checkpoint_second, :include_meta => @include_meta, :consumer_name_with_ip => @consumer_name_with_ip, :exception => e)
|
76
|
+
retry
|
77
|
+
end
|
70
78
|
end
|
71
79
|
Stud.stoppable_sleep(@checkpoint_second) { stop? }
|
72
80
|
end # loop
|
Binary file
|
data/logstash-input-sls.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-sls'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.8'
|
4
4
|
s.licenses = ['MIT']
|
5
5
|
s.summary = "This sls input streams a string at a definable interval."
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-sls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lichao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|
@@ -108,8 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
|
112
|
-
rubygems_version: 2.5.2.3
|
111
|
+
rubygems_version: 3.0.3
|
113
112
|
signing_key:
|
114
113
|
specification_version: 4
|
115
114
|
summary: This sls input streams a string at a definable interval.
|