Skip to content

Commit

Permalink
dcm4che/dcm4chee-arc-light#534: Upgrade ELK to 5.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gunterze committed Jan 27, 2017
1 parent 56cfdbb commit aad2fcd
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 58 deletions.
7 changes: 2 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
## 2.0.0
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
- Dependency on logstash-core update to 2.0

## 0.1.0
- Plugin created with the logstash plugin generator
10 changes: 10 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The following is a list of people who have contributed ideas, code, bug
reports, or in general have helped logstash along its way.

Contributors:
* gunterze - [email protected]

Note: If you've sent us patches, bug reports, or otherwise contributed to
Logstash, and you aren't on the list above and want to be, please let us know
and we'll make sure you're here. Contributions from folks like you are what make
open source awesome.
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# logstash-codec-example
# logstash-codec-frame
Example codec plugin. This should help bootstrap your effort to write your own codec plugin!
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
source 'https://rubygems.org'
gemspec
gemspec

2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
42 changes: 15 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Logstash Plugin

[![Build
Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-example-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-example-unit/)

This is a plugin for [Logstash](https://github.com/elastic/logstash).

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.
Expand All @@ -25,7 +22,7 @@ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/log
#### Code
- To get started, you'll need JRuby with the Bundler gem installed.

- Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization.
- 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).

- Install dependencies
```sh
Expand All @@ -34,56 +31,47 @@ bundle install

#### Test

```sh
bundle exec rspec
```
- Update your dependencies

The Logstash code required to run the tests/specs is specified in the `Gemfile` by the line similar to:
```ruby
gem "logstash", :github => "elasticsearch/logstash", :branch => "1.5"
```
To test against another version or a local Logstash, edit the `Gemfile` to specify an alternative location, for example:
```ruby
gem "logstash", :github => "elasticsearch/logstash", :ref => "master"
```
```ruby
gem "logstash", :path => "/your/local/logstash"
```sh
bundle install
```

Then update your dependencies and run your tests:
- Run tests

```sh
bundle install
bundle exec rspec
```

### 2. Running your unpublished Plugin in Logstash

#### 2.1 Run in a local Logstash clone

- Edit Logstash `tools/Gemfile` and add the local plugin path, for example:
- Edit Logstash `Gemfile` and add the local plugin path, for example:
```ruby
gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
gem "logstash-codec-awesome", :path => "/your/local/logstash-codec-awesome"
```
- Update Logstash dependencies
- Install plugin
```sh
rake vendor:gems
bin/logstash-plugin install --no-verify
```
- Run Logstash with your plugin
```sh
bin/logstash -e 'filter {awesome {}}'
bin/logstash -e 'codec {awesome {}}'
```
At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.

#### 2.2 Run in an installed Logstash

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:

- Build your plugin gem
```sh
gem build logstash-filter-awesome.gemspec
gem build logstash-codec-awesome.gemspec
```
- Install the plugin from the Logstash home
```sh
bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
bin/logstash-plugin install /your/local/plugin/logstash-codec-awesome.gem
```
- Start Logstash and proceed to test the plugin

Expand All @@ -93,6 +81,6 @@ All contributions are welcome: ideas, patches, documentation, bug reports, compl

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.

It is more important to me that you are able to contribute.
It is more important to the community that you are able to contribute.

For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
6 changes: 0 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
@files=[]

task :default do
system("rake -T")
end

require "logstash/devutils/rake"
25 changes: 11 additions & 14 deletions logstash-codec-frame.gemspec
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
Gem::Specification.new do |s|

s.name = 'logstash-codec-frame'
s.version = '2.0.0'
s.licenses = ['Apache License (2.0)']
s.summary = "Frame-oriented text data."
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"
s.authors = ["Gunter Zeilinger"]
s.email = '[email protected]'
s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
s.require_paths = ["lib"]
s.name = 'logstash-codec-frame'
s.version = '5.0.0'
s.licenses = ['Apache License (2.0)']
s.summary = 'Frame-oriented text data.'
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.'
s.homepage = 'https://github.com/dcm4che/logstash-codec-frame'
s.authors = ['Gunter Zeilinger']
s.email = '[email protected]'
s.require_paths = ['lib']

# Files
s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']

# Tests
# Tests
s.test_files = s.files.grep(%r{^(test|spec|features)/})

# Special flag to let us know this is actually a logstash plugin
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "codec" }

# Gem dependencies
s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0"

s.add_runtime_dependency 'logstash-core-plugin-api', "~> 2.0"
s.add_development_dependency 'logstash-devutils'
end
3 changes: 1 addition & 2 deletions spec/codecs/frame_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# encoding: utf-8

require "logstash/devutils/rspec/spec_helper"
require_relative '../spec_helper'
require "logstash/codecs/frame"
require "logstash/event"

Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# encoding: utf-8
require "logstash/devutils/rspec/spec_helper"

0 comments on commit aad2fcd

Please sign in to comment.