Commit graph

7009 commits

Author SHA1 Message Date
Suyog Rao
a1c7bbf06b Bump version to 2.2.0.snapshot2
Bump version, update gem and lock file to point to RubyGems.org
in preperation for 2.2.0 release
2016-01-08 18:13:22 -08:00
Suyog Rao
445cbc7abb Add rake tasks to create uber packages
Add rake tasks to create zip and tar.gz for LS package with all plugins
installed from losgtash-repo

Fixes #4435
2016-01-08 23:08:22 +00:00
Suyog Rao
7e78e9d0ae Pin jruby-openssl to latest released version
Fixes #4437

Fixes #4438
2016-01-08 22:17:44 +00:00
Joao Duarte
902e127d71 rename pipeline-worker settings to symbols
Fixes #4430
2016-01-07 18:58:40 +00:00
Andrew Cholakian
79089312bb Code cleanup per PR review in OutputDelegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
cddf53e9f2 Link to jruby issue in OutputDelegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
379dfd80d3 Remove unnecessary logger line used for debugging in outputdelegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
0770d02e05 Cleanup code around warnings around outputs with no workers allowed
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
d93b4d60f2 Add debug log for determining the number of output workers for output delegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
b7979ebf6f Fix jruby 1.7.x bug around define_singleton_method.
We were getting some bizzare
errors (https://github.com/elastic/logstash/pull/4391#issuecomment-169477728)
on the file output with the new OutputDelegator changes. By switching
away from method(:mymethod) to blocks with define_singleton_method they
went away.

This bug is only present with Jruby 1.7.x (tested with 1.7.22 and
1.7.23). Jruby 9.x is fine.

Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
3f7c6ba538 Update how to create an output plugin docs to include information on LS > 2.2 API changes
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
00c74d84e1 Improve OutputDelegator implementation and specs.
Backwards compatibility is now implemented for existing workers_not_supported uses.

This clears up a few bugs in the initial pass as well.

Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
67d0a8e4ef Improved semantics for OutputDelegator This commit greatly improves the semantics for the OutputDelegator. It now: * Has an API for declaring if an output is threadsafe to avoid instance creation * By default sets the number of workers for an output to be == the number of pipeline workers * Moves the worker safe API to the class, not instance level * Strongly enforces the worker safety API * Should provide better performance for threadsafe plugins
Fixes #4391
2016-01-07 17:19:10 +00:00
Pier-Hugues Pellerin
27e675ce7a Replace def #{type}_func with define_singleton_method
When you run multiples pipeline and the config code get evaluated, on
every evaluation the class cached is clear, everytime you were calling a
`func` method you had the latest evaluated code. The `filter_func` and
the `output_func` need to be unique for every instance of the pipeline,
this PR replace the `def` with a `define_single_method` call ensuring
the uniqueness of the code on every instance.

This PR is based on #4254

Fixes #4298
2016-01-06 20:11:21 +00:00
Pier-Hugues Pellerin
5cb96d3971 Remove sized_queue.rb
Since Logstash 2.2, we now use Java SynchronousQueue instead of ruby
sizequeue

Fixes #4422
2016-01-06 19:22:50 +00:00
Joao Duarte
b887705acd rename ShutdownController to ShutdownWatcher
slightly adjust the metaphor for the class that is responsible for
monitoring a pipeline's shutdown process, report on its status and
intervene if it's stalled
2016-01-05 17:41:05 +00:00
Andrew Cholakian
372e5e62df Up default # of pipeline workers to 100% of cores
This is predicated on the fact that with the ng_pipeline it is expected that workers
will spend a significant amount of time in iowait due to outputs like the Elasticsearch
output. In benchmarks based on real-world Apache log files the best performance came out
of scenarios where pipeline_workers > num_cpu_cores. Setting this to default to the # of
cores is a defensive decision that should handle cases where users have particularly IO
heavy inputs.

For most users we should recommend setting the number of workers to be as high as possible
until performance decreases.

Previous benchmark information:
https://github.com/elastic/logstash/pull/4340

Fixes #4414
2016-01-05 17:01:23 +00:00
Pier-Hugues Pellerin
1d8b88a706 Add a WrappedSynchronousQueue#offer method
Expose the Java's `#offer` method of the `SynchronousQueue` class,
This method allow the input developper to correctly apply back pressure
to the network clients.

If you use `#push` it will block forever until the pipeline free some
space, this behavior is sufficient if the pipeline outputs are healthy.
But if the output stale the backpressure will be applied up to the input
(producers) when reading a file this scenario is fine since we will just
stop reading the file until the thread unblock again.

In the context of network clients, the story is a bit different the
clients will timeout and try to reconnect to restransmit their payload
creating multiple new connection thread block on the queue. In some case
this will lead into a OOM issues.

This PR is the first step to communicate that the queue is under
pressure.

Fixes #4408
2016-01-05 14:33:28 +00:00
Andrew Cholakian
25e8f626d1 Edit docs for life of an event to cover the ng pipeline
Fixes #4392
2016-01-04 21:32:34 +00:00
Andrew Cholakian
4dcdc0eef7 Warn on potential memory issues when a large number of inflight messages are present
Fixes #4410
2016-01-04 19:14:14 +00:00
Suyog Rao
50c97b7770 Add new CLI options for next gen pipeline
Fixes #4413
2016-01-04 19:11:01 +00:00
ReadmeCritic
fd4792bec6 Update README URLs based on HTTP redirects
Fixes #4200
2016-01-04 18:44:20 +00:00
Ryan MacLean
1bbb47f616 Update README.md
Committing again after rebase. One small typo.

Fixes #4405
2016-01-04 18:40:49 +00:00
AQNOUCH Mohammed
ea4a48a1ed Updated copyright to 2016
Fixes #4411
2016-01-04 18:37:56 +00:00
Andrew Cholakian
4d1b6bf91f Add http poller to default plugins list
Fixes #4409
2016-01-03 23:06:44 +00:00
Ryan MacLean
5948b5ed8a Update README.md
Fixes #4402
2015-12-28 19:26:29 +00:00
Suyog Rao
17b0a9d565 Update Gemfile and .lock file for 2.2.0 branch 2015-12-23 22:13:37 +05:30
Suyog Rao
642b87bc37 First pass at creating 2.2 branch 2015-12-23 22:13:37 +05:30
Colin Surprenant
c5905119a4 fix to support legacy plugins specs monkeypatching pipelines 2015-12-21 17:10:14 -05:00
Suyog Rao
d2d0bd765c Cleanup docs directory
Remove old, unused markdown docs
Bring dir structure to mirror logstash-docs repo
2015-12-21 09:03:54 +05:30
Paul Echeverri
0084c00b38 Adds Maintainer's Guide section. 2015-12-21 09:02:07 +05:30
Andrew Cholakian
8de54e46ce NG Pipeline
Fixes #4363
2015-12-16 20:03:05 +00:00
Paul Echeverri
c95947d32a Fixes incorrect config example
Fixes #4359
2015-12-16 00:30:01 +00:00
Colin Surprenant
56bb12d85c using symbols in Event data does not make sense 2015-12-15 17:41:40 -05:00
Colin Surprenant
72637f5bc3 proper java to ruby conversions and specs
proper java to ruby convertion and specs

missing ruby conversions

add missing timestamp= method

added usec method

missing constants

added usec, tv_usec, year methods

clean ruby_to_hash_with_metadata method

rework boolean cast

add BigDecimal

missing import

reworked Ruby to JAva type conversion

better nil objects handling and better debug trace
2015-12-15 16:41:29 -05:00
Robert Neumayer
a43709e8fb Fix configtest in sysv init script
Replace non-existing log function with echo.
Replace "exit 1" with "return 1" to make quiet function work.

Fixes #4321
2015-12-15 02:32:19 +00:00
Vincent Bernat
f68bde191d pkg: ensure dev/beta/rc are ordered before a regular version
```ruby
class DpkgVersion
  include Comparable
  attr :version
  def <=>(anOther)
    return -1 if system("dpkg --compare-versions #{version} lt #{anOther.version}")
    return 1 if system("dpkg --compare-versions #{version} gt #{anOther.version}")
    return 0
  end
  def initialize(version)
    @version = version
  end
  def to_s
    @version
  end
end

versions="1.5.1 1.5.0 1.5.0.rc3 1.5.0.beta2 1.5.0.alpha3".split
versions=versions.map { |x| DpkgVersion.new(x.gsub(/\.([[:alpha:]])/, '~\1')) }
versions=versions.sort
puts versions
```

This outputs:

```
1.5.0~alpha3
1.5.0~beta2
1.5.0~rc3
1.5.0
1.5.1
```

Fixes #2461
2015-12-11 20:17:33 +00:00
Colin Surprenant
a30b5a6943 fix missing methods in Java Timestamp
add utc and gmtime, force UTC in setTime

add missing specs for utc and gmtime

add missing to_f

add missing specs for to_f and to_i
2015-12-10 17:29:05 -05:00
Colin Surprenant
2c61e310e3 fix nil value field reference assignment in Java Event
fix fieldref nil value assignment

add fieldref nil value assignment spec

better spec description and better expectation
2015-12-10 17:08:39 -05:00
Colin Surprenant
48587abe5c use sprintf un toString
Fixes #4325
2015-12-10 16:48:35 -05:00
Colin Surprenant
0882b3060d cleanup logger reset in after(:each) 2015-12-10 16:44:32 -05:00
Colin Surprenant
b855d7b300 explicit imports 2015-12-10 16:44:24 -05:00
Colin Surprenant
c5a70b4572 expose DEFAULT_LOGGER and remove nil/null support 2015-12-10 16:44:17 -05:00
Colin Surprenant
0fdb68c002 DRY and added comments 2015-12-10 16:44:02 -05:00
Colin Surprenant
d00c005581 add comments 2015-12-10 16:43:54 -05:00
Colin Surprenant
e013014c40 typo 2015-12-10 16:43:47 -05:00
Colin Surprenant
27d3c2b25a support injectable Ruby logger in Java event and related specs 2015-12-10 16:43:38 -05:00
Colin Surprenant
94d5049388 replace LOGGER constant with injectable logger object 2015-12-10 16:43:24 -05:00
Colin Surprenant
9bd488f387 support clear_cache and cache_size methods in StringInterpolation, adjust specs
Fixes #4325
2015-12-10 16:43:17 -05:00
Aaron Mildenstein
e4ab2865ef Allow Logstash to be launched from a symlink
These changes allow Logstash to be launched from a symlink _only_ when the `readlink`, or suitable version of `stat` binaries are present. An error message will result if Logstash is launched from a symlink and the path cannot be discovered by one of these two methods.  The message will advise the user to use the full path instead of a symlink to launch Logstash.

fixes #4291
2015-12-04 15:27:29 -08:00