Commit graph

7892 commits

Author SHA1 Message Date
Suyog Rao
397f005766 Add Logstash configs for filebeat modules (#6791)
* Add Logstash configs for filebeat modules

Hand transpiled Logstash configs for FB modules to be included in
the docs for 5.3.

See FB modules for more details: https://github.com/elastic/beats/tree/master/filebeat/module

* Fix newlines

* Remove multiline, fix bugs
2017-04-07 14:22:55 -07: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
Wainer dos Santos Moschetta
d8f764e3c3 Quote shell script variables handling paths.
Some variables that hold path in Linux shell scripts
are not properly quoted, thus undefined behaviors may
show up (e.g. a link path with space).

This change enclose variables with quotes in bin/logstash,
bin/logstash.lib.sh and, bin/system-install scripts.

Fixes #6596

Fixes #6877
2017-04-04 15:00:48 -04:00
Christopher Fujii
fddbb2f0df Update glob-support.asciidoc
Fixed typo

Fixes #6876
2017-04-04 13:48:15 -04: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
Pier-Hugues Pellerin
058cfc9312 Allow Logstash to accept a PROXY configuration
Logstash's plugin manager will now follow proxy configuration from the environment.
If you configure `http_proxy` and `https_proxy`, the manager will now use theses information for all the ruby http
connection and will also pass that information down to maven.

Fixes: #6619, #6528

Fixes #6825
2017-03-31 14:20:39 -04:00
Wainer dos Santos Moschetta
368828a752 Rakefile: update help with test tasks.
Updated the help message of Rakefile to list the
test:install-core and test:core tasks.

Fixes #6863
2017-03-31 14:01:29 -04:00
manni19682
df48ad7e72 Search java executable in %PATH%
Fixes #6860
2017-03-31 14:00:41 -04:00
Pier-Hugues Pellerin
2e05338554 Make sure prepare_offline_pack command only accept a filename
This PR changes the behavior of the command when you were specify a directory
instead of a filename, if the directory exists it would have deleted the
directory and the files in it.

The new flow and validation is now safer, if you specify a directory
Logstash will tell you to specify a complete filename.

If the ZIP extension is missing, the command line will ask you to make
sure you target a right filename.

If the output file already exist it will *not* delete it but instead
will return a warning message, you can force a delete by using the
`--overwrite` option.

Fixes: #6862

Fixes #6861
2017-03-31 11:05:17 -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
7a3226e9f2 Do not try to reach the artifact server when no plugins is given
This PR fix an annoyance when running the `bin/logstash-plugin install
--no-verify` without any plugins, the command was making an unnecessary
call to the artifacts web server.

Fixes #6826
2017-03-26 20:44:07 -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
Pier-Hugues Pellerin
a552214fa1 Wrong expectation in the suite
Fixes #6840
2017-03-24 14:07:58 -04:00
Pier-Hugues Pellerin
5ba9d77457 Downloading gem in binary format
This PR chagne the File's open mode to make sure we correctly download
the file in binary mode on windows, without doing that the gem will be
corrupt and will throw the following message.

```
ERROR:  While executing gem ... (Gem::Package::FormatError)
    package is corrupt, exception while verifying: Unexpected end of ZLIB input stream (Zlib::GzipFile::Error) in logstash-filter-dissect-1.0.8.gem
```

Fixes #6840
2017-03-24 14:07:57 -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
DeDe Morton
469f451e99 Clarify how cli options affect settings file
Fixes #6784
2017-03-02 20:30:00 -05:00
DeDe Morton
6f6af5eaeb Make location of bin/logstash more obvious and fix TOC org
Fixes #6784
2017-03-02 20:30:00 -05:00
Pier-Hugues Pellerin
239123f68a Make the TODO ignore the presence of :
Fixes #6777
2017-03-02 20:21:16 -05:00
Pier-Hugues Pellerin
f2626dfd6d Fix an issue with handling the plugin type with new style declaration
Correctly extract the plugin type when the plugin is defined with

```
module LogStash module Inputs class XXX < ...
```

Fixes #6777
2017-03-02 20:21:16 -05:00
DeDe Morton
ba14d4ab76 Rename Event Dependent Configuration chapter
Fixes #6767
2017-03-02 19:31:50 -05:00
DeDe Morton
75f33b53c0 Add info about shutting down Logstash
Fixes #6771
2017-03-02 18:45:31 -05: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
DeDe Morton
99b1bc3e5e Merge pull request #6793 from dedemorton/cherrypick_6775_5.x
Add conditional coding for install instructions (cherrypicks 6775)
2017-03-02 10:39:54 -08:00
DeDe Morton
ab1bfecbb0 Add conditional coding for install instructions 2017-03-02 10:30:24 -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
DeDe Morton
77912b49d5 Add fixes from review
Fixes #6761
2017-03-02 12:55:46 -05:00
DeDe Morton
737502da39 Add at least once delivery to persistent queue docs
Fixes #6761
2017-03-02 12:55:46 -05: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
Colin Surprenant
154ce65c3a add queue drain option support
wip queue drain option

metrics on empty batches

reenabled spec

cosmetic fixes

stats collection, mutex, specs, empty batch handling

start_metrics
2017-03-01 14:14:36 -05:00
Krishna Kalubandi
4bd0ea99a0 Update setting-up-logstash.asciidoc
Fixed typo

Fixes #6763
2017-02-28 16:29:08 -05:00
DeDe Morton
e7e74d71b6 Fix URL
Fixes #6768
2017-02-28 15:31:05 -05:00
DeDe Morton
daced46527 Fix typo
Fixes #6769
2017-02-28 15:26:25 -05:00
Tal Levy
0a25eb8f46 unify gradle projects
Fixes #6725
2017-02-27 17:29:21 -05:00
Joao Duarte
c5b7cbeacc introduce locking in path.data
Fixes #6738
2017-02-24 05:27:10 -05:00
Aaron Mildenstein
63bfcca7c6 Add note about JAVA_HOME to docs
Based on a suggestion to update the documentation: https://discuss.elastic.co/t/logstash-not-seeing-conf-files-in-conf-d-dir/75931/9

Fixes #6751
2017-02-23 16:41:02 -05:00
Colin Surprenant
8c000445c2 namespace memory checkpoints for multiple queues support
memory checkpoint IO need the purge() method
2017-02-22 10:59:31 -05:00
Suyog Rao
8a8f04ab1d Add tests for deep nested env variables 2017-02-21 14:16:24 -08:00