Commit graph

8588 commits

Author SHA1 Message Date
DeDe Morton
7511fad601 Fix image references
Fixes #8061
2017-08-23 20:43:10 +00:00
Jake Landis
9b961c46d7 Metrics: Add custom witness for plugins, and code clean up
Remove LongGauge and DoubleGauge and Replace with NumberGauge
 - This is an unecessary distiction for Gauges and can complicate the serialization. Double/Float should serialize with decimal precision, and Jackson handles this by default.

Add custom witness to match existing Ruby API, such that existing Ruby plugins should not need changes

Remove namespace from LazyDelegatingGauge
 - It was only there for logging, but newer versions (not here) will completely remove the concept of namespace.

Part of #7788

Fixes #8053
2017-08-23 17:09:01 +00:00
DeDe Morton
c317fee147 Remove table formatting to fix build issues
Fixes #8050

Fixes #8052
2017-08-22 20:11:02 +00:00
Jake Landis
17c9d668cd Metrics: More consistent serialization, Witness support for DLQ, PQ, and Java clean up
* Additional consistent serialization (don't check for null value, continuation of https://github.com/elastic/logstash/pull/8009 / 5d83a71aa4)
* Add support for Dead Letter Queue
* Add support for persitent Queue
* Scope clean up

Part of #7788

Fixes #8023
2017-08-22 15:52:25 +00:00
Rob Bavey
f08a628b5c Moved test from RecordIOWriterTest to RecordIOReaderTest
Moved testReadWhileWriteAcrossBoundary to RecordIOReader as it verifies a fix in the
 RecordIOReader class

Fixes #8024
2017-08-18 19:15:05 +00:00
Rob Bavey
9f64fccef9 DLQ: Fix reading while writing boundary issues
Fixes an issue where if the DLQ is actively being read and written to, the consumeBlock method would
write data to the position where the data was last read from, rather than written to, leading to
plugin crashes.

Fixes #8024
2017-08-18 19:15:04 +00:00
Jake Landis
5b71afcdb9 Metrics: Consistent serialization
This change allows for the serialized output of the metrics to be consistent w/r/t the un-initialized values. Note - the code presented here is not the current code in use, rather it is the code staged, but unused to replace the metrics store / namespace implementation.

Fixes #7885 (for a future release)

Fixes #8009
2017-08-17 23:35:50 +00:00
Armin
35a5a0f08b MINOR: Upgrade to Gradle 4.1
Fixes #8014
2017-08-17 17:17:02 +00:00
Armin
62cbb0613e Performance: Remove BooleanBiValue
Fixes #8015
2017-08-17 17:04:41 +00:00
Armin
1066d61dae #8016 remove Max bucket setting from specs to bring them in line with #8010
Fixes #8017
2017-08-17 15:07:15 +00:00
Suyog Rao
4dc530ddbb Remove metrics max bucket setting
PR #7451 introduced a way to set metrics max bucket settign in Kibana. This ain't good because
it can destabilize Kibana and ES as well

Fixes #8010
2017-08-16 23:17:53 +00:00
Jake Landis
94e5225674 Metrics: Add Jackson serialization to the Witness classes.
Part of #7788

Fixes #7984
2017-08-16 22:22:48 +00:00
Armin
89ade02bfe #7998 Serialization benchmark and Afterburner removal
Fixes #8002
2017-08-16 16:08:09 +00:00
Armin
577759bf5b MINOR: Cleanup dead IO code
Fixes #7953
2017-08-16 08:57:17 +00:00
Armin
691d3d01f3 BUG: Fix RubyTimestamp not being serialized correctly
Fixes #7996
2017-08-15 13:39:43 +00:00
Andrew Cholakian
35101f18ee Revert "create source_loader after logging setup"
This commit broke the plugin contract with plugins like xpack and caused many issues there. Reverted until it can be better handled.

This reverts commit 92cdbe2dbd.

Fixes #7995
2017-08-14 23:11:32 +00:00
Rob Bavey
2f332d9388 DeadLetterQueueReader should handle missing segment files at startup
Change DeadLetterQueueReader, so that if a missing segment file is
encountered at startup, the next valid entry will be used instead

Fixes #7433

Fixes #7457
2017-08-14 20:07:46 +00:00
Armin
8a9a1f28bf #7990 bring back batch acking for PQ
Fixes #7991
2017-08-14 17:35:12 +00:00
Jake Landis
858500c02d Metrics: Witness data model
The role of Witness is to provide an API record state of what is happening inside of Logstash, and provide means to serialize the data for consumption (not included in the commit). The Witness is implemented by chaining methods with a singleton root. For example:

Witness.instance().pipeline("main").inputs("foo").events().in(1)

Can be used to express that for the foo input in the main pipeline, 1 new event has been seen.

Witnesses may also have a snitch method, which allows the witness to snitch (tell others) the discrete values of the metrics. A snitch method is basically the getter. For example:

Witness.instance().pipeline("main").inputs("foo").events().snitch().in()

Tells you you how many events have been witnessed for the foo input in the main pipeline. In practice this the snitch is really only used for testing, but may be useful as just a standard set/get type operations. Serialization to JSON (not included in this commit) is the primary means to get data out of a Witness.

Some workflows require that a Witness forgets what it saw, for example during a pipeline reload. In these cases the Witness may completely or partially forget the data they have seen. This is implemented with a forget method. For example:

Witness.instance().pipeline("main").inputs("foo").events().forget().all();

Fixes #7947
2017-08-11 19:18:03 +00:00
Rob Bavey
b282a20ee4 Remove redundant null check from DeadLetterQueueReader
Fixes #7948
2017-08-11 18:36:12 +00:00
Rob Bavey
197f277138 Tidy up BufferState internal class
Fixes #7948
2017-08-11 18:36:12 +00:00
Rob Bavey
53e3cb3be5 DLQ: Multiple bug fixes related to event seeks
The fixes in this commit combine to fix #7855

Fixes 3 bugs:
  seekToNextEventPosition:
    handles the case where a null event is encountered during the search for a matching event
    handle restoration of buffer position when the next event consumed goes across block
     boundaries

  seekToStartOfEventInBlock:
    handles the case where the only event in a block is an 'end' event

Also:
 Adds new RecordIOReaderTest, and moves tests over from RecordIOWriterTest that seem to fit
that better

Fixes #7948
2017-08-11 18:36:12 +00:00
Joao Duarte
2226b9cd3c create source_loader after logging setup
Fixes #7970
2017-08-11 13:18:33 +00:00
Lisa Cawley
5121d72d9c [DOCS] Update link to Logstash security (#7979) 2017-08-10 16:30:34 -07:00
DeDe Morton
e5c9cb7334 Add fixes from review
Fixes #7966
2017-08-10 20:25:58 +00:00
DeDe Morton
ea5282dbd5 Add docs for pipeline viewer
Fixes #7966
2017-08-10 20:25:58 +00:00
Joao Duarte
f02f5968f5 prevent tests from changing config.debug flag
Fixes #7962
2017-08-10 08:13:31 +00:00
Aaron Mildenstein
f476e05d23 Add --setup phase for modules (#7965)
* Add --setup phase for modules

Without the `--setup` flag, the index template for elasticsearch, and the index-pattern, saved searches, visualizations, and dashboards for Kibana will not be published.

fixes #7959
2017-08-09 16:51:57 -06:00
Suyog Rao
0e0284dfad Add log statement about modules that are run
Fixes #7963
2017-08-09 21:48:12 +00:00
DeDe Morton
7f1cbb4110 Fix broken links
Fixes #7964
2017-08-09 20:28:19 +00:00
DeDe Morton
ea59e91155 Fix link
Fixes #7934
2017-08-09 18:03:56 +00:00
DeDe Morton
3b01cbf17e Add changes from technical review
Fixes #7934
2017-08-09 18:03:56 +00:00
DeDe Morton
c54bbd8ffc Add docs about pipeline management
Fixes #7934
2017-08-09 18:03:56 +00:00
DeDe Morton
9500a9dd30 Fix indentation in module example
Fixes #7961
2017-08-09 17:34:16 +00:00
Andrew Cholakian
042128914c Generate codec IDs randomly
Fixes #7930
2017-08-09 15:42:12 +00:00
Andrew Cholakian
d27f414c04 Use LIR to generate vertex plugin IDs
In this patch we unify the IDs reported by LIR with those generated using config_ast.rb

This is a temporary fix until LIR execution is built. It relies on the fact that currently both LIR and config_ast.rb only operate on a single concatenated string of configurations. In the future LIR will compile different files separately, then merge their IRs. For now, however, this solution will hold.

This change also exposes the :id attribute of FilterDelegator to bring it to parity with OutputDelegator and InputDelegator which is required for testing purposes.

Fixes #7930
2017-08-09 15:42:12 +00:00
Armin
f6aeea33ab Test Stability: Fix Global Ruby Runtime Setup
Fixes #7957
2017-08-09 15:26:30 +00:00
Joao Duarte
46d0366040 fix debug logging messages with thread values
Fixes #7954
2017-08-09 14:27:32 +00:00
Joao Duarte
044b356719 cleanup force shutdown code
Fixes #7955
2017-08-09 14:25:47 +00:00
Armin
d45b15a366 MINOR: Cleanup Event serialization and fix related compiler warnings
Fixes #7922
2017-08-09 11:20:11 +00:00
Joao Duarte
1b0158c2d5 force exit on double SIGINT
Fixes #7918
2017-08-09 08:29:37 +00:00
Joao Duarte
98240acab6 prevent force shutdown to be blocked by with_pipelines
if force shutdown uses `with_pipelines` then it will never acquire the
`@pipelines_lock` from `shutdown_pipelines` until it terminates.

This PR makes force shutdown use `@pipelines` directly, fixing it.

Fixes #7918
2017-08-09 08:29:37 +00:00
Armin
cbff08fd8b PERFORMANCE: Remove TimestampBiValue
Fixes #7937
2017-08-09 06:44:20 +00:00
Armin
c9b495d55f Revert "PERFORMANCE: Generate more optimal filter_func"
This reverts commit 99a21bc5c1.

Fixes #7943
2017-08-08 19:17:09 +00:00
Jake Landis
8c10355ecd Performance: remove volatile from hot code
Fixes #7935

Fixes #7942
2017-08-08 16:33:21 +00:00
Armin
07f9411345 MINOR: Save a few null checks in Valuefier
Fixes #7938
2017-08-08 16:27:53 +00:00
Armin
b4e9161fd0 MINOR: Remove useless test object
Fixes #7939
2017-08-08 16:04:09 +00:00
Armin
40b9134eb8 PERFORMANCE: Generate more optimal filter_func
Fixes #7924
2017-08-08 15:41:22 +00:00
Andrew Cholakian
3b1df13fae Shorten Vertex generated IDs
Currently generated Vertex IDs are unwieldy concatenations of two sha256 hashes. This is just a pain to deal with.

This patch hashes that concatenation instead, yielding something far easier to deal with.

Fixes #7931
2017-08-08 15:34:41 +00:00
Jake Landis
977dc84f3a Metrics: Clean up, remove and deprecate in support of pure Java based metrics.
This changes the following:
* DRY Gauge metrics
* Remove Namespace from metrics API (never used, not needed)
* Introduce a 'dirty' flag. This will be used to assist with serialization (in a later commit).
* Change getKey to getName in the API
* Deprecate (only from Java) the future non-supported Guage types.
* Remove NumericGauge and replace with LongGuage and DoubleGuage.
* Bring code coverage back to 100%

Note this change is internally non-passive, however the Java metrics API (recently introduced in 6.0) has not been advertised as a re-usable asset.

Changes in support of #7788

Fixes #7872
2017-08-08 02:04:42 +00:00