logstash-input-relp 2.0.5 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2165b70c4aefab925ee795a4134775014fdca0f3
4
- data.tar.gz: f46062a596ef6b9f6b0faa4b65f002a08c1b1e9d
3
+ metadata.gz: 540969952b5be2771c0b89951e69f0a3187aab48
4
+ data.tar.gz: 6c9b98332f8484d64f8ea59310cba5c1a13ed1e3
5
5
  SHA512:
6
- metadata.gz: 0deabe2f911c5f1ee5e38902c3aed0acd3b56eb1088279db593905635c04dd31ca17e0f42f4c176feb459f3a97db50df26d9cf7d0406427859f37b8cb11b3abf
7
- data.tar.gz: 76dc430c65d32f28ce2b4d7cf61b6d4b0ae88cb188b52f24b42ffc3a422d11a6f6e05588372316d6b90e09ef5d08d42f1e99465a0d34e6f2fbf0d6ff963fda98
6
+ metadata.gz: 1d3eb59a6efbf1c083c452649a59f0dc8a8c5bbc48024fdd9bed09d52823e0e9dd16319a7a765d22e9ac9a69ef7549a5abf9878404d07a125ed7d538e89a5622
7
+ data.tar.gz: 7e3852abd0cb4757a2456885456f2cf03ed2c74acde72c520fce5fdebdbfa4acc4acd4063b9db6cf19633188c9173ed93e9a8a9a2858f4bd93393c5d6f03fc99
@@ -1,3 +1,6 @@
1
+ # 3.0.0
2
+ - Breaking: depend on logstash-core-plugin-api between 1.60 and 2.99
3
+
1
4
  # 2.0.5
2
5
  - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
6
  # 2.0.4
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Logstash Plugin
2
2
 
3
- [![Build
4
- Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-relp-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-relp-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-input-relp.svg)](https://travis-ci.org/logstash-plugins/logstash-input-relp)
5
4
 
6
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
7
6
 
@@ -56,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
56
55
  ```
57
56
  - Install plugin
58
57
  ```sh
58
+ # Logstash 2.3 and higher
59
+ bin/logstash-plugin install --no-verify
60
+
61
+ # Prior to Logstash 2.3
59
62
  bin/plugin install --no-verify
63
+
60
64
  ```
61
65
  - Run Logstash with your plugin
62
66
  ```sh
@@ -74,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
74
78
  ```
75
79
  - Install the plugin from the Logstash home
76
80
  ```sh
77
- bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
81
+ # Logstash 2.3 and higher
82
+ bin/logstash-plugin install --no-verify
83
+
84
+ # Prior to Logstash 2.3
85
+ bin/plugin install --no-verify
86
+
78
87
  ```
79
88
  - Start Logstash and proceed to test the plugin
80
89
 
@@ -104,8 +104,10 @@ class LogStash::Inputs::Relp < LogStash::Inputs::Base
104
104
  frame = relpserver.syslog_read(socket)
105
105
  @codec.decode(frame["message"]) do |event|
106
106
  decorate(event)
107
- event["host"] = client_address
108
- event["sslsubject"] ||= socket.peer_cert.subject if @ssl_enable && @ssl_verify
107
+ event.set("host", client_address)
108
+ if @ssl_enable && @ssl_verify && event.get("ssl_context").nil?
109
+ event.set("sslsubject", socket.peer_cert.subject)
110
+ end
109
111
  output_queue << event
110
112
  end
111
113
 
@@ -1,5 +1,6 @@
1
1
  # encoding: utf-8
2
2
  require "socket"
3
+ require "cabin"
3
4
 
4
5
  class Relp#This isn't much use on its own, but gives RelpServer and RelpClient things
5
6
 
@@ -101,7 +102,7 @@ end
101
102
  class RelpServer < Relp
102
103
 
103
104
  def initialize(host,port,required_commands=[],ssl_context=nil)
104
- @logger = Cabin::Channel.get(LogStash)
105
+ @logger = ::Cabin::Channel.get(LogStash)
105
106
 
106
107
  @server=true
107
108
 
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-relp'
4
- s.version = '2.0.5'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read RELP events over a TCP socket."
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"
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"
8
8
  s.authors = ["Elastic"]
9
9
  s.email = 'info@elastic.co'
10
10
  s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
@@ -20,9 +20,10 @@ 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-plugin-api", "~> 1.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
24
 
25
25
  s.add_runtime_dependency 'logstash-codec-plain'
26
26
  s.add_development_dependency 'logstash-devutils'
27
+ s.add_development_dependency 'cabin'
27
28
  end
28
29
 
@@ -68,9 +68,9 @@ describe LogStash::Inputs::Relp do
68
68
  end
69
69
 
70
70
  it "should do multiple connections" do
71
- nclients.times do |client_id|
72
- expect(events).to have(nevents).with("Hello from client#{client_id}")
73
- end
71
+ expect(events.size).to eq(nevents * nclients)
72
+ grouped = events.group_by { |e| /(client\d)/.match(e.get("message")) }
73
+ expect(grouped.size).to eq(nclients)
74
74
  end
75
75
  end
76
76
 
@@ -14,7 +14,7 @@ class RelpHelpers
14
14
  end
15
15
 
16
16
  def self.filter(events, message)
17
- events.select{|event| event["message"] == message }
17
+ events.select{|event| event.set("message", message) }
18
18
  end
19
19
  end
20
20
 
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-relp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 3.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: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '1.60'
19
+ - - "<="
17
20
  - !ruby/object:Gem::Version
18
- version: '1.0'
21
+ version: '2.99'
19
22
  name: logstash-core-plugin-api
20
23
  prerelease: false
21
24
  type: :runtime
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '1.0'
29
+ version: '1.60'
30
+ - - "<="
31
+ - !ruby/object:Gem::Version
32
+ version: '2.99'
27
33
  - !ruby/object:Gem::Dependency
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
@@ -52,7 +58,21 @@ dependencies:
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
54
60
  version: '0'
55
- 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
61
+ - !ruby/object:Gem::Dependency
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ name: cabin
68
+ prerelease: false
69
+ type: :development
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ 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
56
76
  email: info@elastic.co
57
77
  executables: []
58
78
  extensions: []