logstash-output-tcp 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/docs/index.asciidoc +1 -1
- data/logstash-output-tcp.gemspec +1 -1
- data/spec/integration/outputs/tcp_spec.rb +42 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b932be1d74f578b35700ea725ca26e3e178cfb21
|
4
|
+
data.tar.gz: b90da1d73508bfc7bcde930801119ebc5fd111ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41fdb7b54e9261cce89eb430413b30762a2e0b233000aef8afd1f00348b45887c7be1683e66e8d489a338bfb5e1aa6cabca4e6a7ff388ee84fdab01b2275e85
|
7
|
+
data.tar.gz: f7e0792e1c1173dee145727452e9955564f75683423c515ff03929dbe26fb837ea4ba1f826fb7be3672e2a8effb4b0029a9e5c8dca725bbda7e1b1bffff1fcb5
|
data/CHANGELOG.md
CHANGED
data/docs/index.asciidoc
CHANGED
data/logstash-output-tcp.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-tcp'
|
4
|
-
s.version = '4.0.
|
4
|
+
s.version = '4.0.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Write events over a TCP socket."
|
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/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require "logstash/devutils/rspec/spec_helper"
|
2
|
+
require "socket"
|
3
|
+
require "stud/task"
|
4
|
+
|
5
|
+
describe "TCP Output" do
|
6
|
+
|
7
|
+
let(:port) { rand(6233) }
|
8
|
+
subject { LogStash::Plugin.lookup("output", "tcp").new({ "host" => "localhost", "port" => port }) }
|
9
|
+
let(:event) { LogStash::Event.new({'message' => '183.60.215.50 - - [11/Sep/2014:22:00:00 +0000] "GET /scripts/netcat-webserver HTTP/1.1" 200 182 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)"', '@timestamp' => LogStash::Timestamp.at(0) }) }
|
10
|
+
let(:req_buffer) { Array.new }
|
11
|
+
let(:input) { LogStash::Plugin.lookup("input", "tcp").new({ "host" => "localhost", "port" => port }) }
|
12
|
+
let(:queue) { Array.new }
|
13
|
+
|
14
|
+
def thread_it
|
15
|
+
Thread.new do
|
16
|
+
begin
|
17
|
+
server = TCPServer.open(2000)
|
18
|
+
loop do
|
19
|
+
c = server.accept
|
20
|
+
line = c.gets
|
21
|
+
print line
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# it "should #register without errors" do
|
29
|
+
# expect { subject.register }.to_not raise_error
|
30
|
+
# end
|
31
|
+
|
32
|
+
# TCP server
|
33
|
+
it "should successfully send to a listening TCP server" do
|
34
|
+
subject.register
|
35
|
+
|
36
|
+
t = thread_it
|
37
|
+
t.run
|
38
|
+
|
39
|
+
subject.receive(event)
|
40
|
+
sleep 5
|
41
|
+
end
|
42
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-tcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- docs/index.asciidoc
|
88
88
|
- lib/logstash/outputs/tcp.rb
|
89
89
|
- logstash-output-tcp.gemspec
|
90
|
+
- spec/integration/outputs/tcp_spec.rb
|
90
91
|
- spec/outputs/tcp_spec.rb
|
91
92
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
92
93
|
licenses:
|
@@ -115,4 +116,5 @@ signing_key:
|
|
115
116
|
specification_version: 4
|
116
117
|
summary: Write events over a TCP socket.
|
117
118
|
test_files:
|
119
|
+
- spec/integration/outputs/tcp_spec.rb
|
118
120
|
- spec/outputs/tcp_spec.rb
|