Commit graph

430 commits

Author SHA1 Message Date
Suyog Rao
17472eeac5 bump version to 5.4.3 (#7513) 2017-06-21 17:07:21 -07:00
Suyog Rao
76c4926f4d Add missing file 2017-06-14 17:26:42 -07:00
Armin Braun
5ed38319b6 #7449 fix missing require of environment_variables.rb in mixin.rb (#7454) 2017-06-14 17:24:09 -07:00
Armin
753c798ee2 #6696 validate evaluation result
Fixes #7411
2017-06-13 10:17:19 -07:00
Armin
047291db69 #7382 Signal Queue not empty condition on every append as is standard BlockingQueue behaviour
Fixes #7380
2017-06-08 21:34:10 +02:00
Andrew Cholakian
a8790d8f19 Bump concurrent gem dep to allow for more recent version
The old version (1.0.0) had a broken version of Concurrent::Timer that
did not work on all machines for reasons that are still unclear, but may
be related to the Java version

Fixes #7368

Fixes #7373
2017-06-08 01:08:08 +00:00
Suyog Rao
a10326198f bump version to 5.4.2 (#7285) 2017-06-01 15:31:36 -07:00
Andrew Cholakian
12b1ddbebf Make test for pipeline flushing more resilient.
Instead of depending on the now deprecated multiline filter we use a
dummy filter that just emits events. This simplifies the test and
dramatically reduces timing issues.

I also increased the max-wait for the timer just in case

Fixes #7024

Fixes #7131
2017-05-22 20:12:34 +00:00
Rob Bavey
3b4b9042ca Fix NoMethodError when Stack Trace is empty
Adds :traces to hash even if traces are empty.

Fixes #7174

Fixes #7175
2017-05-22 13:02:17 +00:00
Joao Duarte
8f2e25904f backport agent_spec fixes to 5.x
Fixes #7146
2017-05-18 15:13:07 +00:00
Pier-Hugues Pellerin
34f486d6d8 consistency in naming
Fixes #7103
2017-05-16 14:20:34 +00:00
Pier-Hugues Pellerin
8707953d2c Make the test for the write WrappedWriteClient more robust
Instead of using sleep we start two threads and we join them to do the
expectation.

Fixes: #7031 #7032

Fixes #7103
2017-05-16 14:20:34 +00:00
Jordan Sissel
754773b328 Skip a flakey test failing since November 2016
The failure:

    Failures:

      1) LogStash::Pipeline defaulting the pipeline workers based on thread safety when there are threadsafe filters only starts multiple filter threads
         Failure/Error: expect(pipeline.worker_threads.size).to eq(worker_thread_count)

           expected: 5
                got: 8

Related issues: #6855, #6245, #6355

Fixes #7071
2017-05-11 09:45:19 +00:00
Suyog Rao
333dee60c6 bump to 5.4.1 (#7034) 2017-05-04 20:09:17 -07:00
TAC
f7c0839826 Fix missing log4j2.properties file on Windows
fix Issue #6352

On Windows, Logstash can't find log4j2.properties file with above message at startup.
```
Could not find log4j2 configuration at path /LS_HOME/config/log4j2.properties.
```

Fixes #6903
2017-05-03 19:30:42 +00:00
Colin Surprenant
f34cf4a1bc rephrase pipeline creation error message, fixes #6968 2017-04-26 10:16:00 -05:00
Pier-Hugues Pellerin
05d01cf20c Update the conditions to match the behavior of runner
Fixes #6943
2017-04-24 17:01:56 +00:00
Pier-Hugues Pellerin
8e099d49bd testing logic
Fixes #6943
2017-04-24 17:01:56 +00:00
Pier-Hugues Pellerin
111c95c254 Allow Finite pipeline to shutdown internal pipelines
With the creation of the x-pack we have added our first internal
pipeline, but if you were running the monitoring pipeline with a
finite pipeline (LIKE generator count => X) when the finite has
completed processing all the events logstash would refuse to stop.

This PR fixes the problem by adding a new pipeline settings called
system in the shutdown loop we will check if all the user defined
pipeline are completed if its the case we will shutdown any internal
pipeline and logtash will stop gracefully.

Fixes #6943
2017-04-24 17:01:56 +00:00
Colin Surprenant
02d46525a7 move ackedqueue specific classes into ackedqueue package, fixes #6944 2017-04-21 15:06:40 -06:00
Colin Surprenant
c29d00c034 add acked_queue concurrent stress spec, fixes #6930
introduce rake test:core-fast and rake test:core-slow

remove custom rspec config
2017-04-21 14:42:56 -06:00
Joao Duarte
874a31e5ce add config_name to input plugin metrics
Fixes #6933
2017-04-20 08:22:50 +00:00
Wainer dos Santos Moschetta
009a8bd571 Queue: fix unlock mutex on close()
On o.l.ackedqueue.Queue.close() method the
lock.unlock() call might not execute, leaving
a mutex locked.

This change ensure that lock.unlock() is always
execute by moving its call to the sibling
try/catch's finally block.
2017-04-19 16:44:09 -06:00
Pier-Hugues Pellerin
42166f3d52 Make the load_average linux more robust by allow to inject the content of the load_average file
Fixes: #6867

Fixes #6886
2017-04-19 19:45:29 +00:00
Colin Surprenant
4edf17c378 fix PQ write concurrency issues and ligering files
`
move nextSeqNum call under mutex lock to prevent seqNum race condition

fully acked head page beading should not create new tail page

explicit purge required to clean physical files

correctly remove preserved checkpoints

small review changes
2017-04-13 14:40:47 -06:00
Pier-Hugues Pellerin
a159ac2db4 Replace the internal list of listeners with a set
Because we sync listeners with emitters when adding or creating hook
this could lead to duplicates of listeners, this PR fixes the problem by using a set
instead of a list. Making sure we can only have one instance of a specific
listener at any time.

Fixes #6916
2017-04-13 20:09:45 +00:00
Joao Duarte
cf0f2ebcda pass namespaced metric to output plugin instance 2017-04-10 17:36:40 +01:00
Pier-Hugues Pellerin
3986667f96 Missing require 'execution_context' in the backport
Missing require in 2dd135a162

Fixes #6897
2017-04-10 15:34:58 +00:00
Wainer dos Santos Moschetta
cd85729197 Fix org.logstash.Accessors NumberFormatException.
In org.logstash.Accessors a reference Id is converted from String
to integer, but it's not checked for NumberFormatException. As a
consequence logstash throws the exception away.

This change Accessors' methods to handle NumberFormatException
exceptions by returning null or false accordingly.

Fixes #6522

Fixes #6883
2017-04-07 21:23:38 +00:00
Tal Levy
86f5070a27 handle specified dlq-dir with no segments
Before, the DeadLetterQueueReadManager would throw an exception
when it attempted to choose to read a segment from its segments
list and that list was empty. This fixes that.

Fixes #6880
2017-04-07 21:10:34 +00:00
Pier-Hugues Pellerin
2dd135a162
ExecutionContext for the plugins
This PR add the initial building block to pass some `ExecutionContext`
from the pipeline to the plugin, currently we only pass the `pipeline_id`.

We use the accessor `execution_context=` to set the context, in a future
refactor we will pass the object to the constructor.

Fixes #6890
2017-04-07 13:13:35 -04:00
Tal Levy
044ecce895 rename Concurent class to Concurrent.java
Fixes #6878
2017-04-04 19:16:11 -04:00
Josh Soref
df57e410cc Spelling fixes (#6806)
Spelling fixes across the board.
2017-04-04 12:07:16 -07:00
Andrew Cholakian
80b8086ad8 Input#clone should also clone that input's codec
Some codecs are context-specific and not threadsafe. If, for instance,
you want to use `generator { threads => 3 }` you will run into buggy
behavior with the line and multiline codecs which are not threadsafe.

This patch is a quick workaround for this behavior. This does not fix
this issue for inputs that do their own multithreading. Those inputs
should handle codec cloning / lifecycle internally according to their
specific requirements.

Fixes #6865
2017-03-31 17:26:05 -04:00
Tal Levy
af8d7f7616 further recordio cleanups
Fixes #6852
2017-03-30 17:23:29 -04:00
Tal Levy
fdab7e41b8 updates
Fixes #6817
2017-03-28 20:17:42 -04:00
Tal Levy
06655739c3 Add support for Dead Letter Queue RecordIO library
Fixes #6817
2017-03-28 20:17:42 -04:00
DeDe Morton
347be1d381 Fix typo
Fixes #6845
2017-03-27 14:27:22 -04:00
Pier-Hugues Pellerin
cf57bcb99e Adding tests for the heap calculation, also changed the visibility
In retrospect, it just easier to expose the methods in the jvm spec
monitoring to be able to test them in isolation.

Fixes #6827
2017-03-26 20:43:13 -04:00
Pier-Hugues Pellerin
68151c894a Fix the heap collecting values
This PR fixes an issue where the max heap size was reported as the double of
the actual value because it was merging the values of the usage.max and
peak.max into a single value.

Fixes: #6608

Fixes #6827
2017-03-26 20:43:13 -04:00
Andrew Cholakian
a7bf577bfe Move input metrics to be nested under 'events' for consistency
Filters/outputs nest their 'out' metric under 'events'.
Inputs should not be different.

Fixes #6835
2017-03-23 19:32:58 -04:00
Colin Surprenant
6ac0b6a848 single element write can only really wakeup a single thread
Fixes #6800
2017-03-20 11:44:12 -04:00
Colin Surprenant
32777c682b signal notfull on page purge
Fixes #6800
2017-03-20 11:44:12 -04:00
Pier-Hugues Pellerin
584a3860a0 Implements #has_metric?(*path)
Add a new method that uses the `fast_lookup` has to find if a specific
metric exist instead of relying on exceptions.

Usage:

```ruby
metric_store.has_metric?(:node, :sashimi, :pipelines, :pipeline01, :plugins, :"logstash-output-elasticsearch", :event_in) # true
metric_store.has_metric?(:node, :sashimi, :pipelines, :pipeline01, :plugins, :"logstash-output-elasticsearch", :do_not_exist) # false
```
Fixes: #6533

Fixes #6759
2017-03-14 20:32:01 -04:00
Tal Levy
aa391a0e27 small code changes to reduce warnings
Fixes #6795
2017-03-02 16:38:21 -05:00
Pier-Hugues Pellerin
2fedad3c7d Record the events.in related statistic in the right place
This PR changes where the `events.in` are calculated, previously the
values were calculated in the `ReadClient` which was fine before the
addition of the PQ, but this make the stats not accurate when the PQ was
enabled and the producer are a lot faster than the consumer.

These commits change the collection of the metric inside an
instrumented `WriteClient` so both implementation of the client queues will use
the same code.

This also make possible to record `events.out` for every inputs and the
time waiting to push to the queue.

The API is now exposing theses values for each plugins, the events level
and and the pipeline.

Using a pipeline with a sleep filter and PQ we will see this kind of
response from the API.

```json
{
  "duration_in_millis": 438624,
  "in": 3011436,
  "filtered": 2189,
  "out": 2189,
  "queue_push_duration_in_millis": 49845
}
```

Fixes: #6512

Fixes #6532
2017-03-02 16:31:50 -05:00
Joao Duarte
d2d7a93b78 fix logic of logging configs
Fixes #6789
2017-03-02 15:01:09 -05:00
Tal Levy
1643cfefaf remove old legacy logstash-core-event (#6783)
and migrate spec tests to core
Conflicts:
	logstash-core-event/lib/logstash-core-event/version.rb
	versions.yml
2017-03-02 10:56:43 -08:00
Tal Levy
1a02498e93 migrate core-queue-jruby into logstash-core (#6782)
Conflicts:
	logstash-core-queue-jruby/lib/logstash-core-queue-jruby/version.rb
	versions.yml
2017-03-02 10:13:31 -08:00
Tal Levy
7c75b59814 migrate logstash-core-event-java to logstash-core (#6760)
Conflicts:
	logstash-core-event-java/lib/logstash-core-event-java/version.rb
	versions.yml
2017-03-01 15:37:41 -08:00