logstash-output-rabbit-gelf 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 221aeeb84ad330689505d28818fd64809350ec66
4
+ data.tar.gz: 7873d9e29cfab1af1f9ae96c0025648115364dbb
5
+ SHA512:
6
+ metadata.gz: c2e1202584fb70c97dc387e45059ad39644b175566d35fcd547beb0e8b21ceeed181ab6f70971b6754eedf2f620bcc136a864789e65ee2cfdfb887b2e1f9e9c5
7
+ data.tar.gz: 139d2e39eeb51591043db3f433e94d5b081e8d1c11c97e9204401597ad7a2cc9edbeb79bb1ea25eed4f593fe27e9db970f7cd17cd3ae52710121d53e26e866a9
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ ## 2.0.1
2
+ - Add encoding: utf-8 to spec files. This can help prevent issues during testing.
3
+ ## 2.0.0
4
+ - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
5
+ instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
6
+ - Dependency on logstash-core update to 2.0
7
+
data/CONTRIBUTORS ADDED
@@ -0,0 +1 @@
1
+ Based on the logstash example output of Feb 2016
data/DEVELOPER.md ADDED
@@ -0,0 +1,2 @@
1
+ # logstash-output-rabbit-gelf
2
+ Adopting gelf as a suitable output format to rabbit
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2016 Leffen <http://leffen.com>
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/NOTICE.TXT ADDED
@@ -0,0 +1,4 @@
1
+ This product includes software developed by The Apache Software
2
+ Foundation (http://www.apache.org/).
3
+ and Elasticsearch
4
+
data/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # Logstash Plugin
2
+
3
+ This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
+
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
+
7
+ ## Documentation
8
+
9
+
10
+ ## Need Help?
11
+
12
+
13
+ ## Developing
14
+
15
+ ### 1. Plugin Developement and Testing
16
+
17
+ #### Code
18
+ - To get started, you'll need JRuby with the Bundler gem installed.
19
+
20
+ - Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. We also provide [example plugins](https://github.com/logstash-plugins?query=example).
21
+
22
+ - Install dependencies
23
+ ```sh
24
+ bundle install
25
+ ```
26
+
27
+ #### Test
28
+
29
+ - Update your dependencies
30
+
31
+ ```sh
32
+ bundle install
33
+ ```
34
+
35
+ - Run tests
36
+
37
+ ```sh
38
+ bundle exec rspec
39
+ ```
40
+
41
+ ### 2. Running your unpublished Plugin in Logstash
42
+
43
+ #### 2.1 Run in a local Logstash clone
44
+
45
+ - Edit Logstash `Gemfile` and add the local plugin path, for example:
46
+ ```ruby
47
+ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
48
+ ```
49
+ - Install plugin
50
+ ```sh
51
+ bin/plugin install --no-verify
52
+ ```
53
+ - Run Logstash with your plugin
54
+ ```sh
55
+ bin/logstash -e 'filter {awesome {}}'
56
+ ```
57
+ At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.
58
+
59
+ #### 2.2 Run in an installed Logstash
60
+
61
+ You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using:
62
+
63
+ - Build your plugin gem
64
+ ```sh
65
+ gem build logstash-filter-awesome.gemspec
66
+ ```
67
+ - Install the plugin from the Logstash home
68
+ ```sh
69
+ bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
70
+ ```
71
+ - Start Logstash and proceed to test the plugin
72
+
73
+ ## Contributing
74
+
75
+ All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.
76
+
77
+ Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here.
78
+
79
+ It is more important to the community that you are able to contribute.
80
+
81
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ require "logstash/outputs/base"
3
+ require "logstash/namespace"
4
+
5
+ # An example output that does nothing.
6
+ class LogStash::Outputs::RabbitGelf < LogStash::Outputs::Base
7
+ config_name "rabbit-gelf"
8
+
9
+ public
10
+ def register
11
+ end # def register
12
+
13
+ public
14
+ def receive(event)
15
+ return "Event received"
16
+ end # def event
17
+ end # class LogStash::Outputs::Example
@@ -0,0 +1,24 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'logstash-output-rabbit-gelf'
3
+ s.version = "0.1.0"
4
+ s.licenses = ["Apache License (2.0)"]
5
+ s.summary = "Outputs gelf data to rabbit."
6
+ 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.authors = ["Leffen"]
8
+ s.email = "leffen@gmail.com"
9
+ s.homepage = "http://leffen.com"
10
+ s.require_paths = ["lib"]
11
+
12
+ # Files
13
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
14
+ # Tests
15
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
16
+
17
+ # Special flag to let us know this is actually a logstash plugin
18
+ s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
19
+
20
+ # Gem dependencies
21
+ s.add_runtime_dependency "logstash-core", ">= 2.0.0", "< 3.0.0"
22
+ s.add_runtime_dependency "logstash-codec-plain"
23
+ s.add_development_dependency "logstash-devutils"
24
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+ require "logstash/devutils/rspec/spec_helper"
3
+ require "logstash/outputs/example"
4
+ require "logstash/codecs/plain"
5
+ require "logstash/event"
6
+
7
+ describe LogStash::Outputs::Example do
8
+ let(:sample_event) { LogStash::Event.new }
9
+ let(:output) { LogStash::Outputs::Example.new }
10
+
11
+ before do
12
+ output.register
13
+ end
14
+
15
+ describe "receive message" do
16
+ subject { output.receive(sample_event) }
17
+
18
+ it "returns a string" do
19
+ expect(subject).to eq("Event received")
20
+ end
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logstash-output-rabbit-gelf
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Leffen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
+ dependencies:
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: 2.0.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0.0
23
+ requirement: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 2.0.0
28
+ - - "<"
29
+ - !ruby/object:Gem::Version
30
+ version: 3.0.0
31
+ prerelease: false
32
+ type: :runtime
33
+ - !ruby/object:Gem::Dependency
34
+ name: logstash-codec-plain
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ prerelease: false
46
+ type: :runtime
47
+ - !ruby/object:Gem::Dependency
48
+ name: logstash-devutils
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ prerelease: false
60
+ type: :development
61
+ 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
62
+ email: leffen@gmail.com
63
+ executables: []
64
+ extensions: []
65
+ extra_rdoc_files: []
66
+ files:
67
+ - CHANGELOG.md
68
+ - CONTRIBUTORS
69
+ - DEVELOPER.md
70
+ - Gemfile
71
+ - LICENSE
72
+ - NOTICE.TXT
73
+ - README.md
74
+ - lib/logstash/outputs/rabbit-gelf.rb
75
+ - logstash-output-rabbit-gelf.gemspec
76
+ - spec/outputs/rabbit-gelf_spec.rb
77
+ homepage: http://leffen.com
78
+ licenses:
79
+ - Apache License (2.0)
80
+ metadata:
81
+ logstash_plugin: 'true'
82
+ logstash_group: output
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 2.4.8
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Outputs gelf data to rabbit.
103
+ test_files:
104
+ - spec/outputs/rabbit-gelf_spec.rb