logstash-input-stdin 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/logstash/inputs/stdin.rb +4 -15
- data/logstash-input-stdin.gemspec +2 -2
- metadata +25 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db4b831ee28c984a2ed614d215616631bf1fb4a1
|
4
|
+
data.tar.gz: eb3905ab461ffde5322efe4e926882447827ffd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4a6ad3fd55f53a8ed716ed3dae38fff8434473967771d5ca36986c46ab5dce020c7112ac3730eb4ac6cd380e8b3dae283dc0b3d14abd2528ffe613fb2d42e3f
|
7
|
+
data.tar.gz: cd7f1e6c3ea379743a18493d19b3c2aeb2bb312dd6d5f5af8e79d88d530450e84ede043c96150be76b66530d7b37c7d7af7f8d40156d50739d0f2f3ac3f50abc
|
data/README.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Logstash Plugin
|
2
2
|
|
3
|
-
This is a plugin for [Logstash](https://github.com/
|
3
|
+
This is a plugin for [Logstash](https://github.com/elastic/logstash).
|
4
4
|
|
5
5
|
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
|
6
6
|
|
7
7
|
## Documentation
|
8
8
|
|
9
|
-
Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.
|
9
|
+
Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/).
|
10
10
|
|
11
11
|
- For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
|
12
|
-
- For more asciidoc formatting tips, see the excellent reference here https://github.com/
|
12
|
+
- For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide
|
13
13
|
|
14
14
|
## Need Help?
|
15
15
|
|
@@ -83,4 +83,4 @@ Programming is not a required skill. Whatever you've seen about open source and
|
|
83
83
|
|
84
84
|
It is more important to the community that you are able to contribute.
|
85
85
|
|
86
|
-
For more information about contributing, see the [CONTRIBUTING](https://github.com/
|
86
|
+
For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
|
@@ -13,18 +13,13 @@ class LogStash::Inputs::Stdin < LogStash::Inputs::Base
|
|
13
13
|
|
14
14
|
default :codec, "line"
|
15
15
|
|
16
|
-
def initialize(*args)
|
17
|
-
super(*args)
|
18
|
-
@stop_requested = Concurrent::AtomicBoolean.new(false)
|
19
|
-
end
|
20
|
-
|
21
16
|
def register
|
22
17
|
@host = Socket.gethostname
|
23
18
|
fix_streaming_codecs
|
24
19
|
end
|
25
20
|
|
26
21
|
def run(queue)
|
27
|
-
while
|
22
|
+
while !stop?
|
28
23
|
begin
|
29
24
|
# Based on some testing, there is no way to interrupt an IO.sysread nor
|
30
25
|
# IO.select call in JRuby. Bummer :(
|
@@ -34,23 +29,17 @@ class LogStash::Inputs::Stdin < LogStash::Inputs::Base
|
|
34
29
|
event["host"] = @host if !event.include?("host")
|
35
30
|
queue << event
|
36
31
|
end
|
37
|
-
rescue IOError, EOFError
|
38
|
-
# stdin closed or a requested shutdown
|
39
|
-
@stop_requested.make_true
|
32
|
+
rescue IOError, EOFError # stdin closed
|
40
33
|
break
|
41
34
|
rescue => e
|
42
35
|
# ignore any exception in the shutdown process
|
43
|
-
break if
|
36
|
+
break if stop?
|
44
37
|
raise(e)
|
45
38
|
end
|
46
39
|
end
|
47
|
-
finished
|
48
40
|
end
|
49
41
|
|
50
|
-
def
|
51
|
-
@stop_requested.make_true
|
52
|
-
@logger.debug("stdin shutting down.")
|
42
|
+
def stop
|
53
43
|
$stdin.close rescue nil
|
54
|
-
finished
|
55
44
|
end
|
56
45
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-stdin'
|
4
|
-
s.version = '
|
4
|
+
s.version = '2.0.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Read events from standard input"
|
7
7
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
|
-
s.add_runtime_dependency "logstash-core",
|
23
|
+
s.add_runtime_dependency "logstash-core", "~> 2.0.0.snapshot"
|
24
24
|
|
25
25
|
s.add_runtime_dependency 'logstash-codec-plain'
|
26
26
|
s.add_runtime_dependency 'logstash-codec-line'
|
metadata
CHANGED
@@ -1,119 +1,113 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-stdin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: logstash-core
|
15
|
-
version_requirements: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.4.0
|
20
|
-
- - <
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 2.0.0
|
23
14
|
requirement: !ruby/object:Gem::Requirement
|
24
15
|
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: 1.4.0
|
28
|
-
- - <
|
16
|
+
- - ~>
|
29
17
|
- !ruby/object:Gem::Version
|
30
|
-
version: 2.0.0
|
18
|
+
version: 2.0.0.snapshot
|
19
|
+
name: logstash-core
|
31
20
|
prerelease: false
|
32
21
|
type: :runtime
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: logstash-codec-plain
|
35
22
|
version_requirements: !ruby/object:Gem::Requirement
|
36
23
|
requirements:
|
37
|
-
- -
|
24
|
+
- - ~>
|
38
25
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
26
|
+
version: 2.0.0.snapshot
|
27
|
+
- !ruby/object:Gem::Dependency
|
40
28
|
requirement: !ruby/object:Gem::Requirement
|
41
29
|
requirements:
|
42
30
|
- - '>='
|
43
31
|
- !ruby/object:Gem::Version
|
44
32
|
version: '0'
|
33
|
+
name: logstash-codec-plain
|
45
34
|
prerelease: false
|
46
35
|
type: :runtime
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: logstash-codec-line
|
49
36
|
version_requirements: !ruby/object:Gem::Requirement
|
50
37
|
requirements:
|
51
38
|
- - '>='
|
52
39
|
- !ruby/object:Gem::Version
|
53
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
54
42
|
requirement: !ruby/object:Gem::Requirement
|
55
43
|
requirements:
|
56
44
|
- - '>='
|
57
45
|
- !ruby/object:Gem::Version
|
58
46
|
version: '0'
|
47
|
+
name: logstash-codec-line
|
59
48
|
prerelease: false
|
60
49
|
type: :runtime
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: logstash-codec-json
|
63
50
|
version_requirements: !ruby/object:Gem::Requirement
|
64
51
|
requirements:
|
65
52
|
- - '>='
|
66
53
|
- !ruby/object:Gem::Version
|
67
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
68
56
|
requirement: !ruby/object:Gem::Requirement
|
69
57
|
requirements:
|
70
58
|
- - '>='
|
71
59
|
- !ruby/object:Gem::Version
|
72
60
|
version: '0'
|
61
|
+
name: logstash-codec-json
|
73
62
|
prerelease: false
|
74
63
|
type: :runtime
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: logstash-codec-json_lines
|
77
64
|
version_requirements: !ruby/object:Gem::Requirement
|
78
65
|
requirements:
|
79
66
|
- - '>='
|
80
67
|
- !ruby/object:Gem::Version
|
81
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
82
70
|
requirement: !ruby/object:Gem::Requirement
|
83
71
|
requirements:
|
84
72
|
- - '>='
|
85
73
|
- !ruby/object:Gem::Version
|
86
74
|
version: '0'
|
75
|
+
name: logstash-codec-json_lines
|
87
76
|
prerelease: false
|
88
77
|
type: :runtime
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: concurrent-ruby
|
91
78
|
version_requirements: !ruby/object:Gem::Requirement
|
92
79
|
requirements:
|
93
80
|
- - '>='
|
94
81
|
- !ruby/object:Gem::Version
|
95
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
96
84
|
requirement: !ruby/object:Gem::Requirement
|
97
85
|
requirements:
|
98
86
|
- - '>='
|
99
87
|
- !ruby/object:Gem::Version
|
100
88
|
version: '0'
|
89
|
+
name: concurrent-ruby
|
101
90
|
prerelease: false
|
102
91
|
type: :runtime
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: logstash-devutils
|
105
92
|
version_requirements: !ruby/object:Gem::Requirement
|
106
93
|
requirements:
|
107
94
|
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
110
98
|
requirement: !ruby/object:Gem::Requirement
|
111
99
|
requirements:
|
112
100
|
- - '>='
|
113
101
|
- !ruby/object:Gem::Version
|
114
102
|
version: '0'
|
103
|
+
name: logstash-devutils
|
115
104
|
prerelease: false
|
116
105
|
type: :development
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
117
111
|
description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
|
118
112
|
email: info@elastic.co
|
119
113
|
executables: []
|
@@ -153,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
147
|
version: '0'
|
154
148
|
requirements: []
|
155
149
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.4.8
|
157
151
|
signing_key:
|
158
152
|
specification_version: 4
|
159
153
|
summary: Read events from standard input
|