Commit graph

7009 commits

Author SHA1 Message Date
Joao Duarte
ca9335a2a7 allow logstash to run in a dir with spaces
because HeapDumpPath is set, if it contains spaces the jruby_opts
function will create two strings appended by -J
even if the list of jruby opts is constructed using replacement
shell script will not escape the path correct to the heap dump path
option needs to be added as late as possible

this is a *nix fix only, windows is not affected

Fixes #4303
2015-12-04 21:28:19 +00:00
Alvin Chen
c2adc5c57d update filebeat link
Fixes #4296
2015-12-02 18:54:16 +00:00
Alvin Chen
88e864bd48 update filebeat link
Fixes #4296
2015-12-02 18:54:15 +00:00
Joao Duarte
c3c15aa81f move misplaced shutdown_controller after broken merge
Fixes #4268
2015-12-02 18:18:44 +00:00
Colin Surprenant
6a4963a214 cleanup Event class
Fixes #4261
2015-11-30 22:51:51 +00:00
Joao Duarte
21dfae1652 fix shutdown controller when using no filters 2015-11-27 10:48:19 +00:00
Pere Urbon-Bayes
97e72b6279 update jruby to last 1.7.23 release
Fixes #4260
2015-11-25 10:04:04 +00:00
Pere Urbon-Bayes
54b9671f95 update the README to show the last versions master, 2.x and 2.1
Fixes #4217
2015-11-24 12:19:55 +00:00
Paul Echeverri
6b9e19021c Adds information on shutdown stalls, release notes, other housekeeping 2015-11-24 11:26:25 +00:00
Suyog Rao
f874bb4ba9 Added changelog for v2.1.0 2015-11-23 16:32:06 +00:00
Joao Duarte
79b90b19d7 add shutdown controller to force exit on stalled shutdown
* start logstash with --allow-unsafe-shutdown to force_exit on stalled shutdown
* by default --allow-unsafe-shutdown is disabled
* stall detection kicks in when SIGTERM/SIGINT is received
* check if inflight event count isn't going down and if there are blocked/blocking plugin threads
2015-11-19 15:35:47 +00:00
Colin Surprenant
64ae981306 clean cache to empty previous entries 2015-11-18 14:56:41 -05:00
Pier-Hugues Pellerin
21c8d4eb30 Test for Event#to_s format
Fixes #4222
2015-11-18 07:44:13 -08:00
Pier-Hugues Pellerin
c89e4abc99 Fix a string interpolation memory leak
When the event was serialized to string using a `to_s` call, mostly
happenning when doing logging. Each calls would generate a new template
each template was unique because it was containing the date.

The accumulation of templates was making logstash goes OOM.

We aren't cleaning the templates because they should stabilize to a
finite number.
2015-11-18 07:44:08 -08:00
Pere Urbon-Bayes
577d8377b8 This adds a feature to let users dump all their installed plugins,
including dependencies, and reuse them in an offline installation by
providing an package for it. It adds two important commands to the
plugin manager, the pack and upack, to handle package creation and
installation and adds the --local flag to install and update to pull
plugins from the installed local packages.

Former commits:

add a task to create a bundle, under vendor/cache of the installed gems + their dependencies, this can be used later on to be installed offline

add an option to pass the --local flag to the bin/plugin update task, so it fetch plugins from a local cache, by default under vendor/cache

rename package:build to package:build-cache as is more meaningfull

add a --local flag to bin/plugin install to users can install plugins from the local cache, under the default directory of vendor/cache

add a plugin manager command to build the local cache of installed plugins using bundler package alike command

It adds code for compressing and extracting in zip and tar formats to
the utils module of logstash. The zip module is only jruby dependant as
it uses functions provided by java.
There is also code add in the plugin manager package command to handle
compression of plugins dumping.

Cleanup the custom java code to compress and extract zip files as it has
been known that using rubyzip is good and it has a more ruby like
features so the code is more clean and portable.

set of smallish improvement requested during review

added several options to handle situation when the package of plugins we want to generate is already there

clean up old code

applyed feedback from review, mostly changed in documentating behaviour plus better wording for messages

relocate the Environment.windows? check to the bootstrap side as it's used also in the plugin manager

add an unpack bin/plugin command so users can install packages of plugins throw the plugin manager

document override behaviour in the compress helpers (for zip and tar) plus add a fix for the tar extract when reading entries

made the unpack filename parameter a required one

add a force option to the bin/plugin unpack command

add a notice to that if using a local cache the --local flag should be passed with

Code cleanup and refactor introduced during review

add two wording suggestions comming from review

ammend more wording

skip the major version validation as in situation where there is no internet connection like when using the local vendor/cache to do the update

move compress to the bootstrap environment as being used in the plugin manager means not being loaded with logstash-core

Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies

Revert "Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies"

This reverts commit a9d7f46649932b06efaafebdd0eed2b4c63c2235.

patch the Bundler::Source::Rubygems to fetch only gems from a remote  source

small changes in several parts of the plugin manager and the creation of a common pack command with shared code

change compress to read in chuncks

fix wrong var name in the bootstrap compress utils module

fix namespacing conflicts

add basic test for the compress utility module

ammend more namespace issues

add a comment to the rubygems mockey patch to rebuild the gem cache

apply cosmetic changes

make the compress module raise CompressError

remove vendor_path and pattern_path form environment as they where mix up during rebase

change the bin/pack force option to be force-delete-cache

rename force_delete_cache to overwrite

change force for overwrite in tha pack command

remove the override option for bin/plugin unpack

revert Gemfile and Genfile.lock wrong committed
2015-11-18 16:28:50 +01:00
Paul Echeverri
753c295834 Updates formatting to fix the build 2015-11-17 19:09:16 -08:00
Paul Echeverri
b731657b5d Changes Logstash Forwarder references to Beats, updates examples in tutorial
Fixes #4223
2015-11-17 18:28:03 -08:00
Suyog Rao
8015b7f9f8 Uncomment heapdump location
Fixes #4205
2015-11-17 15:53:44 +00:00
Suyog Rao
afa3889fa0 Fix heapdump path for Windows
Fixes #4205
2015-11-17 15:53:44 +00:00
Suyog Rao
5c81679757 Update comment about location
Fixes #4205
2015-11-17 15:53:44 +00:00
Suyog Rao
2120372c39 Add option for JVM to dump its heap on OutOfMemory
Fixes #4192

Fixes #4205
2015-11-17 15:53:43 +00:00
guyboertje
447b47d9ce add provision for worker threads based on threadsafe workers
updates requested by code review

changes requested by colin: make workers override from -w arg

do not set workers unless user actually specified it via cmdline

fix defaults printing

add describe block to improve test output readability

Closes #4130
2015-11-17 14:37:56 +00:00
Pere Urbon-Bayes
aba9fb6854 stub the warn_local_gems call in the update command of the plugin manager as is only relevant for master, not for the version branches
Fixes #4212
2015-11-17 14:05:06 +00:00
Pere Urbon-Bayes
e090e0f49c Fix the plugin manager install and update commands to perform the validation properly when a private gem server (not rubygems) has been configured. This basically loads the sources so the system is able to perform the validation with the right destionation and not with the default source (rubygems.org)
Former commits:

add all defined sources to rubygems so verification can talk to all the repositories, even the private ones

added a very simple plugin manager install command spec, to check for properly loading sources when validating

broke long lines into smaller ones in the install command

make sure the update command takes into account all declared sources, plus there is the option to avoid gem validation in case of only having a private gem repo and no internet connection

fix wrong conditional in the validation of plugins

move the Gem.sources loading to a common place, to sources are loaded all at once and we don't need to worry on each call to be sure we do the right thing for other sources different that rubygems

update test to the last changes in the way gemfile is loaded

move Gem::SourceList.from to bundler::invoke! so we use the default gemset.sources array

fix loading path for Gem::SourceList in bundler, so it's not colliding with other classes

Revert "move the Gem.sources loading to a common place, to sources are loaded all at once and we don't need to worry on each call to be sure we do the right thing for other sources different that rubygems"

This reverts commit 6e1c809665d61495b5461e7522a7adc745fe27fc.

Revert "update test to the last changes in the way gemfile is loaded"

This reverts commit dc5f65c2ac5380b1640cb732946f1a8ababcc9dc.

make the Gem.sources load to happen inside the logstash_plugin? call

add the idea of settings to the plugin manager module, like this we can pass throw different stuff usefull to setup dependant components

add the install spec back

remove the PluginManager::Settings concept

change sources for rubygems_sources in the plugin manager options

change rubygems_sources to be rubygems_source

update comments

ammend plugin manager options description in the comments

spaces and new lines cleanup

merged duplicated plugin manager util_spec introduced during rebase

add a check when Gems.versions fail

Add the validation exception for the plugin manager

add better error handling for situation where the validation is not possible due to a connection issue with the remote server

Fixes #3583
2015-11-17 08:38:56 +00:00
Colin Surprenant
4f622cd4ca fix version path, relates to #4123 2015-11-17 01:19:09 -05:00
Colin Surprenant
2ab211bfdb fix coverage paths for new structure by #4123 2015-11-16 19:53:07 -05:00
Colin Surprenant
985ed53bbe new #4123 lock file 2015-11-16 18:05:41 -05:00
Colin Surprenant
12a5982da2 logstash-core & logstash-core-event extraction to support logstash-core-event-java impl, relates to #4191
fixed timezone issue

extracted logstash-core and reorganized specs

extracted logstash-core-event

extract java Event into logstash-core-event-java in a proper gem

remove obsolete jruby_event bootstrapping

fix require path

add java code bootstrap

use logstash-core-event/logstash-core-event.rb

remove obsolete files

basic instructions

LogStash::Json need to be initialized from event

update jruby and gradle versions

update compile:logstash-core-event-java rake task

WIP tasks refactor

fix gem.files

skip test if class is not defined

fix gem related tasks for new structure

add gem spec dirs in core tests

bootstrap java implementation when requiring timestamp

new Cloner class and Event clone impl

fix array fields assignments, see #4140

don't rely on json implementation ordering

fix skipped last iterpolation char

remove implementation specific unnecessary check

also require ruby classes

define error class in ruby

raise exception on invalid format

remove implementation specific tests and extract and put logger related test in pending

missing bits for having all core timestamp specs pass

run all core specs

remove leftover

comment regex

missing encoding header

revert to logstash-core-event by default

finished proper gemification

useless require

dynamically pick specs depending on logstash-core-event-* implementation

logstash root package version

missing file for proper gemification

do not build java event by default

always check for root logstash lib dir

fix concurrent-ruby version confict

fix rebase conflict

re-enable specs

user vars instead of constants

move non core code in bootstrap

document version files

move version file

remove useless code

use version in logstash-core

fix gem files list

put back concurrent-ruby version constrain as in master

add dependency on logstash-core-event

remove dependency on logstash-core to avoid circular dependency

fix rebase conflict

remove circular dependency

fix specs

update README
2015-11-16 17:16:10 -05:00
Tal Levy
e8880d06bf refactor to gradle project, relates to #4191
more event java updates

- updated metadata
- moved #append to java
- other small test fixes

commit gradle wrapper jar
2015-11-16 17:14:23 -05:00
Colin Surprenant
ca191e642f more Event java impl, relates to #4191
event clone

append in Ruby

tag & append

add timestamp assignment spec

comment out original classes

fix at signature

implemented del

remove from array

del test
2015-11-16 17:14:09 -05:00
Pier-Hugues Pellerin
6b3ea96704 more sprintf java impl, relates to #4191
First the case with single fieldref

Add support for +%s => epoch

Small comments concerning the caching mechanism and the memory usage

Make the #sprintf method work with Array and Hash
2015-11-16 17:13:55 -05:00
Colin Surprenant
2ce84bbb1b Timestamp.java reformatting, relates to #4191 2015-11-16 17:13:41 -05:00
Pier-Hugues Pellerin
540785c346 Native java implementation of Event#sprintf, relates to #4191
This implementation is different from the master version since instead
of doing JIT Template compilation on every events we create a data
structure of a compiled templates. This template is cached in a
concurrent hashmap and used on other requests.

fixing conflict
2015-11-16 17:13:24 -05:00
Colin Surprenant
43a5011bf9 logstash-core-event-java initial impl, relates to #4191
wip initial Accessors, Event, EventImpl, Path, Timestamp and PathTest

wip

wip

FieldReference and Accessors implementation

rename targetCache to lut and set it protected

initial Accessors tests

todo comment

more tests

Timestamp implementation

Timestamp tests

fix method name

add Long constructor

event initialization, timestamp handling and json serialization

add <> type information

custom json serializer for Timestamp

remove toJson test

initial Event test

more tests

comments

debug traces

initial jruby Event wrapper and specs

added PathCache

implemented includes

added clone

wrap all Event methods

Rakefile to build and jar

missing getters and implement overwrite

support Date conversion

proper cast and coercion

replace Ruby Event with Java Event

test for field reference setter type coercion

disable specs

timestap setter should also set in map, accept more timestamp types

pre cache timestamp and expose isTimestamp

constructor from DateTime

expose proper Ruby Timestamp object

Ruby Timestamp basic specs

also load JRuby Timestamp

transpose Java<->Ruby Timestamp

fix timestamp specs

new jar

cleanup object construction
2015-11-16 17:13:04 -05:00
Suyog Rao
cb9b59b49a Add CLI documentation for #3243
We added new --debug option in #3243, adding it to CLI flags

Fixes #4199
2015-11-16 18:31:07 +00:00
Suyog Rao
8a018cd997 Add jdbc input to default package list
JDBC input is a popular plugin and has been stable over the last
few releases.

Fixes #4198
2015-11-16 18:02:55 +00:00
Pere Urbon-Bayes
afef5e74bb add artistic 2.x license to the list of accepted licenses
Fixes #4196
2015-11-16 17:53:33 +01:00
Jordan Sissel
ebb5ed71cc Remove old 1.5.x repo migration notes
Fixes #4179
2015-11-11 18:12:10 -08:00
Pier-Hugues Pellerin
2e2b96f867 Fix tins to 1.6
The 1.6 releases is the latest release to support ruby 1.9
Fixes: #4163

Fixes #4164
2015-11-11 20:03:52 +00:00
Pier-Hugues Pellerin
b65dfc149a Strict dependency on concurrent-ruby 0.9.2
Fixes #4174
2015-11-11 19:58:39 +00:00
guyboertje
a9792510a5 set jrjackson to v0.3.7
Fixes #4158
2015-11-11 10:52:55 +00:00
Clinton Gormley
c613b07e43 Docs: Updated Elasticsearch upgrading docs to new URL 2015-11-08 13:16:26 +01:00
Gabriel Moskovicz
abd97aa98b Add powershell script for windows testing
- Release acceptance test, which tests ports and run Logstash.
- Default plugins, which runs the same plugin installation and
environment for windows
- Simple integration, which integrates Logstash with Elasticsearch and a
simple configuration

Fixes #3994
2015-11-06 10:29:57 -08:00
Suyog Rao
747dead48f Docs:Fix formatting issues, and add number workers
Fixes #4149
2015-11-05 23:20:56 +00:00
Colin Surprenant
af245b9ed2 add specs for Retryable module
Fixes #4093
2015-11-05 21:05:53 +00:00
Suyog Rao
39cf706d70 Add advisory on dot fields and template changes
Fixes #4143
2015-11-05 21:00:10 +00:00
Pier-Hugues Pellerin
972e13d52e Since concurrent-ruby 0.9.2 this patch isnt necessary.
The team behind concurrent ruby will now support JDK 7 in the 1.x
release

Fixes #4141

Fixes #4146
2015-11-05 14:44:25 +00:00
Aaron Mildenstein
e60f4d67bd Rotate .err and .stdout files too
As suggested in #1574, rotate the logstash.err and logstash.stdout
files also.

Fixes #4136
2015-11-04 17:29:02 +00:00
Aaron Mildenstein
65a5996187 Fix logrotate file perms for Debian systems
In some cases it seems that the file permissions for the logrotate
configuration file are not set properly. This should address those
cases.

Fixes #4136
2015-11-04 17:29:02 +00:00
Aaron Mildenstein
eec80944f9 Fix logrotate permissions after install
In some cases it seems that the file permissions for the logrotate
configuration file are not set properly.  This should address those
cases.

fixes #3490

Fixes #4135
2015-11-04 17:28:33 +00:00