Compare commits

...

2007 commits

Author SHA1 Message Date
Mashhur
38d780a5e4
Update marathon CI pipeline to reflect recent LS released versions. (#17579) 2025-04-22 17:34:43 -07:00
kaisecheng
14a35a4d5f
[CI] handling v9 setting in benchmark marathon (#17581) 2025-04-22 16:06:11 -07:00
Greg Back
7cae0acf85
Update catalog-info.yaml (#17577)
Fixes an error where this was being treated as a number rather than a string
2025-04-21 14:09:55 -07:00
Cas Donoghue
443241b6d3
Track 8.19 branch instead of 8.x for jdk compat tests (#17576)
The 8.x branch has been renamed 8.19. Reflect this in jdk test config.
2025-04-21 13:07:20 -07:00
Karen Metts
b519cf4213
Doc: Remove local k8s files (#17547) 2025-04-17 19:20:41 -04:00
Karen Metts
f91f5a692d
Remove ADOC preview link (#17496) 2025-04-17 12:15:45 -04:00
João Duarte
005358ffb4
set major-version to "9.x" used only for the package installation section (#17562)
closes #17561
2025-04-17 17:13:50 +01:00
Victor Martinez
6646400637
mergify: support 8.19 and remove support 8.x (#17567) 2025-04-16 20:07:34 +02:00
Colleen McGinnis
47d430d4fb
Doc: Fix image paths for docs-assembler (#17566) 2025-04-16 09:46:48 -04:00
Cas Donoghue
49cf7acad0
Update logstash_releases.json after 8.17.5 (#17560)
* Update logstash_releases.json after 8.17.5

* Update 9.next  post 9.0.0 release

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

---------

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-04-15 11:18:37 -07:00
Andrea Selva
dae2b61ab2
Update logstash_releases.json after 8.18.0 (#17506) 2025-04-15 12:02:11 +02:00
Yehor Shvedov
86042f8c98
New way of backporting to active branches using gh action (#17551) 2025-04-15 00:39:38 +03:00
George Wallace
2c95068e04
Update index.md (#17548) 2025-04-10 16:08:27 -04:00
Karen Metts
187c925cc8
Doc: Update installation info (#17532) 2025-04-09 17:04:17 -04:00
Cas Donoghue
8e6e183adc
Ensure elasticsearch logs and data dirs exist before startup (#17531)
With a recent change in ES https://github.com/elastic/elasticsearch/pull/125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed 712b37e1df/qa/integration/services/elasticsearch_teardown.sh (L26-L27)
2025-04-09 13:32:32 -07:00
Rye Biesemeyer
712b37e1df
setting: enforce non-nullable (restore 8.15.x behavior) (#17522) 2025-04-09 09:28:38 -07:00
João Duarte
815fa8be1c
updates to docker image template based on feedback (#17494)
* change base images to ubi9-minimal
* do all env2yaml related copying in 1 COPY
* use -trimpath in go build
* move other COPY to end of dockerfile
* don't run package manager upgrade
* FROM and AS with same case
* ENV x=y instead of ENV x y
* remove indirect config folder
2025-04-09 16:17:39 +01:00
Mashhur
b9bac5dfc6
[Monitoring LS] Recommends collecting metricsets to fully visualize metrics on dashboards. (#17479)
* Disabling some of metricsets may cause dashboards partially display some metrics. This change recommends collecting metricsets to fully visualize metrics on dashboards.

* Paraphrasing sentences and grammar correction.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>

* Update docs/reference/serverless-monitoring-with-elastic-agent.md

* Make recommendation as a tip.

---------

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-04-08 15:03:53 -07:00
Dimitrios Liappis
b9469e0726
Fix JDK matrix pipeline after configurable it split (#17461)
PR #17219 introduced configurable split quantities for IT tests, which
resulted in broken JDK matrix pipelines (e.g. as seen via the elastic
internal link:
https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/444

reporting the following error

```
  File "/buildkite/builds/bk-agent-prod-k8s-1743469287077752648/elastic/logstash-linux-jdk-matrix-pipeline/.buildkite/scripts/jdk-matrix-tests/generate-steps.py", line 263
    def integration_tests(self, part: int, parts: int) -> JobRetValues:
    ^^^
SyntaxError: invalid syntax
There was a problem rendering the pipeline steps.
Exiting now.
```
)

This commit fixes the above problem, which was already fixed in #17642, using a more
idiomatic way.

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-04-08 15:34:07 +03:00
Karen Metts
d66a2cf758
Release notes, deprecations, breaking for 9.0.0 (#17507) 2025-04-07 19:09:14 -04:00
Karen Metts
e13fcadad8
Doc: Incorporate field ref deep dive content (#17484)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-04-07 15:04:49 -04:00
Andrea Selva
cb4c234aee
Update uri gem required by Logstash (#17495) 2025-04-07 10:32:12 +02:00
kaisecheng
eeb2162ae4
pin cgi to 0.3.7 (#17487) 2025-04-03 18:34:58 +01:00
Mashhur
ae3b3ed17c
Remove tech preview from agent driven LS monitoring pages. (#17482)
* Remove tech preview from agent driven LS monitoring pages.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-04-02 10:43:42 -07:00
Rob Bavey
3c6cbbf35b
Breaking changes for 9.0 (#17380) 2025-04-01 23:19:30 -04:00
Rob Bavey
5a052b33f9
Fix standalone agent access for agent-driven monitoring (#17386)
* Fix standalone agent access for agent-driven monitoring

Change incorrect dedicated instructions, and base them on those from running Elastic Agent
in standalone mode.


---------

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-04-01 14:50:14 -04:00
Karen Metts
7913f91340
Doc: Move 9.0 pre-release notes to release notes (#17439) 2025-04-01 10:16:51 -04:00
João Duarte
5f5b4bb3c3
Fix persistent-queues.md PQ sizing multiplication factors #17451 (#17452)
closes #17431 for main/9.0 branches
2025-04-01 13:22:50 +01:00
Andrea Selva
422cd4e06b
Fix syntax in BK CI script (#17462) 2025-04-01 12:26:07 +02:00
Victor Martinez
26af21df85
ci(backport): remove former approach (#17347) 2025-03-31 17:45:31 +02:00
Victor Martinez
a539695830
github-actions: enable dependabot (#17421) 2025-03-30 10:06:18 +02:00
Mashhur
4b88773726
Do not pipe Git output into a pager. (#17442) 2025-03-28 10:56:39 -07:00
Colleen McGinnis
e5bebcea17
remove reliance on redirects (#17440) 2025-03-28 12:45:19 -05:00
Karen Metts
e2c6254c81
Doc: Remove plugin docs from logstash core (#17405)
Co-authored-by: Colleen McGinnis <colleen.mcginnis@elastic.co>
2025-03-27 11:02:45 -04:00
Karen Metts
add7b3f4d3
Doc: Upgrade content improvements (#17403)
* Change upgrade prereq from 8.17 to 8.18
2025-03-26 13:25:31 -04:00
Cas Donoghue
6de59f2c02
Pin rubocop-ast development gem due to new dep on prism (#17407)
The rubocop-ast gem just introduced a new dependency on prism.
 - https://rubygems.org/gems/rubocop-ast/versions/1.43.0

In our install default gem rake task we are seeing issues trying to build native
extensions. I see that in upstream jruby they are seeing a similar problem (at
least it is the same failure mode https://github.com/jruby/jruby/pull/8415

This commit pins rubocop-ast to 1.42.0 which is the last version that did not
have an explicit prism dependency.
2025-03-26 08:48:28 -07:00
Andrea Selva
075fdb4152
Limit memory consumption in test on overflow (#17373)
Updates only test code to be able to run a test that consumes big memory if:
- the physical memory is bigger than the requested Java heap
- JDK version is greater than or equal to 21.

The reason to limit the JDK version is that on 16GB machine the G1GC is more efficient than the one on previous JDKs and so let complete the test with 10GB heap, while in JDK 17 it consistently fails with OOM error.
2025-03-26 11:29:09 +01:00
Andrea Selva
6b277ccf0d
Update logstash_releases.json after 8.17.4 (#17396) 2025-03-26 09:50:25 +01:00
Andrea Selva
f76edcea5e
Update logstash_releases.json after 8.16.6 (#17394) 2025-03-26 09:01:27 +01:00
Rob Bavey
f705a9de48
Fix Elasticsearch output SSL settings (#17391)
Replace removed Elasticsearch output SSL settings with the latest values
2025-03-24 11:45:14 -04:00
Kaarina Tungseth
7ac0423de0
Updates navigation titles and descriptions for release notes (#17381) 2025-03-21 11:58:31 -05:00
Colleen McGinnis
284272b137
[docs] Miscellaneous docs clean up (#17372)
* remove unused substitutions
* move images
* validate build
2025-03-21 11:11:24 -04:00
Karen Metts
960d997e9f
Doc: Fix upgrade TOC structure (#17361) 2025-03-21 10:28:39 -04:00
Rye Biesemeyer
3e0f488df2
tests: make integration split quantity configurable (#17219)
* tests: make integration split quantity configurable

Refactors shared splitter bash function to take a list of files on stdin
and split into a configurable number of partitions, emitting only those from
the currently-selected partition to stdout.

Also refactors the only caller in the integration_tests launcher script to
accept an optional partition_count parameter (defaulting to `2` for backward-
compatibility), to provide the list of specs to the function's stdin, and to
output relevant information about the quantity of partition splits and which
was selected.

* ci: run integration tests in 3 parts
2025-03-19 16:37:27 -07:00
Yehor Shvedov
7683983168
Disable support of OpenJDK 17 (#17338) 2025-03-20 01:34:33 +02:00
Andrea Selva
afde43f918
Added test to verify the int overflow happen (#17353)
Use long instead of int type to keep the length of the first token.

The size limit validation requires to sum two integers, one with the length of the accumulated chars till now plus the next fragment head part. If any of the two sizes is close to the max integer it generates an overflow and could successfully fail the test 9c0e50faac/logstash-core/src/main/java/org/logstash/common/BufferedTokenizerExt.java (L123).

To fall in this case it's required that sizeLimit is bigger then 2^32 bytes (2GB) and data fragments without any line delimiter is pushed to the tokenizer with a total size close to 2^32 bytes.
2025-03-19 16:50:04 +01:00
Andrea Selva
9c0e50faac
Use org.logstash.common.Util to hashing by default to SHA256 (#17346)
Removes the usage fo Apache Commons Codec MessgeDigest to use internal Util class with embodies hashing methods.
2025-03-19 09:15:25 +01:00
Rye Biesemeyer
10b5a84f84
add ci shared qualified-version script (#17311)
* ci: add shareable script for generating qualified version

* ci: use shared script to generate qualified version
2025-03-18 15:41:33 -07:00
Andrea Selva
787fd2c62f
Removed unused configHash computation that can be replaced by PipelineConfig.configHash() (#17336)
Removed unused configHash computation happening in AbstractPipeline and used only in tests replaced by PipelineConfig.configHash() invocation
2025-03-18 08:58:24 +01:00
Karen Metts
193af6a272
Doc: Refine new MD docs (WIP) (#17325) 2025-03-17 17:14:40 -04:00
Mashhur
8d10baa957
Internal collection doc update to reflect enabling legacy collection. (#17326) 2025-03-14 14:50:42 -07:00
Karen Metts
ea99e1db58
Doc: Update TOC order in API docs (#17324) 2025-03-14 15:47:16 -04:00
kaisecheng
4779d5e250
[Doc] OpenAPI spec (#17292)
This commit migrated API doc to OpenAPI spec

- expand Node Info `/_node/<types>`
- expand Node Stats 
- add health report 
- break down the share part to components
- add examples
- update authentication

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2025-03-14 17:31:39 +00:00
Cas Donoghue
964468f922
Require shellwords in artifact rake task (#17319)
The https://github.com/elastic/logstash/pull/17310 PR changed the rake task for
artifact creation to use shellwords from standard library. The acceptance tests
need to explitily load that library. This commit updates the rake file to handle
loading the required code.
2025-03-13 18:38:52 -07:00
Cas Donoghue
0d931a502a
Surface failures from nested rake/shell tasks (#17310)
Previously when rake would shell out the output would be lost. This
made debugging CI logs difficult. This commit updates the stack with
improved message surfacing on error.
2025-03-13 15:20:38 -07:00
Mashhur
e748488e4a
Upgrade elasticsearch-ruby client. (#17161)
* Upgrade elasticsearch-ruby client.

* Fix Faraday removed basic auth option and apply the ES client module name change.
2025-03-13 10:03:07 -07:00
Cas Donoghue
d916972877
Shareable function for partitioning integration tests (#17223)
For the fedramp high work https://github.com/elastic/logstash/pull/17038/files a
use case for multiple scripts consuming the partitioning functionality emerged.
As we look to more advanced partitioning we want to ensure that the
functionality will be consumable from multiple scripts.

See https://github.com/elastic/logstash/pull/17219#issuecomment-2698650296
2025-03-12 09:30:45 -07:00
Rob Bavey
bff0d5c40f
Remove automatic backport-8.x label creation (#17290)
This commit removes the automatic creation of the `backport-8.x` label on any commit
2025-03-06 17:55:01 -05:00
Colleen McGinnis
cb6886814c
Doc: Fix external links (#17288) 2025-03-06 13:38:31 -05:00
kaisecheng
feb2b92ba2
[CI] Health report integration tests use the new artifacts-api (#17274)
migrate to the new artifacts-api
2025-03-06 16:17:43 +00:00
kaisecheng
d61a83abbe
[CI] benchmark uses the new artifacts-api (#17224)
migrate benchmark to the new artifacts-api
2025-03-06 16:16:19 +00:00
Andrea Selva
07a3c8e73b
Reimplement LogStash::Numeric setting in Java (#17127)
Reimplements `LogStash::Setting::Numeric` Ruby setting class into the `org.logstash.settings.NumericSetting` and exposes it through `java_import` as `LogStash::Setting::NumericSetting`.
Updates the rspec tests:
- verifies `java.lang.IllegalArgumentException` instead of `ArgumentError` is thrown because the kind of exception thrown by Java code, during verification.
2025-03-06 10:44:22 +01:00
Ry Biesemeyer
a736178d59
Pluginmanager install preserve (#17267)
* tests: integration tests for pluginmanager install --preserve

* fix regression where pluginmanager's install --preserve flag didn't
2025-03-05 20:38:59 -08:00
Mashhur
b993bec499
Temporarily disable mergify conflict process. (#17258) 2025-03-05 12:52:00 -08:00
Rob Bavey
ba5f21576c
Fix pqcheck and pqrepair on Windows (#17210)
A recent change to pqheck, attempted to address an issue where the
pqcheck would not on Windows mahcines when located in a folder containing
a space, such as "C:\program files\elastic\logstash". While this fixed an
issue with spaces in folders, it introduced a new issue related to Java options,
and the pqcheck was still unable to run on Windows.

This PR attempts to address the issue, by removing the quotes around the Java options,
which caused the option parsing to fail, and instead removes the explicit setting of
the classpath - the use of `set CLASSPATH=` in the `:concat` function is sufficient
to set the classpath, and should also fix the spaces issue

Fixes: #17209
2025-03-05 15:48:20 -05:00
Mashhur
1e06eea86e
Additional cleanify changes to ls2ls integ tests (#17246)
* Additional cleanify changes to ls2ls integ tests: replace heartbeat-input with reload option, set queue drain to get consistent result.
2025-03-05 12:24:23 -08:00
Rob Bavey
7446e6bf6a
Update logstash_releases.json (#17253)
Update Logstash releases file with new 8.17 and 8.16 releases
2025-03-05 15:11:44 -05:00
Victor Martinez
f4ca06cfed
mergify: support for some backport aliases (#17217) 2025-03-05 20:46:06 +01:00
Ry Biesemeyer
73ffa243bf
tests: ls2ls delay checking until events have been processed (#17167)
* tests: ls2ls delay checking until events have been processed

* Make sure upstream sends expected number of events before checking the expectation with downstream. Remove unnecessary or duplicated logics from the spec.

* Add exception handling in `wait_for_rest_api` to make wait for LS REST API retriable.

---------

Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-03-05 11:36:52 -08:00
kaisecheng
0a745686f6
gradle task migrate to the new artifacts-api (#17232)
This commit migrates gradle task to the new artifacts-api

- remove dependency on staging artifacts
- all builds use snapshot artifacts
- resolve version from current branch, major.x, previous minor,
   with priority given in that order.

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-03-05 17:12:52 +00:00
Victor Martinez
7d1458fad3
ci: filter mergify backports for the Exhaustive tests pipeline (#17227) 2025-03-05 17:07:55 +01:00
Karen Metts
0a3a2a302c
Doc: Running LS in ECK (#17225) 2025-03-05 09:09:58 -05:00
kaisecheng
34416fd971
[test] ls2ls spec adds heartbeat to keep alive (#17228)
Adds heartbeat-input to the LS to LS integration test config to flush the last batch from PQ
2025-03-05 12:29:28 +00:00
Victor Martinez
c95430b586
mergify: add backport rules for 8.18 and 9.0 (#17168) 2025-03-05 08:57:03 +01:00
Cas Donoghue
062154494a
Improve warning for insufficient file resources for PQ max_bytes (#16656)
This commit refactors the `PersistedQueueConfigValidator` class to provide a
more detailed, accurate and actionable warning when pipeline's PQ configs are at
risk of running out of disk space. See
https://github.com/elastic/logstash/issues/14839 for design considerations. The
highlights of the changes include accurately determining the free resources on a
filesystem disk and then providing a breakdown of the usage for each of the
paths configured for a queue.
2025-03-04 13:27:10 -08:00
Ry Biesemeyer
8c96913807
Pluginmanager clean after mutate (#17203)
* pluginmanager: always clean after mutate

* pluginmanager: don't skip updating plugins installed with --version

* pr feedback
2025-03-04 10:59:35 -08:00
Liam Thompson
53d39adb21
[DOCS] Fix doc link (#17213) 2025-03-04 11:38:22 -05:00
Colleen McGinnis
50671709e3
add missing mapped_page (#17208) 2025-03-03 12:29:35 -06:00
Colleen McGinnis
24fd2a6c75
clean up cross-repo links (#17190) 2025-03-03 12:37:47 -05:00
kaisecheng
86785815bd
Fix empty node stats pipelines (#17185)
Fixed an issue where the `/_node/stats` API displayed empty pipeline metrics 
when X-Pack monitoring was enabled
2025-02-28 21:38:35 +00:00
João Duarte
a4cf2bcc52
add missing Makefile tasks to build oss and wolfi images from build context tarballs (#17189) 2025-02-28 20:54:46 +00:00
kaisecheng
f562f37df2
Update z_rubycheck.rake to no longer inject Xmx1g
This allows the environment variable JRUBY_OPTS to be used for setting properties like Xmx
original pr: #16420
2025-02-28 15:22:34 +00:00
João Duarte
fecfc7c602
add env2yaml source files to build context tarball (#17151)
* build full docker image from dockerfiles during docker acceptance tests
2025-02-28 11:34:06 +00:00
kaisecheng
2d69d06809
use UBI9 as base image (#17156)
- the base image change from ubi8 to ubi9
- remove installation of curl
2025-02-28 09:29:19 +00:00
Ry Biesemeyer
0f81816311
qa: don't bypass plugin manger tests on linux (#17171)
* qa: don't bypass plugin manger tests on linux

* add gradle task to build gem fixtures for integration tests
2025-02-27 13:24:04 -08:00
Ry Biesemeyer
793e8c0b45
plugin manager: add --no-expand flag for list command (#17124)
* plugin manager: add --no-expand flag for list command

Allows us to avoid expanding aliases and integration plugins

* spec: escape expected output in regexp
2025-02-27 07:24:56 -08:00
Victor Martinez
d40386a335
mergify: support backports automation with labels (#16937) 2025-02-27 15:16:51 +01:00
Colleen McGinnis
3115c78bf8
[docs] Migrate docs from AsciiDoc to Markdown (#17159)
* delete asciidoc files
* add migrated files
2025-02-26 14:19:48 -05:00
Colleen McGinnis
884ae815b5
add the new ci checks (#17158) 2025-02-26 14:19:25 -05:00
João Duarte
823dcd25fa
Update logstash_releases.json to include Logstash 7.17.28 (#17150) 2025-02-25 16:17:37 +00:00
Dimitrios Liappis
4d52b7258d
Add Windows 2025 to CI (#17133)
This commit adds Windows 2025 to the Windows JDK matrix and exhaustive tests pipelines.
2025-02-24 15:29:35 +02:00
Cas Donoghue
227c0d8150
Update container acceptance tests with stdout/stderr changes (#17138)
In https://github.com/elastic/logstash/pull/17125 jvm setup was redirected to
stderr to avoid polluting stdout. This test was actually having to do some
additional processing to parse that information. Now that we have split the
destinations the tests can be simplified to look for the data they are trying to
validate on the appropriate stream.
2025-02-21 10:40:43 -08:00
Ry Biesemeyer
91258c3f98
entrypoint: avoid polluting stdout (#17125)
routes output from setup-related functions to stderr, so that stdout can
include only the output of the actual program.
2025-02-20 12:55:40 -08:00
Cas Donoghue
e8e24a0397
Fix acceptance test assertions for updated plugin remove (#17126)
This commit updates the acceptance tests to expect messages in the updated
format for removing plugins. See https://github.com/elastic/logstash/pull/17030
for change.
2025-02-20 07:19:36 -08:00
Cas Donoghue
e094054c0e
Fix acceptance test assertions for updated plugin remove (#17122)
This commit updates the acceptance tests to expect messages in the updated
format for removing plugins. See https://github.com/elastic/logstash/pull/17030
for change.
2025-02-19 15:44:29 -08:00
Ry Biesemeyer
089558801e
plugins: improve remove command to support multiple plugins (#17030)
Removal works in a single pass by finding plugins that would have unmet
dependencies if all of the specified plugins were to be removed, and
proceeding with the removal only if no conflicts were created.

> ~~~
> ╭─{ rye@perhaps:~/src/elastic/logstash@main (pluginmanager-remove-multiple ✘) }
> ╰─● bin/logstash-plugin remove logstash-input-syslog logstash-filter-grok
> Using system java: /Users/rye/.jenv/shims/java
> Resolving dependencies......
> Successfully removed logstash-input-syslog
> Successfully removed logstash-filter-grok
> [success (00:00:05)]
~~~
2025-02-19 11:17:20 -08:00
Ry Biesemeyer
9abad6609c
spec: improve ls2ls spec (#17114)
* spec: improve ls2ls spec

 - fixes upstream/downstream convention
   - upstream: the sending logstash (has an LS output)
   - downstream: the receiving logstash (has an LS input)
 - helper `run_logstash_instance` yields the `LogstashService` instance
   and handles the teardown.
 - pass the pipeline id and node name to the LS instances via command line
   flags to make logging easier to differentiate
 - use the generator input's sequence id to ensure that the _actual_ events
   generated are received by the downstream pipeline

* start with port-offset 100

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

---------

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-02-18 21:53:35 -08:00
João Duarte
637f447b88
allow concurrent Batch deserialization (#17050)
Currently the deserialization is behind the readBatch's lock, so any large batch will take time deserializing, causing any other Queue writer (e.g. netty executor threads) and any other Queue reader (pipeline worker) to block.

This commit moves the deserialization out of the lock, allowing multiple pipeline workers to deserialize batches concurrently.

- add intermediate batch-holder from `Queue` methods
- make the intermediate batch-holder a private inner class of `Queue` with a descriptive name `SerializedBatchHolder`

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-02-17 19:01:44 +00:00
kaisecheng
e896cd727d
CPM handle 404 response gracefully with user-friendly log (#17052)
Starting from es-output 12.0.2, a 404 response is treated as an error. Previously, central pipeline management considered 404 as an empty pipeline, not an error.

This commit restores the expected behavior by handling 404 gracefully and logs a user-friendly message.
It also removes the redundant cache of pipeline in CPM

Fixes: #17035
2025-02-17 11:08:19 +00:00
Ry Biesemeyer
d20eb4dbcb
qa: use clean expansion of LS tarball per fixture instance (#17082)
* qa: use clean expansion of LS tarball per fixture instance

Because QA tests can _modify_ the Logstash installation (e.g. those that
invoke the plugin manager), it is important that the service wrapper
begins with a clean expansion of the logstash tarball.

* qa: enable safe reuse of ls_home in ls_to_ls tests
2025-02-14 07:53:52 -08:00
Dimitrios Liappis
78c34465dc
Allow capturing heap dumps in DRA BK jobs (#17081)
This commit allows Buildkite to capture any heap dumps produced
during DRA builds.
2025-02-13 18:13:17 +02:00
Dimitrios Liappis
8cd38499b5
Use centralized source of truth for active branches (#17063)
This commit simplifies the DRA process in Logstash by removing the need to maintain a separate file for the active branches, and instead rely on a centrally maintained file containing source of truth.
While at it, we refactor/simplify the creation of an array with the versions in `.buildkite/scripts/snyk/resolve_stack_version.sh`.
2025-02-12 16:17:52 +02:00
Ry Biesemeyer
a847ef7764
Update logstash_releases.json (#17055)
- 8.18 branch was cut 2025-01-29; add 8.next and shift 8.future
 - 8.16.4 and 8.17.2 were released 2025-02-11; shift forward
2025-02-11 10:54:21 -08:00
kaisecheng
5573b5ad77
fix logstash-keystore to accept spaces in values when added via stdin (#17039)
This commit preserves spaces in values, ensuring that multi-word strings are stored as intended.
Prior to this change, `logstash-keystore` incorrectly handled values containing spaces, 
causing only the first word to be stored.
2025-02-07 21:30:11 +00:00
Dimitrios Liappis
c7204fd7d6
Don't honor VERSION_QUALIFIER if set but empty (#17032)
PR #17006 revealed that the `VERSION_QUALIFIER` env var gets honored in
various scripts when present but empty.
This shouldn't be the case as the DRA process is designed to gracefully
ignore empty values for this variable.

This commit changes various ruby scripts to not treat "" as truthy.
Bash scripts (used by CI etc.) are already ok with this as part of
refactorings done in #16907.

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-02-07 13:05:23 +02:00
Mashhur
e23da7985c
Release note placeholder might be empty, making parsing lines nil tolerant. (#17026) 2025-02-05 11:07:56 -08:00
Andrea Selva
1c8cf546c2
Fix BufferedTokenizer to properly resume after a buffer full condition respecting the encoding of the input string (#16968)
Permit to use effectively the tokenizer also in context where a line is bigger than a limit.
Fixes an issues related to token size limit error, when the offending token was bigger than the input fragment in happened that the tokenzer wasn't unable to recover the token stream from the first delimiter after the offending token but messed things, loosing part of tokens.

## How solve the problem
This is a second take to fix the processing of tokens from the tokenizer after a buffer full error. The first try #16482 was rollbacked to the encoding error #16694.
The first try failed on returning the tokens in the same encoding of the input.
This PR does a couple of things:
- accumulates the tokens, so that after a full condition can resume with the next tokens after the offending one.
- respect the encoding of the input string. Use `concat` method instead of `addAll`, which avoid to convert RubyString to String and back to RubyString. When return the head `StringBuilder` it enforce the encoding with the input charset.
2025-02-05 10:25:08 +01:00
Mashhur
32cc85b9a7
Add short living 9.0 next and update main in CI release version definition. (#17008) 2025-01-31 10:32:16 -08:00
Mashhur
14c16de0c5
Core version bump to 9.1.0 (#16991) 2025-01-30 15:13:58 -08:00
Mashhur
786911fa6d
Add 9.0 branch to the CI branches definition (#16997) 2025-01-30 11:37:30 -08:00
Jan Calanog
2172879989
github-action: Add AsciiDoc freeze warning (#16969) 2025-01-30 10:39:27 -05:00
João Duarte
51ab5d85d2
upgrade jdk to 21.0.6+7 (#16932) 2025-01-30 11:17:04 +00:00
Mashhur
7378b85f41
Adding elastic_integration upgrade guidelines. (#16979)
* Adding elastic_integration upgrade guidelines.
2025-01-29 15:20:47 -08:00
Rob Bavey
70a6c9aea6
[wip] Changing upgrade docs to refer to 9.0 instead of 8.0 (#16977) 2025-01-29 17:33:17 -05:00
Rob Bavey
8a41a4e0e5
Remove sample breaking change from breaking changes doc (#16978) 2025-01-29 17:31:37 -05:00
Andrea Selva
6660395f4d
Update branches.json for 8.18 (#16981)
Add 8.18 to CI inventory branches
2025-01-29 19:04:16 +01:00
João Duarte
d3093e4b44
integration tests: switch log input to filestream in filebeat (#16983)
Log input has been deprecated in filebeat 9.0.0 and throws an error if it's present in the configuration.
This commit switches the configuration to the "filestream" input.
2025-01-29 13:51:09 +00:00
Ry Biesemeyer
6943df5570
plugin manager: add --level=[major|minor|patch] (default: minor) (#16899)
* plugin manager: add `--level=[major|minor|patch]` (default: `minor`)

* docs: plugin manager update `--level` behavior

* Update docs/static/plugin-manager.asciidoc

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* docs: plugin update major as subheading

* docs: intention-first in major plugin updates

* Update docs/static/plugin-manager.asciidoc

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-28 08:33:37 -08:00
Victor Martinez
1fda320ed9
ci(buildkite): exclude files/folders that are not tested in Buildkite (#16929) 2025-01-28 11:54:29 +01:00
kaisecheng
2be4812118
add openssl command to wolfi image (#16966)
This commit added openssl command to logstash-wolfi image
Fixes: #16965
2025-01-27 18:58:39 +00:00
kaisecheng
3f41828ebb
remove irrelevant warning for internal pipeline (#16938)
This commit removed irrelevant warning for internal pipeline, such as monitoring pipeline.
Monitoring pipeline is expected to be one worker. The warning is not useful

Fixes: #13298
2025-01-27 16:44:12 +00:00
João Duarte
c8a6566877
fix user and password detection from environment's uri (#16955) 2025-01-27 11:38:42 +00:00
Andrea Selva
03b11e9827
Reimplement LogStash::String setting in Java (#16576)
Reimplements `LogStash::Setting::String` Ruby setting class into the `org.logstash.settings.SettingString` and exposes it through `java_import` as `LogStash::Setting::SettingString`.
Updates the rspec tests in two ways:
- logging mock is now converted to real Log4J appender that spy log line that are later verified
- verifies `java.lang.IllegalArgumentException` instead of `ArgumentError` is thrown because the kind of exception thrown by Java code, during verification.
2025-01-24 16:56:53 +01:00
kaisecheng
dc740b46ca
[doc] fix the necessary privileges of central pipeline management (#16902)
CPM requires two roles logstash_admin and logstash_system

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-23 11:04:19 +00:00
Karen Metts
f66e00ac10
Doc: Remove extra symbol to fix formatting error (#16926) 2025-01-22 18:21:25 -05:00
João Duarte
52b7fb0ae6
fix jars installer for new maven and pin psych to 5.2.2 (#16919)
handle maven output that can carry "garbage" information after the jar's name. this patch deletes that extra information, also pins psych to 5.2.2 until jruby ships with snakeyaml-engine 2.9 and jar-dependencies 0.5.2

Related to: https://github.com/jruby/jruby/issues/8579
2025-01-22 15:35:50 +00:00
kaisecheng
d4ba08c358
Update logstash_releases.json (#16917) 2025-01-21 11:29:26 +00:00
Dimitrios Liappis
9385cfac5a
Use --qualifier in release manager (#16907)
This commit uses the new --qualifier parameter in the release manager
for publishing dra artifacts. Additionally, simplifies the expected
variables to rely on a simple `VERSION_QUALIFIER`.

Snapshot builds are skipped when VERSION_QUALIFIER is set.
Finally, for helping to test DRA PRs, we also allow passing the `DRA_BRANCH`  option/env var
to override BUILDKITE_BRANCH.

Closes https://github.com/elastic/ingest-dev/issues/4856
2025-01-20 13:55:17 +02:00
Andrea Selva
58e6dac94b
Increase Xmx used by JRuby during Rake execution to 4Gb (#16911) 2025-01-19 18:02:23 +01:00
Karen Metts
92d7210146
Doc: WPS integration (#16910) 2025-01-17 13:20:53 -05:00
kaisecheng
cd729b7682
Add %{{TIME_NOW}} pattern for sprintf (#16906)
* Add a new pattern %{{TIME_NOW}} to `event.sprintf` to generate a fresh timestamp.
The timestamp is represented as a string in the default ISO 8601 format

For example,
```
input {
    heartbeat {
    add_field => { "heartbeat_time" => "%{{TIME_NOW}}" }
    }
}
```
2025-01-17 16:51:15 +00:00
João Duarte
9a2cd015d4
inject VERSION_QUALIFIER into artifacts (#16904)
VERSION_QUALIFIER was already observed in rake artifacts task but only to influence the name of the artifact.

This commit ensure that the qualifier is also displayed in the cli and in the http api.
2025-01-17 10:18:35 +00:00
kaisecheng
ff44b7cc20
Update logstash_releases.json (#16901) 2025-01-14 15:46:29 +00:00
Ry Biesemeyer
348f1627a5
remove pipeline bus v1 (#16895) 2025-01-10 15:55:25 -08:00
Cas Donoghue
356ecb3705
Replace/remove references to defunct freenode instance (#16873)
The preferred channel for communication about LS is the elastic discussion
forum, this commit updates the source code and readme files to reflect that.
2025-01-10 14:28:35 -08:00
Mashhur
ae8ad28aaa
Add beats and elastic-agent SSL changes to 9.0 breaking change doc. (#16742) 2025-01-10 09:54:04 -08:00
Mashhur
db34116c46
Doc: Environment variables cannot be in config.string comments. (#16689)
* Doc: Environment variables cannot be in config.string comments due to substitution logic.

* Apply suggestions from code review

Suggestion to revise the statements.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Make sentences present tense.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-10 09:53:23 -08:00
Mashhur
a215101032
Validate the size limit in BufferedTokenizer. (#16882) 2025-01-09 15:53:07 -08:00
Karen Metts
d978e07f2c
Logstash API spec - first pass (#16546)
Co-authored-by: lcawl <lcawley@elastic.co>
2025-01-09 16:27:06 -05:00
Mashhur
47d04d06b2
Initialize flow metrics if pipeline metric.collect params is enabled. (#16881) 2025-01-09 12:30:49 -08:00
Ry Biesemeyer
4554749da2
Test touchups (#16884)
* test: improved and clearer stream read constraints validation

* test: remove unused  var
2025-01-09 12:28:45 -08:00
Ry Biesemeyer
16392908e2
jackson stream read constraints: code-based defaults (#16854)
* Revert "Apply Jackson stream read constraints defaults at runtime (#16832)"

This reverts commit cc608eb88b.

* jackson stream read constraints: code-based defaults

refactors stream read constraints to couple default values with their
associated overrides, which allows us to have more descriptive logging
that includes provenance of the value that has been applied.
2025-01-09 07:18:25 -08:00
kaisecheng
dae7fd93db
remove enterprise search from default distribution (#16818)
Elastic App Search and Elastic Workplace Search are deprecated and removed from v9
- remove enterprise_search integration plugin from default plugins
- add breaking change doc

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-09 12:15:41 +00:00
Cas Donoghue
274c212d9d
Ensure plugin config marked :deprecated logs to deprecation logger (#16833)
Previously when the `:deprecated` modifier was used in the plugin config DSL a
log message was sent at `:warn` level to the main logger. This commit updates
that message to be routed *only* to the deprecation logger.
2025-01-06 12:18:25 -08:00
Karen Metts
e2b322e8c1
Doc: Message Logstash module deprecations and removal (#16840) 2025-01-06 11:17:58 -05:00
kaisecheng
ef36df6b81
Respect environment variables in jvm.options (#16834)
JvmOptionsParser adds support for ${VAR:default} syntax when parsing jvm.options
- allow dynamic resolution of environment variables in the jvm.options file
- enables fallback to default value when the environment variable is not set
2025-01-03 23:04:28 +00:00
kaisecheng
de6a6c5b0f
Add pipeline metrics to Node Stats API (#16839)
This commit introduces three new metrics per pipeline in the Node Stats API:
- workers
- batch_size
- batch_delay

```
{
  ...
  pipelines: {
    main: {
      events: {...}, 
      flow: {...}, 
      plugins: {...}, 
      reloads: {...}, 
      queue: {...}, 
      pipeline: {
        workers: 12,
        batch_size: 125,
        batch_delay: 5,
      }, 
    }
  }
  ...
}
```
2025-01-03 20:48:14 +00:00
Cas Donoghue
531f795037
Ssl standardization breaking changes docs (#16844)
* Add logstash-filter-elasticsearch obsolete ssl section to breaking changes doc

Adds information about the SSL setting obsolescence for the Elasticsearch filter to the 9.0 breaking changes doc

* Fix headers

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>

* Add logstash-output-tcp obsolete ssl section to breaking changes doc

* Fix Asciidoctor doc links

* Add logstash-input-tcp obsolete ssl section to breaking changes doc

* Fix asciidoc plugin links

* Add logstash-filter-http obsolete ssl section to breaking changes doc

* Add logstash-input-http obsolete ssl section to breaking changes doc

* Add logstash-input-http_poller obsolete ssl section to breaking changes doc

* Add logstash-input-elastic_serverless_forwarder ssl conf to breaking changes

---------

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-01-03 11:26:46 -08:00
Cas Donoghue
cc608eb88b
Apply Jackson stream read constraints defaults at runtime (#16832)
When Logstash 8.12.0 added increased Jackson stream read constraints to
jvm.options, assumptions about the existence of that file's contents
were invalidated. This led to issues like #16683.

This change ensures Logstash applies defaults from config at runtime:
- MAX_STRING_LENGTH: 200_000_000
- MAX_NUMBER_LENGTH: 10_000
- MAX_NESTING_DEPTH: 1_000

These match the jvm.options defaults and are applied even when config
is missing. Config values still override these defaults when present.
2025-01-02 14:52:39 -08:00
Ry Biesemeyer
01c8e8bb55
Avoid lock when ecs_compatibility is explicitly specified (#16786)
Because a `break` escapes a `begin`...`end` block, we must not use a `break` in order to ensure that the explicitly set value gets memoized to avoid lock contention.

> ~~~ ruby
> def fake_sync(&block)
>   puts "FAKE_SYNC:enter"
>   val = yield
>   puts "FAKE_SYNC:return(#{val})"
>   return val
> ensure
>   puts "FAKE_SYNC:ensure"
> end
> 
> fake_sync do
>   @ivar = begin
>     puts("BE:begin")
>   	break :break
>   	
>   	val = :ret
>   	puts("BE:return(#{val})")
>   	val
>   ensure
>     puts("BE:ensure")
>   end
> end
> ~~~

Note: no `FAKE_SYNC:return`:

> ~~~
> ╭─{ rye@perhaps:~/src/elastic/logstash (main ✔) }
> ╰─● ruby break-esc.rb
> FAKE_SYNC:enter
> BE:begin
> BE:ensure
> FAKE_SYNC:ensure
> [success]
> ~~~
2024-12-19 15:48:05 -08:00
kaisecheng
ae75636e17
update ironbank image to ubi9/9.5 (#16819) 2024-12-19 17:24:01 +00:00
kaisecheng
05789744d2
Remove the Arcsight module and the modules framework (#16794)
Remove all module related code
- remove arcsight module
- remove module framework
- remove module tests
- remove module configs
2024-12-19 14:28:54 +00:00
kaisecheng
03ddf12893
[doc] use UBI8 as base image (#16812) 2024-12-17 18:16:48 +00:00
João Duarte
6e0d235c9d
update releases file with 8.16.2 GA (#16807) 2024-12-17 10:22:12 +00:00
Karen Metts
e1f4e772dc
Doc: Update security docs to replace obsolete cacert setting (#16798) 2024-12-16 15:25:43 -05:00
João Duarte
e6e0f9f6eb
give more memory to tests. 1gb instead of 512mb (#16764) 2024-12-16 10:41:05 +00:00
Cas Donoghue
2d51cc0ba9
Document obsolete settings for elasticsearch output plugin (#16787)
Update breaking changes doc with the standardized ssl settings for the
logstash-output-elasticsearch plugin.
2024-12-13 11:21:07 -08:00
Cas Donoghue
188d9e7ed8
Update serverless tests to include product origin header (#16766)
This commit updates the curl scripts that interact with Kibana's
`api/logstash/pipeline/*` endpoin. Additionally this adds the header to any curl
that interacts with elasticsearch API as well.
2024-12-13 09:22:45 -08:00
kaisecheng
65495263d4
[CI] remove 8.15 DRA (#16795) 2024-12-13 13:44:33 +00:00
João Duarte
264283889e
update logstash_releases to account for 8.17.0 GA (#16785) 2024-12-12 17:32:05 +01:00
kaisecheng
5bff2ad436
[CI] benchmark readme (#16783)
- add instruction to run benchmark in v8 with `xpack.monitoring.allow_legacy_collection`
- remove scripted field 5m_num from dashboards
2024-12-12 11:09:22 +00:00
Cas Donoghue
095fbbb992
Add breaking changes docs for input-elasticsearch (#16744)
This commit follows the pattern established in
https://github.com/elastic/logstash/pull/16701 for indicating obsolete ssl
settings in logstash core plugins.
2024-12-09 13:24:07 -08:00
João Duarte
e36cacedc8
ensure inputSize state value is reset during buftok.flush (#16760) 2024-12-09 09:10:54 -08:00
Ry Biesemeyer
202d07cbbf
ensure jackson overrides are available to static initializers (#16719)
Moves the application of jackson defaults overrides into pure java, and
applies them statically _before_ the `org.logstash.ObjectMappers` has a chance
to start initializing object mappers that rely on the defaults.

We replace the runner's invocation (which was too late to be fully applied) with
a _verification_ that the configured defaults have been applied.
2024-12-04 14:27:26 -08:00
Rob Bavey
ab19769521
Pin date dependency to 3.3.3 (#16755)
Resolves: #16095, #16754
2024-12-04 14:39:50 -05:00
Mashhur
4d9942d68a
Update usage of beats-input obsoleted SSL params in the core. (#16753) 2024-12-04 11:12:21 -08:00
Rob Bavey
e3265d93e8
Pin jar-dependencies to 0.4.1 (#16747)
Pin jar-dependencies to `0.4.1`, until https://github.com/jruby/jruby/issues/7262
is resolved.
2024-12-03 17:35:00 -05:00
João Duarte
af76c45e65
Update logstash_releases.json to account for 7.17.26 GA (#16746) 2024-12-03 15:25:55 +00:00
João Duarte
1851fe6b2d
Update logstash_releases.json to account for GA of 8.15.5 (#16734) 2024-11-27 14:09:22 +00:00
mmahacek
d913e2ae3d
Docs: Troubleshooting update for JDK bug handling cgroups v1 (#16721)
---------
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-11-27 11:08:20 +00:00
Rob Bavey
ccde1eb8fb
Add SSL Breaking changes for logstash-output-http to breaking changes… (#16701)
* Add SSL Breaking changes for logstash-output-http to breaking changes doc
* Add missing discrete tags
* Improve formatting of plugin breaking chagnes

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-11-26 16:23:44 -05:00
Rob Bavey
0e58e417ee
Increase timeout for docs PR link action (#16718)
Update the timeout from 15 minutes to 30 minutes to try and fix the inline docs previews feature, and cleanup comments
2024-11-22 11:57:15 -05:00
Karen Metts
615545027f
Doc: Roll 6.3 breaking changes under 6.0 series (#16706) 2024-11-22 11:16:02 -05:00
Cas Donoghue
eb7e1253e0
Revert "Bugfix for BufferedTokenizer to completely consume lines in case of lines bigger then sizeLimit (#16482)" (#16715)
This reverts commit 85493ce864.
2024-11-21 09:18:59 -08:00
João Duarte
aff8d1cce7
update logstash_release with 8.16.1 and 8.16.2-SNAPSHOT (#16711) 2024-11-21 10:03:50 +00:00
João Duarte
2f0e10468d
Update logstash_releases.json to account for 8.17 Feature Freeze (#16709) 2024-11-21 09:35:33 +00:00
github-actions[bot]
0dd64a9d63
PipelineBusV2 deadlock proofing (#16671) (#16682)
* pipeline bus: add deadlock test for unlisten/unregisterSender

* pipeline bus: eliminate deadlock

Moves the sync-to-notify out of the `AddressStateMapping#mutate`'s effective
synchronous block to eliminate a race condition where unlistening to an address
and unregistering a sender could deadlock.

It is safe to notify an AddressState's attached input without exclusive access
to the AddressState, because notifying an input that has since been disconnected
is net zero harm.

(cherry picked from commit 8af6343a26)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-11-20 13:26:13 -08:00
Mashhur
15b203448a
[Health API E2E] Align on agent python version and avoid pip install. (#16704)
* Pip install is unnecessary and sometimes hangs with prompt dialog. This commit aligns on agent python version which has a default pip installed.

* Update .buildkite/scripts/health-report-tests/main.sh

Improve readability.

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>

---------

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2024-11-20 10:26:02 -08:00
Cas Donoghue
7b3d23b9d5
Replace removed yaml module (#16703)
In https://github.com/elastic/logstash/pull/16586 the module include was
removed. This causes failures in the script when the module is referenced. This
commit re-enables the include for the yaml module.
2024-11-20 10:13:30 -08:00
João Duarte
977efbddde
Update branches.json to include 8.15, 8.16 and 8.17 (#16698) 2024-11-20 16:37:10 +00:00
Cas Donoghue
e0ed994ab1
Update license checker with new logger dependency (#16695)
A new transative dependency on the `logger` gem has been added through sinatra 4.1.0. Update the
license checker to ensure this is accounted for.
2024-11-20 11:49:28 +00:00
Andrea Selva
d4fb06e498
Introduce a new flag to explicitly permit legacy monitoring (#16586)
Introduce a new flag setting `xpack.monitoring.allow_legacy_collection` which eventually enable the legacy monitoring collector.

Update the method to test if monitoring is enabled so that consider also `xpack.monitoring.allow_legacy_collection` to determine if `monitoring.*` settings are valid or not.
By default it's false, the user has to intentionally enable it to continue to use the legacy monitoring settings.


---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-11-19 08:52:28 +01:00
Andrea Selva
a94659cf82
Default buffer type to 'heap' for 9.0 (#16500)
Switch the default value of `pipeline.buffer.type` to use the heap memory instead of direct one.

Change the default value of the setting `pipeline.buffer.type` from direct to heap and update consequently the documentation.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-11-13 16:58:56 +01:00
João Duarte
2a23680cfd
Update logstash_releases.json for new branching strategy (#16585)
See naming rational in https://github.com/logstash-plugins/.ci/pull/63#issue-2597373955
After 8.16 is GA, the "releases" entry should become:

```json
  "releases": {
    "7.current": "7.17.24",
    "8.current": "8.16.0",
    "8.previous": "8.15.3"
  },
```

For snapshots we'll also test against "main", "8.next", and "8.future". The labels are:

- `main`: main branch
-  `8.future`: the future 8.x release, i.e. current version of the 8.x branch
- `8.next`: the short lived period between a minor's FF - when the new branch is cut from 8.x - and GA
- `8.current`: the most recent 8.x release
- `8.previous`: the previous, but still supported, 8.x release
2024-11-13 11:04:02 +00:00
Cas Donoghue
ff8c154c4d
Extend ruby linting tasks to handle file inputs (#16660)
This commit extends the gradle and rake tasks to pass through a list of files
for rubocop to lint. This allows more specificity and fine grained control for
linting when the consumer of the tasks only wishes to lint a select few files.
2024-11-12 12:46:52 -08:00
Yehor Shvedov
74d87c9ea0
Update catalog-info file with correct system property (#16669) 2024-11-12 21:40:17 +02:00
kaisecheng
5826c6f902
Use UBI as base image (#16599)
Logstash Docker images, full and OSS, now use UBI image as its base, replacing the previous Ubuntu base.

- change the base image of `full` and `oss` to ubi
- Set locale to C.UTF-8
- remove ubi flavour
- use go image to build env2yaml
- remove redundant and refactor steps
- add support to build image in mac aarch64
- allow customizing ELASTIC_VERSION and LOCAL_ARTIFACTS for test purpose
2024-11-08 16:25:12 +00:00
Ellie
d9ead9a8db
Remove link to deleted cluster (#16658) 2024-11-08 09:03:47 -05:00
Nicole Albee
046ea1f5a8
For custom java plugins, set the platform = 'java'. (#16628) 2024-11-06 08:48:21 +00:00
João Duarte
efbee31461
Update .ruby-version to jruby-9.4.9.0 (#16642) 2024-11-06 08:22:37 +00:00
kaisecheng
5847d77331
skip allow_superuser in Windows OS (#16629)
As user id is always zero in Windows,
this commit excluded the checking of running as root in Windows.
2024-11-05 15:37:19 +00:00
Nicole Albee
113585d4a5
Anchor the -java match pattern at the end of the string. (#16626)
This fixes the offline install problem of the logstash-input-java_filter_example off-line install.
2024-11-05 14:21:15 +00:00
João Duarte
6703aec476
bump jruby to 9.4.9.0 (#16634) 2024-11-05 13:49:07 +00:00
kaisecheng
849f431033
fix Windows java not found log (#16633) 2024-11-05 10:15:51 +00:00
Andrea Selva
852149be2e
Update JDK to latest in versions.yml (#16627)
Update JDK to version 21.0.5+11
2024-11-04 16:40:20 +01:00
kaisecheng
8ce58b8355
run acceptance tests as non-root (#16624) 2024-11-01 19:47:08 +00:00
kaisecheng
00da72378b
add boostrap to docker build to fix missing jars (#16622)
The DRA build failed because the required jars were missing, as they had been removed during the Docker build process.
2024-11-01 15:45:35 +00:00
Karen Metts
0006937e46
Doc: Reset breaking changes and release notes for 9.0 (#16603) 2024-10-31 18:06:52 -04:00
João Duarte
9eced9a106
reduce effort during build of docker images (#16619)
there's no need to build jdk-less and windows tarballs for docker images
so this change simplifies the build process.

It should reduce the time spent needed to build docker images.
2024-10-31 16:00:25 +00:00
João Duarte
472e27a014
make docker build and gradle tasks more friendly towards ci output (#16618) 2024-10-31 16:00:11 +00:00
kaisecheng
db59cd0fbd
set allow_superuser to false as default (#16558)
- set allow_superuser as false by default for v9
- change the buildkite image of ruby unit test to non-root
2024-10-31 13:33:00 +00:00
Andrea Selva
c602b851bf
[CI] Change agent for JDK availability check and add schedule also for 8.x (#16614)
Switch execution agent of JDK availability check pipeline from vm-agent to container-agent.
Moves the schedule definition from the `Logstash Pipeline Scheduler` pipeline into the pipeline definition, adding a schedule also for `8.x` branch.
2024-10-30 12:13:28 +01:00
Andrea Selva
5d523aa5c8
Fix bad reference to a variable (#16615) 2024-10-30 11:44:41 +01:00
Andrea Selva
ed5874bc27
Use jvm catalog for reproducible builds and expose new pipeline to check JDK availability (#16602)
Updates the existing `createElasticCatalogDownloadUrl` method to use the precise version retrieved `versions.yml` to download the JDK instead of using the latest of major version. This makes the build reproducible again.
Defines a new Gradle `checkNewJdkVersion` task to check if there is a new JDK version available from JVM catalog matching the same major of the current branch. 
Creates a new Buildkite pipeline to execute a `bash` script to run the Gradle task; plus it also update the `catalog-info.yaml` with the new pipeline and a trigger to execute every week.
2024-10-29 10:55:15 +01:00
João Duarte
ca19f0029e
make max inflight warning global to all pipelines (#16597)
The current max inflight error message focuses on a single pipeline and on a maximum amount of 10k events regardless of the heap size.

The new warning will take into account all loaded pipelines and also consider the heap size, giving a warning if the total number of events consumes 10% or more of the total heap.

For the purpose of the warning events are assumed to be 2KB as it a normal size for a small log entry.
2024-10-25 14:44:33 +01:00
Edmo Vamerlatti Costa
93b0913fd9
Updated CI releases inventory after 7.17.25 (#16589) 2024-10-22 15:40:02 +02:00
kaisecheng
566bdf66fc
remove http.* settings (#16552)
The commit removes the deprecated settings http.port, http.host, http.enabled, and http.environment
2024-10-18 12:15:38 +01:00
kaisecheng
467ab3f44b
Enable log.format.json.fix_duplicate_message_fields by default (#16578)
Set `log.format.json.fix_duplicate_message_fields` to `true` as default
to avoid collision of the message field in log lines when log.format is JSON
2024-10-17 16:22:30 +01:00
Edmo Vamerlatti Costa
dcafa0835e
Updated CI releases inventory after 8.15.3 (#16581) 2024-10-17 16:55:31 +02:00
João Duarte
daf979c189
default to jdk 21 on all ci/build tasks (#16464) 2024-10-17 15:47:52 +01:00
kaisecheng
3f0ad12d06
add http.* deprecation log (#16538)
- refactor deprecated alias to support obsoleted version
- add deprecation log for http.* config
2024-10-17 14:07:51 +01:00
Andrea Selva
b6f16c8b81
Adds a JMH benchmark to test BufferedTokenizerExt class (#16564)
Adds a JMH benchmark to measure the peformances of BufferedTokenizerExt.
Update also Gradle build script to remove CMS GC flags and fix deprecations for Gradle 9.0.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-10-16 16:55:52 +02:00
Andrea Selva
85493ce864
Bugfix for BufferedTokenizer to completely consume lines in case of lines bigger then sizeLimit (#16482)
Fixes the behaviour of the tokenizer to be able to work properly when buffer full conditions are met.

Updates BufferedTokenizerExt so that can accumulate token fragments coming from different data segments. When a "buffer full" condition is matched, it record this state in a local field so that on next data segment it can consume all the token fragments till the next token delimiter.
Updated the accumulation variable from RubyArray containing strings to a StringBuilder which contains the head token, plus the remaining token fragments are stored in the input array.
Furthermore it translates the `buftok_spec` tests into JUnit tests.
2024-10-16 16:48:25 +02:00
João Duarte
ab77d36daa
ensure minitar 1.x is used instead of 0.x (#16565) 2024-10-16 12:37:35 +01:00
Andrea Selva
63706c1a36
Marked ArcSight Module as deprecated in documentation. (#16553)
Updates guide for ArcSight Module to deprecate it.
2024-10-16 08:37:13 +02:00
kaisecheng
cb3b7c01dc
Remove event_api.tags.illegal for v9 (#16461)
This commit removed `--event_api.tags.illegal` option
Fix: #16356
2024-10-15 22:27:36 +01:00
Rob Bavey
3f2a659289
Update branches.json to point to 8.16 branch (#16560) 2024-10-15 15:43:16 -04:00
Mashhur
dfd256e307
[Health API] Add 1-min, 5-min backpressure and multipipeline test cases. (#16550)
* Health API: Add 1min 5min backpressure cases and improve Logstash temination logic.

* Apply suggestions from code review

Uncomment accidentally commented sources.

* Update .buildkite/scripts/health-report-tests/tests/slow-start.yaml

No need to wait for LS startup when using slow start scenario.

* Apply suggestions from code review

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

* Standardize YAML structure and rename wait time to wait_seconds

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-10-15 08:32:17 -07:00
kaisecheng
b571e8f3e3
remove deprecated modules netflow, fb_apache and azure (#16514)
This commit removes files related to netflow, fb_apache and azure modules
Fix: #16357
2024-10-15 14:03:53 +01:00
Karen Metts
fc119df24a
Doc: Update 8.15.0 release notes to future proof link (#16554) 2024-10-14 11:10:15 -04:00
Ry Biesemeyer
937a9ea49f
docs: add health details for flow/worker_utilization (#16544)
* docs: add health details for flow/worker_utilization

* plus-append to indent flow details under flow
2024-10-11 15:10:11 -07:00
kaisecheng
8cd0fa8767
refactor log for event_api.tags.illegal (#16545)
- add `obsoleted_version` and remove `deprecated_msg` from `deprecated_option` for consistent warning message
2024-10-11 21:22:29 +01:00
Andrea Selva
6064587bc4
Keeps global settings aligned across entities used in the test for StatsEventFactory
Fixes a potential flaky test, due to shared (LogStash:SETTINGS) fixture across the test base.


Forward port the commit 609155a61b used to fix the non clean backport PR #16531 of #16525 to 8.x.

LogStash:SETTINGS is used in the constructor of LogStash::Inputs::Metrics::StatsEventFactory to query the value of api.enabled. This PR keeps updated the value for the setting provided to the Agent constructor and to the StatsEventFactory.
2024-10-11 15:26:53 +02:00
Ry Biesemeyer
a931b2cde6
Flow worker utilization probe (#16532)
* flow: refactor pipeline refs to keep worker flows separate

* health: add worker_utilization probe

pipeline is:
  - RED "completely blocked" when last_5_minutes >= 99.999
  - YELLOW "nearly blocked" when last_5_minutes > 95
    - and inludes "recovering" info when last_1_minute < 80
  - YELLOW "completely blocked" when last_1_minute >= 99.999
  - YELLOW "nearly blocked" when last_1_minute > 95

* tests: improve coverage of PipelineIndicator probes

* Apply suggestions from code review
2024-10-10 17:56:22 -07:00
Ry Biesemeyer
065769636b
health: add logstash.forceApiStatus: green escape hatch (#16535) 2024-10-10 16:35:06 -07:00
Mashhur
4037adfc4a
Health api minor followups (#16533)
* Utilize default agent for Health API CI. Call python scripts from directly CI step.

* Change BK agent to support both Java and python. Install pip manually and send env vars to subprocess.
2024-10-10 14:57:41 -07:00
github-actions[bot]
7f7af057f0
Feature: health report api (#16520) (#16523)
* [health] bootstrap HealthObserver from agent to API (#16141)

* [health] bootstrap HealthObserver from agent to API

* specs: mocked agent needs health observer

* add license headers

* Merge `main` into `feature/health-report-api` (#16397)

* Add GH vault plugin bot to allowed list (#16301)

* regenerate webserver test certificates (#16331)

* correctly handle stack overflow errors during pipeline compilation (#16323)

This commit improves error handling when pipelines that are too big hit the Xss limit and throw a StackOverflowError. Currently the exception is printed outside of the logger, and doesn’t even show if log.format is json, leaving the user to wonder what happened.

A couple of thoughts on the way this is implemented:

* There should be a first barrier to handle pipelines that are too large based on the PipelineIR compilation. The barrier would use the detection of Xss to determine how big a pipeline could be. This however doesn't reduce the need to still handle a StackOverflow if it happens.
* The catching of StackOverflowError could also be done on the WorkerLoop. However I'd suggest that this is unrelated to the Worker initialization itself, it just so happens that compiledPipeline.buildExecution is computed inside the WorkerLoop class for performance reasons. So I'd prefer logging to not come from the existing catch, but from a dedicated catch clause.

Solves #16320

* Doc: Reposition worker-utilization in doc (#16335)

* settings: add support for observing settings after post-process hooks (#16339)

Because logging configuration occurs after loading the `logstash.yml`
settings, deprecation logs from `LogStash::Settings::DeprecatedAlias#set` are
effectively emitted to a null logger and lost.

By re-emitting after the post-process hooks, we can ensure that they make
their way to the deprecation log. This change adds support for any setting
that responds to `Object#observe_post_process` to receive it after all
post-processing hooks have been executed.

Resolves: elastic/logstash#16332

* fix line used to determine ES is up (#16349)

* add retries to snyk buildkite job (#16343)

* Fix 8.13.1 release notes (#16363)

make a note of the fix that went to 8.13.1: #16026

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

* Update logstash_releases.json (#16347)

* [Bugfix] Resolve the array and char (single | double quote) escaped values of ${ENV} (#16365)

* Properly resolve the values from ENV vars if literal array string provided with ENV var.

* Docker acceptance test for persisting  keys and use actual values in docker container.

* Review suggestion.

Simplify the code by stripping whitespace before `gsub`, no need to check comma and split.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* Doc: Add SNMP integration to breaking changes (#16374)

* deprecate java less-than 17 (#16370)

* Exclude substitution refinement on pipelines.yml (#16375)

* Exclude substitution refinement on pipelines.yml (applies on ENV vars and logstash.yml where env2yaml saves vars)

* Safety integration test for pipeline config.string contains ENV .

* Doc: Forwardport 8.15.0 release notes to main (#16388)

* Removing 8.14 from ci/branches.json as we have 8.15. (#16390)

---------

Co-authored-by: ev1yehor <146825775+ev1yehor@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* Squashed merge from 8.x

* Failure injector plugin implementation. (#16466)

* Test purpose only failure injector integration (filter and output) plugins implementation. Add unit tests and include license notes.

* Fix the degrate method name typo.

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* Add explanation to the config params and rebuild plugin gem.

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* Health report integration tests bootstrapper and initial tests implementation (#16467)

* Health Report integration tests bootstrapper and initial slow start scenario implementation.

* Apply suggestions from code review

Renaming expectation check method name.

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

* Changed to branch concept, YAML structure simplified as changed to Dict.

* Apply suggestions from code review

Reflect `help_url` to the integration test.

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

* health api: expose `GET /_health_report` with pipelines/*/status probe (#16398)

Adds a `GET /_health_report` endpoint with per-pipeline status probes, and wires the
resulting report status into the other API responses, replacing their hard-coded `green`
with a meaningful status indication.

---------

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* docs: health report API, and diagnosis links (feature-targeted) (#16518)

* docs: health report API, and diagnosis links

* Remove plus-for-passthrough markers

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

---------

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* merge 8.x into feature branch... (#16519)

* Add GH vault plugin bot to allowed list (#16301)

* regenerate webserver test certificates (#16331)

* correctly handle stack overflow errors during pipeline compilation (#16323)

This commit improves error handling when pipelines that are too big hit the Xss limit and throw a StackOverflowError. Currently the exception is printed outside of the logger, and doesn’t even show if log.format is json, leaving the user to wonder what happened.

A couple of thoughts on the way this is implemented:

* There should be a first barrier to handle pipelines that are too large based on the PipelineIR compilation. The barrier would use the detection of Xss to determine how big a pipeline could be. This however doesn't reduce the need to still handle a StackOverflow if it happens.
* The catching of StackOverflowError could also be done on the WorkerLoop. However I'd suggest that this is unrelated to the Worker initialization itself, it just so happens that compiledPipeline.buildExecution is computed inside the WorkerLoop class for performance reasons. So I'd prefer logging to not come from the existing catch, but from a dedicated catch clause.

Solves #16320

* Doc: Reposition worker-utilization in doc (#16335)

* settings: add support for observing settings after post-process hooks (#16339)

Because logging configuration occurs after loading the `logstash.yml`
settings, deprecation logs from `LogStash::Settings::DeprecatedAlias#set` are
effectively emitted to a null logger and lost.

By re-emitting after the post-process hooks, we can ensure that they make
their way to the deprecation log. This change adds support for any setting
that responds to `Object#observe_post_process` to receive it after all
post-processing hooks have been executed.

Resolves: elastic/logstash#16332

* fix line used to determine ES is up (#16349)

* add retries to snyk buildkite job (#16343)

* Fix 8.13.1 release notes (#16363)

make a note of the fix that went to 8.13.1: #16026

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

* Update logstash_releases.json (#16347)

* [Bugfix] Resolve the array and char (single | double quote) escaped values of ${ENV} (#16365)

* Properly resolve the values from ENV vars if literal array string provided with ENV var.

* Docker acceptance test for persisting  keys and use actual values in docker container.

* Review suggestion.

Simplify the code by stripping whitespace before `gsub`, no need to check comma and split.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* Doc: Add SNMP integration to breaking changes (#16374)

* deprecate java less-than 17 (#16370)

* Exclude substitution refinement on pipelines.yml (#16375)

* Exclude substitution refinement on pipelines.yml (applies on ENV vars and logstash.yml where env2yaml saves vars)

* Safety integration test for pipeline config.string contains ENV .

* Doc: Forwardport 8.15.0 release notes to main (#16388)

* Removing 8.14 from ci/branches.json as we have 8.15. (#16390)

* Increase Jruby -Xmx to avoid OOM during zip task in DRA (#16408)

Fix: #16406

* Generate Dataset code with meaningful fields names (#16386)

This PR is intended to help Logstash developers or users that want to better understand the code that's autogenerated to model a pipeline, assigning more meaningful names to the Datasets subclasses' fields.

Updates `FieldDefinition` to receive the name of the field from construction methods, so that it can be used during the code generation phase, instead of the existing incremental `field%n`.
Updates `ClassFields` to propagate the explicit field name down to the `FieldDefinitions`.
Update the `DatasetCompiler` that add fields to `ClassFields` to assign a proper name to generated Dataset's fields.

* Implements safe evaluation of conditional expressions, logging the error without killing the pipeline (#16322)

This PR protects the if statements against expression evaluation errors, cancel the event under processing and log it.
This avoids to crash the pipeline which encounter a runtime error during event condition evaluation, permitting to debug the root cause reporting the offending event and removing from the current processing batch.

Translates the `org.jruby.exceptions.TypeError`, `IllegalArgumentException`, `org.jruby.exceptions.ArgumentError` that could happen during `EventCodition` evaluation into a custom `ConditionalEvaluationError` which bubbles up on AST tree nodes. It's catched in the `SplitDataset` node.
Updates the generation of the `SplitDataset `so that the execution of `filterEvents` method inside the compute body is try-catch guarded and defer the execution to an instance of `AbstractPipelineExt.ConditionalEvaluationListener` to handle such error. In this particular case the error management consist in just logging the offending Event.

---------

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

* Update logstash_releases.json (#16426)

* Release notes for 8.15.1 (#16405) (#16427)

* Update release notes for 8.15.1

* update release note

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
(cherry picked from commit 2fca7e39e8)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix ConditionalEvaluationError to do not include the event that errored in its serialiaxed form, because it's not expected that this class is ever serialized. (#16429) (#16430)

Make inner field of ConditionalEvaluationError transient to be avoided during serialization.

(cherry picked from commit bb7ecc203f)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* use gnu tar compatible minitar to generate tar artifact (#16432) (#16434)

Using VERSION_QUALIFIER when building the tarball distribution will fail since Ruby's TarWriter implements the older POSIX88 version of tar and paths will be longer than 100 characters.

For the long paths being used in Logstash's plugins, mainly due to nested folders from jar-dependencies, we need the tarball to follow either the 2001 ustar format or gnu tar, which is implemented by the minitar gem.

(cherry picked from commit 69f0fa54ca)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* account for the 8.x in DRA publishing task (#16436) (#16440)

the current DRA publishing task computes the branch from the version
contained in the version.yml

This is done by taking the major.minor and confirming that a branch
exists with that name.

However this pattern won't be applicable for 8.x, as that branch
currently points to 8.16.0 and there is no 8.16 branch.

This commit falls back to reading the buildkite injected
BUILDKITE_BRANCH variable.

(cherry picked from commit 17dba9f829)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* Fixes the issue where LS wipes out all quotes from docker env variables. (#16456) (#16459)

* Fixes the issue where LS wipes out all quotes from docker env variables. This is an issue when running LS on docker with CONFIG_STRING, needs to keep quotes with env variable.

* Add a docker acceptance integration test.

(cherry picked from commit 7c64c7394b)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* Known issue for 8.15.1 related to env vars references (#16455) (#16469)

(cherry picked from commit b54caf3fd8)

Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>

* bump .ruby_version to jruby-9.4.8.0 (#16477) (#16480)

(cherry picked from commit 51cca7320e)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* Release notes for 8.15.2 (#16471) (#16478)

Co-authored-by: andsel <selva.andre@gmail.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 01dc76f3b5)

* Change LogStash::Util::SubstitutionVariables#replace_placeholders refine argument to optional (#16485) (#16488)

(cherry picked from commit 8368c00367)

Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>

* Use jruby-9.4.8.0 in exhaustive CIs. (#16489) (#16491)

(cherry picked from commit fd1de39005)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* Don't use an older JRuby with oraclelinux-7 (#16499) (#16501)

A recent PR (elastic/ci-agent-images/pull/932) modernized the VM images
and removed JRuby 9.4.5.0 and some older versions.

This ended up breaking exhaustive test on Oracle Linux 7 that hard coded
JRuby 9.4.5.0.

PR https://github.com/elastic/logstash/pull/16489 worked around the
problem by pinning to the new JRuby, but actually we don't
need the conditional anymore since the original issue
https://github.com/jruby/jruby/issues/7579#issuecomment-1425885324 has
been resolved and none of our releasable branches (apart from 7.17 which
uses `9.2.20.1`) specify `9.3.x.y` in `/.ruby-version`.

Therefore, this commit removes conditional setting of JRuby for
OracleLinux 7 agents in exhaustive tests (and relies on whatever
`/.ruby-version` defines).

(cherry picked from commit 07c01f8231)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>

* Improve pipeline bootstrap error logs (#16495) (#16504)

This PR adds the cause errors details on the pipeline converge state error logs

(cherry picked from commit e84fb458ce)

Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>

* Logstash Health Report Tests Buildkite pipeline setup. (#16416) (#16511)

(cherry picked from commit 5195332bc6)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* Make health report test runner script executable. (#16446) (#16512)

(cherry picked from commit 2ebf2658ff)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* Backport PR #16423 to 8.x: DLQ-ing events that trigger an conditional evaluation error. (#16493)

* DLQ-ing events that trigger an conditional evaluation error. (#16423)

When a conditional evaluation encounter an error in the expression the event that triggered the issue is sent to pipeline's DLQ, if enabled for the executing pipeline.

This PR engage with the work done in #16322, the `ConditionalEvaluationListener` that is receives notifications about if-statements evaluation failure, is improved to also send the event to DLQ (if enabled in the pipeline) and not just logging it.

(cherry picked from commit b69d993d71)

* Fixed warning about non serializable field DeadLetterQueueWriter in serializable AbstractPipelineExt

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* add deprecation log for `--event_api.tags.illegal` (#16507) (#16515)

- move `--event_api.tags.illegal` from option to deprecated_option
- add deprecation log when the flag is explicitly used
relates: #16356

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
(cherry picked from commit a4eddb8a2a)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

---------

Co-authored-by: ev1yehor <146825775+ev1yehor@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>
Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>

---------

Co-authored-by: ev1yehor <146825775+ev1yehor@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>
Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
(cherry picked from commit 7eb5185b4e)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-10-10 11:17:14 -07:00
Andrea Selva
648472106f
[test] Fix xpack test to check for http_address stats only if the webserver is enabled (#16525)
Set the 'api.enabled' setting to reflect the flag webserver_enabled and consequently test for http_address presence in settings iff the web server is enabled.
2024-10-10 18:57:34 +02:00
github-actions[bot]
dc24f02972
Fix QA failure introduced by Health API changes and update rspec dependency of the QA package. (#16521) (#16522)
* Update rspec dependency of the QA package.

* Update qa/Gemfile

Align on rspec 3.13.x

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Fix the QA test failure caused after reflecting Health Report status to the Node stats.

---------

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
(cherry picked from commit 1e5105fcd8)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-10-09 15:28:02 -07:00
kaisecheng
a4eddb8a2a
add deprecation log for --event_api.tags.illegal (#16507)
- move `--event_api.tags.illegal` from option to deprecated_option
- add deprecation log when the flag is explicitly used
relates: #16356

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-10-08 13:49:59 +01:00
João Duarte
3480c32b6e
install jdk 11 in agent for snyk 7.17 scanning (#16510) 2024-10-07 13:30:25 +01:00
Andrea Selva
5d4825f000
Avoid to access Java DeprecatedAlias value other than Ruby's one (#16506)
Update Settings to_hash method to also skip Java DeprecatedAlias and not just the Ruby one.
With PR #15679 was introduced org.logstash.settings.DeprecatedAlias which mirrors the behaviour of Ruby class Setting::DeprecatedAlias. The equality check at Logstash::Settings, as descibed in #16505 (comment), is implemented comparing the maps.
The conversion of Settings to the corresponding maps filtered out the Ruby implementation of DeprecatedAlias but not the Java one.
This PR adds also the Java one to the list of filter.
2024-10-04 16:46:00 +02:00
João Duarte
5aabeda5fd
fix snapshot branch detection for snyk (#16484)
* handle two 8. branches
2024-10-04 09:13:12 +01:00
Edmo Vamerlatti Costa
e84fb458ce
Improve pipeline bootstrap error logs (#16495)
This PR adds the cause errors details on the pipeline converge state error logs
2024-10-03 11:08:42 +02:00
Dimitrios Liappis
60670087cb
[ci] Skip slack for retries JDK matrix jobs (#16316)
With this commit we shush slack alerts for JDK matrix CI jobs that
succeed after (automatic) retries.
2024-10-03 10:29:58 +03:00
Dimitrios Liappis
07c01f8231
Don't use an older JRuby with oraclelinux-7 (#16499)
A recent PR (elastic/ci-agent-images/pull/932) modernized the VM images
and removed JRuby 9.4.5.0 and some older versions.

This ended up breaking exhaustive test on Oracle Linux 7 that hard coded
JRuby 9.4.5.0.

PR https://github.com/elastic/logstash/pull/16489 worked around the
problem by pinning to the new JRuby, but actually we don't
need the conditional anymore since the original issue
https://github.com/jruby/jruby/issues/7579#issuecomment-1425885324 has
been resolved and none of our releasable branches (apart from 7.17 which
uses `9.2.20.1`) specify `9.3.x.y` in `/.ruby-version`.

Therefore, this commit removes conditional setting of JRuby for
OracleLinux 7 agents in exhaustive tests (and relies on whatever
`/.ruby-version` defines).
2024-10-02 19:07:16 +03:00
Andrea Selva
4e49adc6f3
Fix jdk21 warnings (#16496)
Suppress some warnings compared with JDK 21

- this-escape uses this before it is completely initialised.
- avoid a non serialisable DeadLetterQueueWriter field from serialisable instance.
2024-10-02 15:28:37 +02:00
Andrea Selva
b69d993d71
DLQ-ing events that trigger an conditional evaluation error. (#16423)
When a conditional evaluation encounter an error in the expression the event that triggered the issue is sent to pipeline's DLQ, if enabled for the executing pipeline.

This PR engage with the work done in #16322, the `ConditionalEvaluationListener` that is receives notifications about if-statements evaluation failure, is improved to also send the event to DLQ (if enabled in the pipeline) and not just logging it.
2024-10-02 12:23:54 +02:00
Mashhur
fd1de39005
Use jruby-9.4.8.0 in exhaustive CIs. (#16489) 2024-10-02 09:30:22 +01:00
Andrea Selva
61de60fe26
[Spacetime] Reimplement config Setting classe in java (#15679)
Reimplement the root Ruby Setting class in Java and use it from the Ruby one moving the original Ruby class to a shell wrapping the Java instance.
In particular create a new symmetric hierarchy (at the time just for `Setting`, `Coercible` and `Boolean` classes) to the Ruby one, moving also the feature for setting deprecation. In this way the new `org.logstash.settings.Boolean` is syntactically and semantically equivalent to the old Ruby Boolean class, which replaces.
2024-10-02 09:09:47 +02:00
Edmo Vamerlatti Costa
8368c00367
Change LogStash::Util::SubstitutionVariables#replace_placeholders refine argument to optional (#16485) 2024-10-01 11:33:35 -07:00
github-actions[bot]
2fe91226eb
Release notes for 8.15.2 (#16471) (#16486)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: andsel <selva.andre@gmail.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 01dc76f3b5)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-01 13:28:26 -04:00
Andrea Selva
f35e10d792
Updated CI releases inventory after 8.15.2 (#16474) 2024-09-26 18:25:32 +02:00
João Duarte
5c57adebb9
simplify snyk scanning (#16475)
* remove docker image scanning as that's handled by infosec
* run buildkite job on a docker image instead of vm (no need to test docker any more)
2024-09-25 14:38:52 +01:00
João Duarte
51cca7320e
bump .ruby_version to jruby-9.4.8.0 (#16477) 2024-09-25 13:15:14 +01:00
kaisecheng
0ef4c7da32
[ci] fix wrong queue type in benchmark marathon (#16465) 2024-09-20 19:58:20 +01:00
Luca Belluccini
b54caf3fd8
Known issue for 8.15.1 related to env vars references (#16455) 2024-09-19 13:32:14 -04:00
kaisecheng
3e98cb1625
[CI] fix benchmark marathon (#16447)
- split main.sh to core.sh and main.sh
- rename all.sh to marathon.sh
- fix vault expiry issue for long running task
- fix unable to call main function
- update save object runtime field `release` to return true when `version` contains "SNAPSHOT"
2024-09-17 22:29:02 +01:00
Mashhur
7c64c7394b
Fixes the issue where LS wipes out all quotes from docker env variables. (#16456)
* Fixes the issue where LS wipes out all quotes from docker env variables. This is an issue when running LS on docker with CONFIG_STRING, needs to keep quotes with env variable.

* Add a docker acceptance integration test.
2024-09-17 06:46:19 -07:00
kaisecheng
4e82655cd5
remove ingest-converter (#16453)
Removed the tool Ingest Converter
2024-09-16 15:57:51 +01:00
Andrea Selva
1ec37b7c41
Drop JDK 11 support (#16443)
If a user runs Logstash with a hosted JDK and not the one bundled with Logstash distribution, like setting a specific LS_JAVA_HOME, which is minor than JDK 17 then Logstash refuses to start. Has to provide at least a JDK 17 or unset the LS_JAVA_HOME and let Logstash uses the bundled JDK.

Updates the jvm.options and JvmOptionsParser to remove support for JDK 11. If the options parser identifies that the running JVM is less than 17, it refuses to start.

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-09-13 17:33:16 +02:00
Mashhur
2ebf2658ff
Make health report test runner script executable. (#16446) 2024-09-12 13:24:53 -07:00
kaisecheng
5452cccf76
[CI] benchmark dashboard and pipeline for testing against multiple versions (#16421)
- add becnhmark dashboard and related save objects
- add one buildkite pipeline to test against multiple versions
- remove null field in json
- add `FLOG_FILE_CNT`, `VAULT_PATH`, `TAGS`
2024-09-12 19:45:23 +01:00
Mashhur
5195332bc6
Logstash Health Report Tests Buildkite pipeline setup. (#16416) 2024-09-10 11:14:14 -07:00
kaisecheng
701108f88b
update ci release 7.17.24 (#16439) 2024-09-10 12:20:50 +01:00
João Duarte
17dba9f829
account for the 8.x in DRA publishing task (#16436)
the current DRA publishing task computes the branch from the version
contained in the version.yml

This is done by taking the major.minor and confirming that a branch
exists with that name.

However this pattern won't be applicable for 8.x, as that branch
currently points to 8.16.0 and there is no 8.16 branch.

This commit falls back to reading the buildkite injected
BUILDKITE_BRANCH variable.
2024-09-10 10:55:34 +01:00
João Duarte
f60e987173
bump to 9.0.0 and adapt CI accordingly (#16428) 2024-09-09 13:46:00 +01:00
João Duarte
69f0fa54ca
use gnu tar compatible minitar to generate tar artifact (#16432)
Using VERSION_QUALIFIER when building the tarball distribution will fail since Ruby's TarWriter implements the older POSIX88 version of tar and paths will be longer than 100 characters.

For the long paths being used in Logstash's plugins, mainly due to nested folders from jar-dependencies, we need the tarball to follow either the 2001 ustar format or gnu tar, which is implemented by the minitar gem.
2024-09-09 11:33:44 +01:00
Andrea Selva
bb7ecc203f
Fix ConditionalEvaluationError to do not include the event that errored in its serialiaxed form, because it's not expected that this class is ever serialized. (#16429)
Make inner field of ConditionalEvaluationError transient to be avoided during serialization.
2024-09-06 12:09:58 +02:00
github-actions[bot]
58b6a0ac77
Release notes for 8.15.1 (#16405) (#16427)
* Update release notes for 8.15.1

* update release note

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
(cherry picked from commit 2fca7e39e8)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-05 17:12:58 +01:00
kaisecheng
285d13a515
Update logstash_releases.json (#16426) 2024-09-05 17:10:52 +01:00
Andrea Selva
b88e23702c
Implements safe evaluation of conditional expressions, logging the error without killing the pipeline (#16322)
This PR protects the if statements against expression evaluation errors, cancel the event under processing and log it.
This avoids to crash the pipeline which encounter a runtime error during event condition evaluation, permitting to debug the root cause reporting the offending event and removing from the current processing batch.

Translates the `org.jruby.exceptions.TypeError`, `IllegalArgumentException`, `org.jruby.exceptions.ArgumentError` that could happen during `EventCodition` evaluation into a custom `ConditionalEvaluationError` which bubbles up on AST tree nodes. It's catched in the `SplitDataset` node.
Updates the generation of the `SplitDataset `so that the execution of `filterEvents` method inside the compute body is try-catch guarded and defer the execution to an instance of `AbstractPipelineExt.ConditionalEvaluationListener` to handle such error. In this particular case the error management consist in just logging the offending Event.


---------

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-09-05 10:57:10 +02:00
Andrea Selva
ac034a14ee
Generate Dataset code with meaningful fields names (#16386)
This PR is intended to help Logstash developers or users that want to better understand the code that's autogenerated to model a pipeline, assigning more meaningful names to the Datasets subclasses' fields.

Updates `FieldDefinition` to receive the name of the field from construction methods, so that it can be used during the code generation phase, instead of the existing incremental `field%n`.
Updates `ClassFields` to propagate the explicit field name down to the `FieldDefinitions`.
Update the `DatasetCompiler` that add fields to `ClassFields` to assign a proper name to generated Dataset's fields.
2024-09-04 11:10:29 +02:00
kaisecheng
6e93b30c7f
Increase Jruby -Xmx to avoid OOM during zip task in DRA (#16408)
Fix: #16406
2024-08-28 11:10:21 +01:00
Mashhur
b2796afc92
Removing 8.14 from ci/branches.json as we have 8.15. (#16390) 2024-08-19 12:49:34 -07:00
Karen Metts
d4519711a6
Doc: Forwardport 8.15.0 release notes to main (#16388) 2024-08-14 09:00:37 -04:00
Mashhur
e104704830
Exclude substitution refinement on pipelines.yml (#16375)
* Exclude substitution refinement on pipelines.yml (applies on ENV vars and logstash.yml where env2yaml saves vars)

* Safety integration test for pipeline config.string contains ENV .
2024-08-09 09:33:01 -07:00
Ry Biesemeyer
3d13ebe33e
deprecate java less-than 17 (#16370) 2024-08-09 08:58:11 +01:00
Karen Metts
2db2a224ed
Doc: Add SNMP integration to breaking changes (#16374) 2024-08-08 11:06:48 -04:00
Mashhur
62ef8a0847
[Bugfix] Resolve the array and char (single | double quote) escaped values of ${ENV} (#16365)
* Properly resolve the values from ENV vars if literal array string provided with ENV var.

* Docker acceptance test for persisting  keys and use actual values in docker container.

* Review suggestion.

Simplify the code by stripping whitespace before `gsub`, no need to check comma and split.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-08-06 11:09:26 -07:00
Andrea Selva
09a2827802
Update logstash_releases.json (#16347) 2024-07-30 16:17:10 +01:00
João Duarte
03841cace3
Fix 8.13.1 release notes (#16363)
make a note of the fix that went to 8.13.1: #16026

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-07-30 09:19:13 +01:00
João Duarte
629d8fe5a8
add retries to snyk buildkite job (#16343) 2024-07-29 12:00:43 +01:00
João Duarte
90f303e401
fix line used to determine ES is up (#16349) 2024-07-24 16:48:42 +02:00
Ry Biesemeyer
c633ad2568
settings: add support for observing settings after post-process hooks (#16339)
Because logging configuration occurs after loading the `logstash.yml`
settings, deprecation logs from `LogStash::Settings::DeprecatedAlias#set` are
effectively emitted to a null logger and lost.

By re-emitting after the post-process hooks, we can ensure that they make
their way to the deprecation log. This change adds support for any setting
that responds to `Object#observe_post_process` to receive it after all
post-processing hooks have been executed.

Resolves: elastic/logstash#16332
2024-07-24 10:22:34 +01:00
Karen Metts
eff9b540df
Doc: Reposition worker-utilization in doc (#16335) 2024-07-19 12:34:42 -04:00
João Duarte
8f2dae618c
correctly handle stack overflow errors during pipeline compilation (#16323)
This commit improves error handling when pipelines that are too big hit the Xss limit and throw a StackOverflowError. Currently the exception is printed outside of the logger, and doesn’t even show if log.format is json, leaving the user to wonder what happened.

A couple of thoughts on the way this is implemented:

* There should be a first barrier to handle pipelines that are too large based on the PipelineIR compilation. The barrier would use the detection of Xss to determine how big a pipeline could be. This however doesn't reduce the need to still handle a StackOverflow if it happens.
* The catching of StackOverflowError could also be done on the WorkerLoop. However I'd suggest that this is unrelated to the Worker initialization itself, it just so happens that compiledPipeline.buildExecution is computed inside the WorkerLoop class for performance reasons. So I'd prefer logging to not come from the existing catch, but from a dedicated catch clause.

Solves #16320
2024-07-18 10:08:38 +01:00
João Duarte
c30aa1c7f5
regenerate webserver test certificates (#16331) 2024-07-17 10:43:57 +01:00
ev1yehor
e065088cd8
Add GH vault plugin bot to allowed list (#16301) 2024-07-16 14:38:56 +03:00
github-actions[bot]
758098cdcd
Release notes for 8.14.3 (#16312) (#16318)
* Update release notes for 8.14.3

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit a60c7cb95e)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-11 18:12:35 +02:00
Andrea Selva
01b08c7640
Update logstash_releases.json after 8.14.3 (#16306) 2024-07-11 18:10:59 +02:00
Karen Metts
9c6550a0df
Doc: Update headers for plugins (LSR) (#16277) 2024-07-10 11:22:46 -04:00
Dimitrios Liappis
f728c44a0a
Remove Debian 10 from CI (#16300)
This commit removes Debian 10 (Buster) which is EOL
since July 1 2024[^1] from CI.

Relates https://github.com/elastic/ingest-dev/issues/2872
2024-07-10 15:17:10 +03:00
Ry Biesemeyer
66aeeeef83
Json normalization performance (#16313)
* licenses: allow elv2, standard abbreviation for Elastic License version 2

* json-dump: reduce unicode normalization cost

Since the underlying JrJackson now properly (and efficiently) encodes the
UTF-8 transcode of whichever strings it is given, we no longer need to
pre-normalize to UTF-8 in ruby _except_ when the string is flagged as BINARY
because we have alternate behaviour to preserve valid UTF-8 sequences.

By emitting a _copy_ of binary-flagged strings that have been re-flagged as
UTF-8, we allow the downstream (efficient) encoding operation in jrjackson
to produce equivalent behaviour at much lower cost.

* cleanup: remove orphan unicode normalizer
2024-07-09 14:12:21 -07:00
kaisecheng
2404bad9a9
[CI] fix benchmark to pull snapshot version (#16308)
- fixes the CI benchmark script to always runs against the latest snapshot version
- uses `/v1/versions/$VERSION/builds/latest` to get the latest build id

Fixes: #16307

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-07-08 22:20:59 +01:00
Dimitrios Liappis
ea0c16870f
Add Ubuntu 24.04 to CI (#16299)
Now that we have custom VM images for Ubuntu 24.04, this commit adds
CI for Ubuntu 24.04.

This is a revert of #16279
2024-07-08 14:43:55 +03:00
Dimitrios Liappis
db06ec415a
Remove CentOS 7 from CI (#16293)
CentOS 7 is EOL since June 30 2024[^1]. All repositories and mirrors are
now unreachable.

This commit removes CentOS 7 from CI jobs using it.

Relates https://github.com/elastic/ingest-dev/issues/3520

[^1]: https://www.redhat.com/en/topics/linux/centos-linux-eol
2024-07-04 14:13:16 +03:00
Ry Biesemeyer
a63d8a831d
bump ci releases for 8.14.2 (#16287) 2024-07-04 10:08:22 +01:00
Ry Biesemeyer
b51b5392e1
Release notes for 8.14.2 (#16266) (#16286)
---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-07-04 09:11:46 +01:00
Ry Biesemeyer
e3271db946
add flow-informed tuning guidance (#16265)
* docs: sentence-case headings

* docs-style: one-line-per-sentence asciidoc convention

* docs: add flow-informed tuning guidance

* docs: clarify `pipeline.batch.delay`

* Apply suggestions from code review

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* Update docs/static/performance-checklist.asciidoc

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-07-03 15:33:37 -07:00
João Duarte
9872159c71
bump version to 8.16.0 (#16281) 2024-07-03 13:08:59 +01:00
João Duarte
83506eabe7
add 8.15 and remove 8.13 from CI testing (#16282) 2024-07-03 13:08:50 +01:00
João Duarte
121b1c9632
update jruby to 9.4.8.0 (#16278)
https://www.jruby.org/2024/07/02/jruby-9-4-8-0.html

> Fixed a bug in the bytecode JIT causing patterns to execute incorrect branches. #8283, #8284
> jruby-openssl is updated to 0.15.0, with updated Bouncy Castle libraries to avoid CVEs in older versions.
> uri is updated to 0.12.2, mitigating CVE
> net-ftp is updated to 0.3.7 with restored functionality on JRuby.

Exhaustive test suite: https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/580
2024-07-02 19:57:55 +01:00
João Duarte
a046d3f273
Revert "add ubuntu 24.04 to CI (#16263)" (#16279)
This reverts commit a0bcd61ad3.
2024-07-02 17:45:50 +01:00
João Duarte
a0bcd61ad3
add ubuntu 24.04 to CI (#16263) 2024-07-02 14:34:58 +01:00
Dimitrios Liappis
7080ec5427
Add retries to aarch64 CI pipeline (#16271)
Add retries in the aarch64 CI pipeline to reduce noise from transient
network failures.

Closes https://github.com/elastic/ingest-dev/issues/3510
2024-07-01 12:49:26 +03:00
Karen Metts
095733c409
Doc: Add ecs and datastream requirement for intg filter (#16268) 2024-06-28 19:25:39 -04:00
Edmo Vamerlatti Costa
784fa186c8
Ensure pipeline metrics are cleared on the pipeline shutdown (#16264)
This commit fixed the configuration reload process to clean up the pipeline's metric store, so it does not retain references to failed pipelines components.
2024-06-28 13:13:39 +02:00
Mashhur
0cfe6b0801
Add RubyEvent#dup support and unit test case to keep Json#dump(Event) safe. (#16255)
* Add RubyEvent#dup support and unit test case to keep Json#dump(Event) safe.


Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>

---------

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2024-06-27 13:08:56 -07:00
João Duarte
0e1d67eda9
produce wolfi docker image in ci (#16252) 2024-06-26 13:50:47 +01:00
Alex S
bc0b9556bd
Add quotes to fix path handling in pqcheck.bat (#16205) 2024-06-26 11:05:17 +01:00
Mashhur
e6682c94b9
Pin fileutils version to 1.7+ (#16250)
* Pin fileutils version to 1.7+

* Add fileutils license notice.
2024-06-25 12:14:09 -07:00
Ry Biesemeyer
0ec16ca398
Unicode pipeline and plugin ids (#15971)
* fix: restore support for unicode pipeline- and plugin-id's

JRuby's `Ruby#newSymbol(String)` throws an exception when provided a `String`
that contains characters outside of lower-ASCII because JRuby internals expect
"the incoming String to be one of our mangled ISO-8859-1 strings" as noted in
a comment on jruby/jruby#6217.

Instead, we use `Ruby#newString(String)` to create a new `RubyString` (which
works properly), and then rely on `RubyString#intern` to get our `RubySymbol`.

This fixes a regression introduced in the 8.7 series in which pipeline id's
are consistently represented as ruby symbols in the metrics store, and ensures
similar issue does not exist when specifying a plugin id that contains
characters above the lower-ASCII plane.

* fix: use properly-encoded RubySymbol in PipelineConfig

We cannot rely on `RubySymbol#toString` to produce a properly-encoded `String`
whe the string contains characters above the lower-ASCII plane because the
result is effectively a binary ruby-internal marshal of the bytes that only
holds when the symbol contains lower-ASCII.

Instead, we can use the internally-memoizing `RubySymbol#name` to get a
properly-encoded `RubyString`, and `RubyString#asJavaString()` to get a
properly-encoded java-`String`.

* fix: properly serialize unicode pipeline names in API output

Jackson's JSON serializer leaks the JRuby-internal byte structure of Symbols,
which only aligns with the byte-structure of the symbol's actual string when
that string is wholly-comprised of lower-ASCII characters.

By pre-converting Symbols to Strings, we ensure that the result is readable
and useful.

* spec: bypass monitoring specs for unicode pipeline ids when PQ enabled
2024-06-25 08:35:28 -07:00
kaisecheng
440aa98e48
[CI] Benchmark pipeline (#16191)
Add a buildkite pipeline to do benchmark.
The script does benchmark by running Filebeats (docker) -> Logstash (docker) -> ES Cloud.
Logstash metrics and benchmark results are sent to the same ES Cloud.
- Secrets store in vault `secret/ci/elastic-logstash/benchmark`
- Use flog (docker) to generate ~2GB logs
- Pull the snapshot docker image of the main branch every day
- Logstash runs two pipelines, main and node_stats
  - The main pipeline handles beats ingestion, sending data to the data stream `logs-generic-default`
    - It runs for all combinations. (pq + mq) x worker x batch size
    - Each test runs for ~7 minutes
  - The node_stats pipeline retrieves /_node/stats API every 30s and sends it to the data stream `metrics-nodestats-logstash`
- The script sends a summary of EPS and resource usage to index `benchmark_summary`

The buildkite pipeline accepts ENV variables to customize the test
| Variable Name   | Default Value       | Comment                                            |
|-----------------|---------------------|----------------------------------------------------|
| FB_VERSION      | 8.13.4              | docker tag                                         |
| LS_VERSION      |                     | docker tag                                         |
| LS_JAVA_OPTS    | -Xmx2g              | by default, Xmx is set to half of memory           |
| MULTIPLIERS     | 2,4,6               | determine the number of workers (cpu * multiplier) |
| BATCH_SIZES     | 125,1000            |                                                    |
| CPU             | 4                   | number of cpu for Logstash container               |
| MEM             | 4                   | number of GB for Logstash container                |
| QTYPE           | memory              | queue type to test -- persisted; memory; all       |
| FB_CNT          | 4                   | number of filebeats to use in benchmark            |

To check the result
- `vault read secret/ci/elastic-logstash/benchmark` to get the host and credentials
- `curl -u "$ES_USER:$ES_PW" "$ES_HOST/benchmark_summary/_search"`

Fixes: https://github.com/elastic/ingest-dev/issues/3377
2024-06-21 22:48:34 +01:00
Ry Biesemeyer
92909cb1c4
json: remove unnecessary dup/freeze in serialization (#16213) 2024-06-20 09:15:49 -07:00
github-actions[bot]
ca1403009c
Forwardport PR #16212 to main: Release notes for 8.14.1 (#16214)
* Release notes for 8.14.1 (#16212)

* Update release notes for 8.14.1

* Snip generated context

* Manually fill release notes for Elastic Integration filter

* Reword release notes from core to be user-centric

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
(cherry picked from commit f9d6b42a7e)

* add known-issue note to 8.14.0

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2024-06-20 08:56:38 -07:00
Andrea Selva
321e407e53
Avoid to log file not found errors when DLQ segments are removed concurrently between writer and reader. (#16204)
* Rework the logic to delete DLQ eldest segments to be more resilient on file not found errors and avoid to log warn messages that there isn't any action the user can do to solve.

* Fixed test case, when path point to a file that doesn't exist, rely always on path name comparator. Reworked the code to simplify, not needing anymore the tri-state variable
2024-06-20 08:52:19 -07:00
Andrea Selva
ed930f820d
Avoid mocking the value returned in global SETTINGS constant. (#16245)
This a refactoring of test fixture.
Avoid mocking the value returned in global SETTINGS constant. Use instead the local setting map instance used in subject creation.
2024-06-20 14:25:53 +02:00
ev1yehor
0d385a9611
Update pull-requests.json (#16220) 2024-06-20 13:52:35 +03:00
João Duarte
13a8c4f1ae
remove version pinning from rexml (#16224) 2024-06-19 13:27:15 +01:00
Ry Biesemeyer
801f0f441e
Geoip database management cache invalidation (#16222)
* geoip: failing specs demonstrating elastic/logstash#16221

* geoip: invalidate cached db state when receiving updates/expiries
2024-06-18 15:11:25 -07:00
João Duarte
1484614405
Wolfi-based image flavor (#16189)
* Add wolfi as an option to the build process
* Add docker acceptance tests for the wolfi image
* Change how tests are done on the java process, due to "ps -C" not being available on wolfi

replaces and closes https://github.com/elastic/logstash/pull/16116

Co-authored-by: Andres Rodriguez <andreserl@gmail.com>
2024-06-17 15:48:02 +01:00
Ry Biesemeyer
0f6fa5c8fb
p2p: adds opt-in pipeline bus with less synchronization (#16194)
* p2p: extract interface from v1 pipeline bus

* p2p: extract pipeline push to abstract

* p2p: add opt-in unblocked "v2" implementation

Adds a v2 implementation that does not synchronize on the sender so that
multiple workers can send events through a common `pipeline` output instance
simultaneously.

In this implementation, an `AddressStateMapping` provides synchronized
mutation and cleanup of the underlying `AddressState`, and allows only
queryable mutable views (`AddressState.ReadOnly`) to escape encapsulation.

The implementation also holds indentity-keyed mapping from `PipelineOutput`s
to the set of `AddressState.ReadOnly`s it is regested as a sender for so
that they can be quickly resolved at runtime.

* p2p: more tests for pipeline restart behaviour

* p2p: make v2 pipeline bus the default
2024-06-17 07:35:54 -07:00
Andrea Selva
fab345881a
Introduce filesystem signalling from DLQ read to writer to update byte size metric accordingly when the reader uses clean_consumed (#16195)
Updates the DLQ reader to create a notification file (`.deleted_segment`) which signal when a segment is deleted in consequence of `clean_consumed` set. Updates the DLQ writer to have a filesystem watch so that can receive the reader's signal and update the exposed metric,  loading the size by listing FS segments occupation.
2024-06-17 14:27:39 +02:00
Mashhur
948a0edf1a
Logstash monitoring doc improvements. (#16208)
* Logstash monitoring doc improvements.

---------

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-06-13 09:08:08 -07:00
João Duarte
7f424c1f5d
Update logstash_releases.json to account for 7.17.22 (#16185)
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-06-13 17:35:06 +02:00
Edmo Vamerlatti Costa
881f7605f1
Bump logstash-releases.json after 8.14.1 release (#16217) 2024-06-12 08:53:41 -07:00
Edmo Vamerlatti Costa
23221caddb
Pin rexml gem version to 3.2.6 (#16209)
This commit pinned the `rexml` gem version to `3.2.6`
2024-06-10 17:56:37 +02:00
Andrea Selva
efa83787a5
Revert PR #16050
The PR was created to skip resolving environment variable references in comments present in the “config.string” pipelines defined in the pipelines.yml file.
However it introduced a bug that no longer resolves env var references in values of settings like pipeline.batch.size or queue.max_bytes.
For now we’ll revert this PR and create a fix that handles both problems.
2024-06-06 20:24:45 +01:00
github-actions[bot]
70d0f1d022
Release notes for 8.14.0 (#16155) (#16198)
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 78fb379282)
2024-06-05 13:11:15 -04:00
Rob Bavey
14afa851de
Bump logstash-releases.json after 8.14.0 release (#16197) 2024-06-05 09:15:44 -04:00
Andrea Selva
5c7d416798
Update log4j rollover to configure time retention (#16179)
Updates the plain, json and pipeline appenders in default config/log4j2.properties to define a delete rule executed during the rollover strategy, which deletes compressed log archives older than 7 days.
Updates the documentation that describe the logging configuration to explain how the rollover file works, how to configure the strategy, in particular how to update to setup space limitation condition on the rollover.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-06-05 09:56:35 +02:00
Edmo Vamerlatti Costa
d0606ff098
Bundle logstash-integration-snmp and remove input-snmp and input-snmptrap as default (#16180)
This commit bundled the logstash-integration-snmp plugin and removed logstash-input-snmp and logstash-input-snmptrap (#16180)
2024-06-03 10:44:26 +02:00
Karen Metts
e2acb4d6bd
Add incomplete integration plugins to metadata.json as skip (#16174) 2024-05-31 11:44:58 -04:00
kaisecheng
1d4038b27f
Add initial buildkite pipeline for Benchmark (#16190)
skeleton pipeline for benchmark
2024-05-31 15:17:50 +01:00
João Duarte
2a7f059754
Upgrade jrjackson to 0.4.20 (#16153)
* Upgrade jrjackson to 0.4.19

* Update versions.yml
2024-05-22 08:56:09 -07:00
Ry Biesemeyer
ea930861ef
PQ: avoid blocking writer when precisely full (#16176)
* pq: avoid blocking writer when queue is precisely full

A PQ is considered full (and therefore needs to block before releasing the
writer) when its persisted size on disk _exceeds_ its `queue.max_bytes`
capacity.

This removes an edge-case preemptive block when the persisted size after
writing an event _meets_ its `queue.max_bytes` precisely AND its current
head page has insufficient room to also accept a hypothetical future event.

Fixes: elastic/logstash#16172

* docs: PQ `queue.max_bytes` cannot be less than `queue.page_capacity`
2024-05-22 08:23:18 -07:00
Mashhur
d0bdc33fac
Regenerate dependencies report and add strscan. (#16169)
* Regenerate dependencies report and add strscan.

* Apply suggestions from code review

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

* Rename strscan notice file.

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-05-17 08:10:03 -07:00
Karen Metts
73fb21b4ac
Update plugins-metadata.json (#16137) 2024-05-17 10:17:20 -04:00
Mashhur
979d30d701
Handle non-unicode payload in Logstash. (#16072)
* A logic to handle non-unicode payload in Logstash.

* Well tested and code organized version of the logic.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Upgrade jrjackson to 0.4.20

* Code review: simplify the logic with a standard String#encode interface with replace option.

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>

---------

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2024-05-16 10:42:06 -07:00
Luca Belluccini
53d9480176
[DOC] Remove reference to puppet LS module (#12356)
As the module is not maintained since 2018 and it was community supported, I would like to remove it from the documentation.
2024-05-16 13:36:52 -04:00
Mashhur
439fbebe2d
Update catalog-info.yaml to properly define dependencies type. (#16163) 2024-05-15 09:35:02 -07:00
Andrea Selva
977ef89a7d
Updated to 21.0.3+9 (#16055)
Updated bundled JDK to 21
2024-05-15 18:29:58 +02:00
Andres Rodriguez
f781578c3e
Update catalog-info.yaml (#16161)
Add lifecycle option
2024-05-14 10:45:43 -04:00
Mashhur
734405dcbe
Replace stack traces with logger in DSL. (#16159) 2024-05-13 13:45:56 -07:00
Andrea Selva
2eebfd8f0e
Adds section to describe intended usage of pipeline.buffer.type (#16083)
Adds section to describe the intended usage of and impact on memory sizing.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-05-13 12:27:57 +02:00
Andrea Selva
8e8a5b08d1
Updated target and source Java definitions in build.gradle becuase deprecated and planned for removal in next major (#16156)
Updated target and source Java definitions in build.gradle because deprecated and planned for removal in next major.
2024-05-10 09:14:25 +02:00
Andrea Selva
1e431b47c3
Update releases inventory after 8.13.4 (#16147) 2024-05-10 09:13:06 +02:00
Andres Rodriguez
21148f160e
Set correct pipeline ownership (#16149)
Set correct buildkite pipeline ownership.
2024-05-09 09:46:21 -04:00
Jonas L. B
0d6ba8d1bd
Allow comments in hashes and before EOF (#16058)
In the grammar definitions for hashes, `whitespace` was replaced with `cs` to allow either whitespace _or_ comments. 
Additionally, the grammar definition for comments was previously required to end with a newline, now it can end with a newline _or_ EOF, using the "not anything" treetop rule `!.`.

Co-authored-by: Jonas Lundholm Bertelsen <jonas.lundholm.bertelsen@beumer.com>
2024-05-08 14:07:26 +02:00
João Duarte
3068934c6f
upgrade java_input_example to 1.0.3 (#16152)
follow up to logstash-plugins/logstash-input-java_input_example@090142d
2024-05-08 13:05:42 +01:00
João Duarte
0d6117173f
update multiple dependencies (#16136)
This upgrades multiple java libraries:

* snakeyaml
* shadow
* gradle
* guava
* commons-io
* commons-logging
* commons-codec
* commons-compress
* commons-lang3
* commons-csv
* log4j
* google-java-format
* httpclient
* httpcore
* javassist
* jackson
* jackson-databind
* wiremock-standalone

Gems:

* rack
*sinatra
*octokit
* gems
* rake
* webmock

Also upgrades Java to 17.0.11+9.

Leftover upgrades:

* commons-csv 1.8 breaks license checker
* janino 3.1.12 breaks java tests
* log4j 2.21.0 breaks java compilation
2024-05-08 09:13:41 +01:00
github-actions[bot]
001fea6431
Release notes for 8.13.4 (#16144) (#16150)
Refined release notes for 8.13.4

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: andsel <selva.andre@gmail.com>
(cherry picked from commit 49a65324a8)
2024-05-07 18:07:30 -04:00
João Duarte
6dd2770058
remove unused root Dockerfiles (#16140) 2024-05-07 17:49:47 +01:00
Ry Biesemeyer
9e452d2e54
Update junit 4 13 (#16138)
* test-deps: update junit to latest 4.13

* test-deps: address deprecation of ExpectedException

* test-deps: use org.junit.Assert.assertThrows
2024-05-03 13:49:16 -07:00
João Duarte
973c2ba3aa
force ruby-maven-libs constraint to >= 3.9.6.1 (#16130) 2024-05-02 20:56:32 +01:00
kaisecheng
359a24a3ef
Release notes for 8.13.3 (#16108) (#16128)
* Update release notes for 8.13.3

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-05-02 15:16:56 +01:00
kaisecheng
bf8846d4ae
Update logstash_releases.json (#16123) 2024-05-02 11:45:06 +01:00
João Duarte
4350855e7b
upgrade jruby to 9.4.7.0 (#16125) 2024-05-02 09:59:04 +01:00
Andrea Selva
830733d758
Provide opt-in flag to avoid fields name clash when log format is json (#15969)
Adds log.format.json.fix_duplicate_message_fields feature flag to rename the clashing fields when json logging format (log.format) is selected.
In case two message fields clashes on structured log message, then the second is renamed attaching _1 suffix to the field name.
By default the feature is disabled and requires user to explicitly enable the behaviour.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2024-04-17 16:37:05 +02:00
kaisecheng
6bf1f80a82
bump version to 8.15.0 (#16088) 2024-04-17 09:16:10 +01:00
kaisecheng
f4d33cb904
add 8.14 branch for ci (#16086) 2024-04-17 09:15:58 +01:00
Karen Metts
cb45cd28cc
Doc: Remove include statements for screenshots not rendering properly (#15981) 2024-04-16 17:24:58 -04:00
Rob Bavey
b9b9ad9395
Use dpkg --print-architecture in Dockerfile to ascertain architecture (#16076)
* Use `dpkg --print-architecture` in Dockerfile to ascertain architecture
2024-04-12 15:47:34 -04:00
Andrea Selva
cc1eca904e
Split LS_JAVA_OPTS content when contains multiple options (#16079)
Bugfix to parse correctly Java options when the environment variable LS_JAVA_OPTS contains multiple definitions separated by space character.

Adapt the parsing of `LS_JAVA_OPTS` environment variable to split by space various definitions it can contains.
2024-04-12 15:18:29 +02:00
Mashhur
9483ee04c6
Fix the exception behavior when config.string contains ${VAR} in the comments. (#16050)
* Wipe out comment lines if config comment contains.

* Remove substitution var process when loading the YAML, instead align on the generic approach which LSCL happens during the pipeline compile.

* Update logstash-core/src/main/java/org/logstash/config/ir/PipelineConfig.java

Put the logging config back as it is being used with composed configs.
2024-04-11 07:32:28 -07:00
kaisecheng
84886ac4be
remove 8.12 from CI (#16077) 2024-04-11 12:56:29 +01:00
Andrea Selva
afa646fbcb
Introduce a new setting to give preference to Java heap or direct space buffer allocation type (#16054)
Introduce a new setting named `pipeline.buffer.type` which could be valued direct or heap to enable the allocation on Java heap.
The processing of the setting is done in `LogStash::Runner#execute` and sets the Java properties considered by Netty to disable the direct allocation: `io.netty.noPreferDirect`.
However, if that system property is already configured explicitly by the user (because set in `jvm.options`or `LS_JAVA_OPTS`) the setting doesn't take place and warning log is reported, respecting the user's will.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-04-10 15:23:47 +02:00
github-actions[bot]
2ec54b42e2
Release notes for 8.13.2 (#16068) (#16071)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 2bef137dc4)
2024-04-08 12:23:34 -04:00
Mashhur
4a379be6d5
Fix the git branch check for snyk bk jobs (#16062)
* Replace 'git show-ref' with 'git rev-parse' to fix the issue where show-ref is not working as expected.
* Use git checkout instead 'git rev-parse'.
* Apply prune dependencies recommended for big projects (like we have multi gradle projects) by Snyk.
* Apply prune repeated dependency option directly to snyk monitor.
* Avoid the exit, continue scanning to the end.
* Remove the debugging.
2024-04-08 11:34:26 +01:00
Rob Bavey
e5b2b3d92b
Update Dockerfile to select appropriate architecture on build box (#16053)
This commit adds logic to copy the appropriate env2yaml file to the Docker image
* Clean up env2yaml folder

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-04-04 18:15:54 -04:00
Andrea Selva
6eb99437e4
Update releases inventory after 8.13.1 (#16048) 2024-04-04 10:39:17 +02:00
Andrea Selva
6a04854e4c
JDK 21 move (#15719)
Adaptations to run Logstash on JDK 21:

- Java 8 support is obsolete and will be removed.
- Thread's `getId` (not final) replaced by final `threadId` https://bugs.openjdk.org/browse/JDK-8017617
- Verify the warnings "this-escape" when a constructor use other method or pass around `this` reference to other methods https://bugs.openjdk.org/browse/JDK-8015831
- URL constructor is deprecated, use `<uri_instance>.toURL()` (since JDK 20)
-  Manages new (since JDK 20) `G1 Concurrent GC` MX Bean, [ref](https://github.com/elastic/logstash/pull/15719#issuecomment-1946367785)
2024-04-03 17:08:12 +02:00
github-actions[bot]
327fbe134a
Release notes for 8.13.1 (#16046) (#16049)
Forward port release notes for 8.13.1 on main
2024-04-02 08:59:18 +02:00
Mashhur
dd1f6dd160
Fix integration tests caused by #16026. (#16038) 2024-03-28 09:08:00 -07:00
João Duarte
f6940f5a34
Update critical_vulnerability_scan.yml (#16039)
Change trigger from pull_request_target to pull_request, as the former uses the base branch instead of the PR source code.
This allows simplification of the checkout action (also took the opportunity to bump from v2 to v4).
2024-03-28 15:03:07 +00:00
kaisecheng
a7779664af
Modernize ironbank Dockerfile (#16022)
- remove golang assets (go1.17.8.linux-amd64.tar.gz)
- remove yaml lib assets (v2.3.0.tar.gz)
- use go container to build env2yaml
- remove unnecessary layers
- remove HEALTHCHECK
- switch yum to dnf

Fixes: elastic/ingest-dev#3008
2024-03-28 11:15:01 +00:00
Mashhur
e429795039
Save name came through ENV vars to let Logstash decide using value from either keystore or ENV. (#16026)
* Save  name came through ENV vars to let Logstash decide using either keystore or ENV value.

* Apply suggestions from code review to simplify array declaration.

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-03-27 09:22:27 -07:00
João Duarte
e8597cbb77
Introduce vulnerability scanner that fails PRs on critical vulnerabilities (#16028)
This github action leverages https://github.com/anchore/grype to scan a tarball artifact
2024-03-27 16:04:50 +00:00
João Duarte
96e4838e43
Fix exclusion of old ruby-maven-libs 3.3.9 jars (#16032) 2024-03-27 14:40:03 +00:00
Karen Metts
36b7cb8ab3
Doc: Remove beta tag from integrations filter doc (#16021) 2024-03-26 12:22:08 -04:00
Andrea Selva
c4bd54de58
Update releases inventory after 7.17.19 (#16024) 2024-03-26 15:53:34 +01:00
kaisecheng
716c33f4b5
update ci release for 8.13.0 (#16030) 2024-03-26 10:53:44 +00:00
github-actions[bot]
bae6210c21
Release notes for 8.13.0 (#15978) (#16027)
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 270c8ca110)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 09:22:00 +00:00
João Duarte
59bd376360
upgrade ruby-maven-libs to 3.8.9 (#15894)
Given that JRuby comes with ruby-maven-libs 3.3.9 this commit upgrades the gem to 3.8.9 and ensures files from 3.3.9 are not included in the distribution.
2024-03-18 14:30:13 +01:00
carrychair
d1e624b81c
remove repetitions of "the" word (#15987)
Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-17 10:53:59 +00:00
Karen Metts
92b20bc184
Doc: Remove extra + to force page regen (#16000) 2024-03-12 11:27:07 -04:00
Rob Bavey
32052a263f
Remove curl installation step, as curl-minimal is already provided in ubi9 (#15998) 2024-03-12 09:50:52 -04:00
João Duarte
43614ede50
ensure order of jvm options from file and env vars is respected (#15997)
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-03-12 09:18:35 +00:00
Ry Biesemeyer
483059e378
geoip: avoid crash cleaning non-existing managed dbs (#15986)
* geoip: avoid crash cleaning non-existing managed dbs

* Update x-pack/spec/geoip_database_management/manager_spec.rb

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-03-11 11:56:51 -07:00
Dimitrios Liappis
c0c213d17e
Split java/ruby unit test steps on Windows (#15888)
As a follow up to #15861 this commit splits the current unit tests step
for the Windows JDK matrix pipeline to two that run
Java and Ruby unit tests separately.

Closes https://github.com/elastic/logstash/issues/15566
2024-03-11 09:27:11 +02:00
Rob Bavey
b640e7e851
Add arm64 support for env2yaml (#15980)
* Add arm64 support for env2yaml

This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: #15913

* Add env2yaml executables to build context

* Split `COPY_FILES` for readability

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-03-08 10:47:01 -05:00
Mashhur
dec53ba325
Imap plugin is no anymore default plugin. (#15425) 2024-03-08 07:25:46 -08:00
Mashhur
19637143e6
Fix the Bootstrap check test failure on Windows. (#15975) 2024-03-06 10:10:35 -08:00
github-actions[bot]
3070a637cf
Release notes for 8.12.2 (#15956) (#15972)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 2c89bcfc7b)
2024-02-23 08:30:20 -05:00
Andrea Selva
834c779c5a
Remove dlq writer dead code add some logs (#15965)
Remove unused method createFlushScheduler and add some debug logs to the finalizeSegment method to better follow what happens during its execution in case of problems.
2024-02-22 14:06:53 +01:00
Andrea Selva
18bbb3156c
Add shutdown step of DLQ flusher scheduled service (#15964)
This PR adds a shutdown method to the SchedulerService class used to handle actions to be executed on a certain cadence. In particular is used to execute scheduled finalization of DLQ head segment.
Updates the close method of the DLQ writer to invoke this additional shutdown on the service instance.
2024-02-22 12:33:23 +01:00
Andrea Selva
ff37e1e0d3
Fix failing DLQ test due to time scheduling (#15960)
Adds a burning of time condition to avoid a collision of time which, under certain circumstances, would fail the test.
The sealing of a segment happens if the segment is considered as stale, which requires 2 conditions:

- the segment must have received a write.
- the time of the last write must exceed the flush interval.

In this failing test, the flush interval is set to ZERO because of the synchronicity of the test, to avoid time dependency. However, with coarse grain timer resolution, could happen that the last write coincide with the time of the stale check, so fail the seal condition.
2024-02-22 11:28:31 +01:00
João Duarte
14dc3d24a4
bump jruby to 9.4.6.0 and remove ffi workaround (#15961) 2024-02-22 09:47:42 +00:00
Andrea Selva
c30fe46c80
Added :jvm-options-parser subproject to the javaTests task (#15957)
Adds a global new task named javaTests which groups both :logstash-core:javaTests and :jvm-options-parser:test to include the JvmOptionParser unit test in javaTests phase.
2024-02-19 16:22:03 +01:00
Pavel Zorin
e5ca8601ba
[CI] [Sonar] Explicitly specified test sources for sonar (#15954)
* [CI] [Sonar] Explicitly specified test sources for sonar

* [CI] removed wildcards from sonar.tests
2024-02-15 14:10:54 +01:00
Dimitrios Liappis
54f73e5d22
Follow up to #15900 -- fix remaining acceptance tests (#15907)
PR#15900 missed a few more places where Logstash is installed but
a working minimal pipeline config is added.
This commit fixes that and stabilizes all acceptance tests, thus
minizing the need for time consuming BK retries of corresponding
steps.

Relates #15900
Relates https://github.com/elastic/logstash/issues/15784
2024-02-15 11:33:17 +02:00
Dimitrios Liappis
eedccea33f
Fix packaging service check failures (#15946)
This commit tightens the checks for the status
output of the Logstash OS service to specifically
scan for `org.logstash.Logstash` rather than
only the jdk path.

The reason is that the startup script first runs
an options parser, and then the logstash process
itself, both referencing the JDK path.

Closes https://github.com/elastic/ingest-dev/issues/2950
2024-02-15 10:01:47 +02:00
Mashhur
3c9db658bc
Package elastic_integration plugin. (#15769)
* Exclude plugins feature in OSS distributions.

* Set elastic_integration plugin default.

* Remove non-OSS plugins after installing default plugins.

* Testing local can't find gem bundler (= 2.3.26) issue.

* Include extract non-OSS plugins logic indocker build operations.

* Only default plugins can be excluded from OSS distros.

* Simplification: instead conditional check, use intersection to make OSS exlucluded plugin list.

* Gem and specification files still stay after removing the plugin. This change removes the stayed files.

* Rename oss-exclude to skip-oss to align namings with other params.

* Make intersection method simpler.

* [Test] Temporary excluding elastic integration plugin from default plugin list.

* Sets elastic_integration plugin default back. When removing locally installed gems, Gem::Specification doesn't recognize the gem. We have Bundle::setup in the removal logic but it is causing an issue when we re-use the bundle.

* Test the build order, remove plugin from cache logic seems invalid since we don't pack the cache.
2024-02-14 07:10:42 -08:00
kaisecheng
22a10b5b92
bump version to 8.14.0 (#15935) 2024-02-14 09:18:48 +00:00
kaisecheng
34ebdc120f
add 8.13 branch (#15938) 2024-02-13 17:39:10 +00:00
Andres Rodriguez
8eb08e1382
Add Alma 8, Alma 9, and Rocky Linux 9 to the JDK matrix (#15941) 2024-02-13 11:01:21 -05:00
Ry Biesemeyer
dc8b5b2c86
ci: provide metadata about releases that are in-flight (#15924)
Our shared CI infrastructure relies on this file being here with a specific
format, expanding a given `ELASTIC_STACK_VERSION` environment variable and
an optional `SNAPSHOT` environment variable into the information necessary
to target either the most recent published release or a snapshot representing
a candidate for the _next_ possible release in the series.

When we cut a new minor branch from `main` (at feature freeze), the tip of
that branch contains unreleased code that is in-flight for the next release.
We need to have a way to reference artifacts from this in-flight release,
instead of skipping over them while a minor release is in flight.

This change affects the _semantics_ of what is tested during a minor stack
release's feature-freeze period, ensuring that automated tests throughout
the Logstash ecosystem continue to run against the pending release with NO
changes required in those plugins.

It also introduces a new `snapshots.main` entry, which refers to snapshot
artifacts built from the un-feature-frozen `main` branch, so that plugins
can _optionally_ test against the _next_ minor in advance of its feature
freeze, as they currently do unintentionally in builds that target
 `ELASTIC_STACK_VERSION=8.x SNAPSHOT=true`.
2024-02-12 07:04:06 -08:00
Dimitrios Liappis
be3f75e346
Clean up left over scripts after CI migration (#15926)
Following the CI migration from Jenkins to Buildkite, this commit
removes a number of left over helper scripts that aren't needed
anymore.

Closes https://github.com/elastic/ingest-dev/issues/2850
2024-02-12 11:26:28 +02:00
kaisecheng
4e6815b1ea
add openssl to ubi image (#15929)
Logstash on ECK requires openssl command to build TLS keystore.
This commit adds `microdnf install -y openssl` to ensure the command exists in ubi image.
2024-02-09 18:40:02 +00:00
João Duarte
de01eb6ee3
Remove jinja2 in favor of erb templates (#15142)
This commit removes the jinja2 templates and consequently the dependency on Python
2024-02-09 13:49:58 +00:00
Andrea Selva
52ce3ff8f6
Set Netty's maxOrder options to previous default (#15925)
Updates Netty's configuration of maxOrder to a previously proven value, if not already customised by the user.

Adds a step to the JvmOption parsing tool, which is used to compose the JVM options string to pass down to Logstash at startup.
The added step rework the parsed options to set the allocator max order -Dio.netty.allocator.maxOrder=11 so that the maximum pooled buffer is up to 16MB and not 4MB.
This option is added iff it's not yet specified by the user
2024-02-09 13:49:23 +01:00
João Duarte
5c3e64d591
introduce go.mod for env2yaml (#15921)
Update the env2yaml to have a go.mod instead of relying on disabling go modules, otherwise building with golang 1.22 will fail in the future.
This change also directly uses the golang image to build the binary removing the need for an intermediate image.
2024-02-08 18:12:11 +00:00
Nassim Kammah
db193f56c4
Update docs-preview link (#15918)
Following the migration from Jenkins to Buildkite, docs previews are now available at <repo>_bk_<PR>.

More context in https://github.com/elastic/docs/pull/2898
2024-02-08 17:20:58 +01:00
Andrea Selva
4e98aa8117
Fix the lastes 8.12 version, to the actually latest released (#15915)
* Fix the latest 8.12 version, to the actually latest released
* Update version fo 7.17


Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-02-07 18:02:51 +01:00
Mashhur
c75a2d84b1
Update CI release file after releases. (#15911) 2024-02-07 06:41:02 -08:00
Ry Biesemeyer
38e8c5d3f9
flow_metrics: pull worker_utilization up to pipeline-level (#15912) 2024-02-06 11:50:34 -08:00
github-actions[bot]
529ed2eddc
Release notes for 8.12.1 (#15885) (#15910)
* Update release notes for 8.12.1

* Revise 8.12.1 relase notes.

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
(cherry picked from commit 1b8648b365)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-06 10:44:34 -08:00
Dimitrios Liappis
b66dc7f460
Fix service startup with acceptance tests (#15900)
This commit fixes the startup of the Logstash service during packaging
tests by adding a minimal pipeline config. Without it, the service was
flapping from start to start and vice versa causing test flakiness.

Relates https://github.com/elastic/logstash/issues/15784
2024-02-06 17:38:12 +02:00
Dimitrios Liappis
2fc3f4c21f
Add retries to acceptance/docker steps in BK (#15901)
Similarly to #15874, this commit adds retries
to another group, the acceptance/docker to reduce
build noise from transient issues.
2024-02-06 15:10:13 +02:00
Dimitrios Liappis
fedcf58c48
Add Debian 12 to CI (#15895)
This commit adds Debian 12 (Bookworm) to the
Linux JDK matrix pipeline and Compat Phase of the
exhaustive pipeline respectively.

Relates https://github.com/elastic/ingest-dev/issues/2871
2024-02-05 18:49:30 +02:00
Dimitrios Liappis
8ac55184b8
Allow running Java+Ruby tests on Windows separately (#15861)
This commit allows separate running of Java and Ruby tests on Windows i.e. the same way as we currently do on unix (unit_tests.sh) via a cli argument.
If no argument has been supplied, both tests are run (as it does now).

The wrapper script is also rewritten from old batch style script to Powershell.

This work allows us to split the existing Windows CI job in a subsequent PR to separate steps, as we currently do on Linux.

Relates: https://github.com/elastic/logstash/issues/15566
2024-02-01 10:04:25 +02:00
Karen Metts
d2bdc05f99
Doc: Update plugin headers to deeplink into matrix (#15870)
Co-authored by: Alessandro Stoltenberg <alessandro.stoltenberg@elastic.co>
2024-01-30 13:35:16 -05:00
Dimitrios Liappis
3b747d86b8
Add retries to JDK matrix pipeline steps (#15877)
This commit adds retries to the steps of the Linux + Windows JDK matrix
pipeline steps to avoid notification noise due to transient network
errors.
2024-01-30 18:02:57 +02:00
Dimitrios Liappis
88a32cca81
Add BK retries to exhaustive/compat steps (#15874)
As a follow up to #15787 we also add Buildkite retries for the
exhaustive pipeline / compatibility group steps to prevent
failures due to flakiness.
2024-01-30 14:33:33 +02:00
Dimitrios Liappis
0f9b6f9e87
Fix typo with aarch64 pipeline name to trigger (#15873)
This commit fixes a bug instroduced in PR#15850 and uses the correct
pipeline name when triggering the aarch64 pipeline on schedule.
2024-01-30 10:10:01 +02:00
Dimitrios Liappis
70c3fcdcbe
[ci] Skip slack alerts if retried tasks succeeded (#15869)
Currently for pipelines that have steps with auto retries, if there
is a failure of a step, even if the subsequent retry succeeds, we
received Slack alerts.
This commits uses new functionality available in the Buildkite PR Bot
to avoid Slack notifications in those cases and changes the settings
for all pipelines where we have, or expect to have, retries.
2024-01-29 13:52:00 +02:00
João Duarte
905ddd267b
add base64 notice and update generated NOTICE.txt (#15867) 2024-01-29 11:08:50 +00:00
Mashhur
eb9859276e
Update stack versions for CI. (#15864) 2024-01-28 21:02:30 -08:00
Dimitrios Liappis
0563a13665
Fix typo in catalog-info with exhaustive schema (#15858) 2024-01-28 19:40:48 +02:00
Dimitrios Liappis
5ee75803f8
Scheduled runs of exhaustive and aarch64 pipelines (#15850)
This commit adds a schedule to run the exhaustive pipeline
(biweekly, every other Wednesday @2AM UTC) and the aarch64
(weekly, every Monday@2AM UTC).

Closes https://github.com/elastic/ingest-dev/issues/2852
2024-01-28 19:30:02 +02:00
Mashhur
7063365739
Revert "[docs] Simplify and imrove Logstash monitoring docs. (#15847)" (#15862)
This reverts commit 9317052088.
2024-01-26 14:18:41 -08:00
Andrea Selva
8657ce9d21
Re-enabled collectd codec in test_plugins script (#15857) 2024-01-26 17:31:31 +01:00
Dimitrios Liappis
3f5b44a1ad
Remove Ubuntu 18.04 from CI jobs (#15855)
Relates https://github.com/elastic/ingest-dev/issues/2849
2024-01-26 17:14:41 +02:00
Mashhur
9317052088
[docs] Simplify and imrove Logstash monitoring docs. (#15847) 2024-01-25 17:28:36 -08:00
Karen Metts
cefd553a7d
Doc: Update extending integrations docs to point to plugin (#15747) 2024-01-25 11:02:47 -05:00
Dimitrios Liappis
0d808ed708
Retries for serverless-integration-testing pipeline (#15851)
This commit adds (up to 3) retries for all steps of the `serverless-integration-testing`
pipeline as a stop-gap measure to prevent network related transient failures.
2024-01-25 17:24:00 +02:00
Andrea Selva
e4ef87923d
Describe how to troubleshoot connectivity problems in Azure Blob Storage at HTTP level (#15835)
* Describe how to troubleshoot connectivity problems at HTTP level with Azure Blob Storage

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-01-24 09:46:41 +01:00
Andrea Selva
1395d953b2
Updates bundled JDK (#15840)
* Updates bundled JDK

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-01-24 09:46:18 +01:00
Dimitrios Liappis
c33afd4cd0
Mute DLQ test on Windows (#15843)
This commit mutes the DLQ test:
`testDLQWriterFlusherRemovesExpiredSegmentWhenCurrentHeadSegmentIsEmpty`
when running on Windows.

Closes https://github.com/elastic/logstash/issues/15768
2024-01-24 09:53:56 +02:00
Dimitrios Liappis
d74fea4b55
Fix IT tests after version bumps (#15827)
This commit fixes IT failures that frequently occur after
version bumps due to missing unified release snapshot builds for
the new version.

This commit uses project specific DRA snapshot URLs for ES and Filebeat
in all cases apart from release builds.

Closes #2825
2024-01-23 15:13:51 +02:00
Dimitrios Liappis
15e19a96c2
Fix acceptance/packaging upgrade test near a release (#15826)
The current mechanism of discovering the latest released version per
branch (via ARTIFACTS_API) isn't foolproof near the time of a new
release, as it may be pick a version that hasn't been released
yet. This leads to failures[^1] of the packaging upgrade tests, as we
attempt to download a package file that doesn't exist yet.

This commit switches to an API that that is more up to date regarding
the release version truth.

[^1]: https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/125#018d319b-9a33-4306-b7f2-5b41937a8881/1033-1125
2024-01-22 20:58:32 +02:00
Dimitrios Liappis
c5cb1fe2ed
Annotate successful DRA builds with summary URL (#15820)
This commit makes the generated DRA URL easily accessible via
a Buildkite annotation.

Closes https://github.com/elastic/ingest-dev/issues/2608
2024-01-22 16:37:18 +02:00
Dimitrios Liappis
52d9e6286e
Update active branches used by CI (#15816)
Relates https://github.com/elastic/logstash/pull/15814
2024-01-18 15:35:18 +02:00
Nassim Kammah
9256de43c3
Remove Nassim Kammah from list of maintainers (#15709) 2024-01-18 14:05:25 +01:00
Dimitrios Liappis
fc09ad4112
Fix flaky logstash-plugin IT test (#15803)
This commit fixes the flaky IT test:
`install non bundle plugin successfully installs the plugin with debug enabled`
by being a bit more lenient with the output which can get garbled by Bundler.

Closes #15801
2024-01-18 14:59:08 +02:00
Pavel Zorin
2c83a52380
[CI] Send Java and ruby tests to sonarqube simultaneously (#15810)
* Ruby code coverage with SimpleCov json formatter

* [CI] Send Java and ruby tests to sonarqube simultaneously

* Enabled COVERAGE for ruby tests

* Enabled COVERAGE for ruby tests

* Enabled COVERAGE for ruby tests

* Enabled COVERAGE for ruby tests

* Enabled COVERAGE for ruby tests

* Added compiled classes to artifacts

* Test change

* Removed test changes

* Returned back ENABLE_SONARQUBE condition

* Removed debug line

* Diable Ruby coverage if ENABLE_SONARQUBE is not true

* Run sonar scan on pull requests and onn push to main

* Run sonar can on release branches
2024-01-17 19:04:37 +00:00
github-actions[bot]
20b298e350
Release notes for 8.12.0 (#15804) (#15812)
---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit d5d363208b)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-17 13:55:42 -05:00
Dimitrios Liappis
16c4d8827e
Enable packaging tests in exhaustive pipeline (#15781)
This commit adds the packaging tests (that were refactored in #15696
to not rely on Vagrant) in a new "acceptance" group.

Relates: https://github.com/elastic/ingest-dev/issues/1722
2024-01-12 17:52:06 +02:00
kaisecheng
081d8fc15c
[Doc] kerberos debug instructions (#15779)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-01-12 13:11:12 +00:00
Dimitrios Liappis
fca1fccb66
Add Docker acceptance to exhaustive BK pipeline (#15748)
This commit adds the Docker acceptance tests in the acceptance phase
of the exhaustive tests pipeline.

- Relates: https://github.com/elastic/ingest-dev/issues/1722
2024-01-12 09:02:45 +02:00
Karen Metts
968fb24450
Doc: Add monitoring for serverless (#15636) 2024-01-11 15:42:38 -05:00
Dimitrios Liappis
a0e3b35c5f
Don't trigger exhaustive tests with backports (#15791)
Having enabled branch pushes as triggers for the exhaustive test
pipeline, we have an unwanted sideeffect, that when using
PR automation (@logstashmachine) to create backports, the temporary
branches also triggered exhaustive tests.

This commit skips triggering this pipeline when upstream branches
starting with `backport` get pushed.
2024-01-11 17:12:47 +02:00
Andrea Selva
4a2104b1a4
Update releases inventory after 8.11.4 (#15783) 2024-01-11 15:54:41 +01:00
Dimitrios Liappis
739e8a3ef0
Add retries to PR pipeline steps (#15787)
There is occasional flakiness mainly with IT tests requiring us to
manually retry such failures when we raise PR (or the first
group of the exhaustive suite, which runs the same steps).

This commit adds up to 3 retries for all the steps of the PR
pipeline.
2024-01-11 15:48:45 +02:00
github-actions[bot]
5b98f7d63d
Release notes for 8.11.4 (#15753) (#15777)
* Update release notes for 8.11.4

(cherry picked from commit 93e786fd0f)
2024-01-10 11:53:09 +01:00
Andrea Selva
50a589493c
Bump Puma lower version constraint to >= 6.4.2 (#15773) 2024-01-10 09:52:56 +00:00
Dimitrios Liappis
c8726b79f3
Run BK exhaustive pipeline when code is pushed (#15738)
This commit enables running the exhaustive tests Buildkite pipeline
(i.e. the equivalent to the `main` Jenkins tests) ; the trigger is
code events, i.e. direct pushes, merge commits and creation of new branches.

CI is skipped if changes are only related to files under `docs/`.
2024-01-10 10:18:19 +02:00
Edmo Vamerlatti Costa
a21ced0946
Add system properties to configure Jackson's stream read constraints (#15720)
This commit added a few jvm.options properties to configure the Jackson read constraints defaults (Maximum Number value length, Maximum String value length, and Maximum Nesting depth).
2024-01-08 17:48:11 +01:00
Dimitrios Liappis
9f1d55c6a2
Pin childprocess gem to major version 4 (#15758)
This commit pins the `childprocess` gem to version `4` since version `5.0.0` of
https://github.com/enkessler/childprocess/pull/175 seems to have broken JRuby support for spawning.

Closes https://github.com/elastic/logstash/issues/15757

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-01-08 18:08:46 +02:00
Dimitrios Liappis
cebe4a7537
Refactor qa/acceptance tests to get away from vagrant (#15696)
This commit modernizes the qa/acceptance (packaging) test framework by
moving away from Vagrant and having the tests operate locally.

As we are migrating to Buildkite, the expectation is that those tests
will run on dedicated vms thus removing the necessity of vagrant.

Relates: https://github.com/elastic/ingest-dev/issues/1722
2024-01-08 09:40:58 +02:00
Mashhur
73c87a4151
Add elastic_integration plugin to the plugin meta list. (#15692)
* Add elastic_integration plugin non-default plugin. This will be enough to pick up it the doc generations.
2024-01-04 09:39:55 -08:00
Andrea Selva
76d1677187
Fixes a typo in plugin's organization name (#15743)
Fixes a typo in string definition for Logstash's plugins organization.
2024-01-04 17:11:55 +01:00
Dimitrios Liappis
286088915f
JUnit result annotation for Buildkite PR jobs (#15741)
This commit adds annotations for Java unit tests (in the pull request pipeline) helping
identify failing unit tests quickly.
2024-01-04 17:21:07 +02:00
Andrea Selva
6dc8423186
Add filter elastic_integration to be tested in test_plugins script (#15723)
Add the `logstash-filter-elasticsearch_integration` plugin to the list of test_plugins pipeline.
In doing so, reworked the definition of plugins, by not just specifying a plugin name but also adding support leve, type and organization. This necessary for plugins which repository is not part of `logstash-plugins` Github organization but at the same time permit an easier management of the different axes that partitions the plugin landscape.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-01-04 16:00:45 +01:00
Edmo Vamerlatti Costa
41ec183f09
Fix logstash-keystore multiple keys operations with command flags (#15737)
This commit fixes how the keystore tool handle the command's options, including validation for unknown options, and adding the --stdin flag to the add command.
2024-01-03 18:57:57 +01:00
Andrea Selva
2be661b9bc
Re-enable json filter and netflow codec plugins (#15722)
- Re-enabled logstash-filter-json and logstash-codec-netflow plugins into the test_plugins BK pipeline.
- Moved codecs tier2 to be executed in separata VM.
- Commented plugin logstash-codec-collectd till is fixed
2024-01-02 17:20:28 +01:00
Andrea Selva
f643e8606d
Update to gradle 8.5 (#15707)
Update the Gradle wrapper to version 8.5
2024-01-02 13:28:34 +01:00
Dimitrios Liappis
a8b64a32e9
Skip input step when triggering JDK matrix jobs (#15733)
PR#15729 missed the input step. As a result when the job is triggered
the steps are executed, but the pause icon still shows in the job
requiring manual unblock[^1]

This commit also skips the input step when the job is triggered from
the scheduler pipeline.

[^1] https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/86
2024-01-02 13:06:03 +02:00
Dimitrios Liappis
82ac474b13
Don't block triggered JDK matrix Buildkite jobs (#15729)
The recent PRs #15668 and #15705 refactored jobs with a custom schedule
to leverage a centralized trigger pipeline.

An unexpected sideffect of this is that the conditional for the wait
step doesn't work anymore.

This commit skips the wait step when the JDK matrix pipelines get triggered
from another pipeline.
2024-01-02 11:29:52 +02:00
Dimitrios Liappis
4a7b31ea6d
[ci] No Slack alerts for pipeline scheduling job (#15728)
As a follow up to #15705, this commit shushes Slack alerts for the
common Buildkite scheduling pipeline. This is because the pipeline
scheduler just triggers other pipelines which have their own dedicated
alerts setup, therefore we want to avoid duplicate alerts when
there is a failure with one of the triggered pipelines.
2024-01-02 11:14:54 +02:00
Dimitrios Liappis
9538338abb
[ci] Add testing phase to exhaustive tests suite (#15711)
This is the second part of the migration of the exhaustive/main
Jenkins Job to Buildkite. So far we've migrated the "compatibility
phase" and this commit adds the "testing phase"[^1], which is essentially
the same amount of tests that we ran on PR jobs.

Relates https://github.com/elastic/ingest-dev/issues/1722
Depends https://github.com/elastic/logstash/pull/15708

[^1]: For more details, refer to the sequence diagram in https://github.com/elastic/ingest-dev/issues/1722#issuecomment-1824378635
2023-12-21 09:42:14 +02:00
Mashhur
0049717394
So far we are practicing Snyk scan of docker images. Now we can comment docker scan logic to address collected issues later with more experiements. (#15702) 2023-12-20 10:51:20 -08:00
Dimitrios Liappis
03d7b59f2a
[ci] Reusable unit + IT test steps for Buildkite (#15708)
This commit is a pre-requisite for adding unit + IT tests in a
dedicated phase of the Exhaustive tests pipeline.

It refactors the tests currently used by PR jobs, so that they become
reusable.
2023-12-20 18:22:09 +02:00
Felix Jansson
69c145d4ee
Add log.format to the logstash.yml (#15049)
* Added log.format in the logstash.yml (#11290)

* Update config/logstash.yml

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2023-12-20 14:40:59 +00:00
Andrea Selva
48b0af1206
Replace Gradle's report.enabled setting to report's required property (#15706) 2023-12-20 12:40:10 +01:00
Dimitrios Liappis
33347ddddf
Common scheduler pipeline for Buildkite (#15705)
As an improvement from #15668 / #15700, rather than having one
dedicated side-car scheduling job per pipeline, we move to a single
scheduling job. Various pipelines that need triggering with different
schedules now live under each schedule in the new pipeline.

This reduces the amount of jobs we have to maintain in yaml.
2023-12-20 11:47:54 +02:00
Dimitrios Liappis
06ceef8e13
[ci] Allow schedule to trigger several pipelines (#15703)
This commit enhances the functionality introduced in #15668 and #15700
by allowing a single Buildkite scheduling job to trigger several
pipelines, in addition to multiple branches which it already does.

We rename the env var PIPELINE_TO_TRIGGER to PIPELINES_TO_TRIGGER
which now supports comma separate values.

This enhancement can be useful for pipelines like JDK matrix which
have variants (Linux and Windows) that we want to trigger with a single
scheduling job, thus reducing unnecessary entries in catalog-info.
2023-12-20 10:22:46 +02:00
Dimitrios Liappis
42497edebb
Bug fix for trigger pipeline Buildkite pipeline (#15700)
This commit fixes a few bugs introduced in #15668 related to paths for
the calling script. We also stop limiting the execution only from the
main branch (to facilitate e.g. tests from PRs) and, finally, remove
the async clause, which is not needed, since by default BK steps are
run in parallel.
2023-12-19 13:33:46 +02:00
Dimitrios Liappis
c2eaecce8e
[ci] Remove hardcoded branches from DRA schedule (#15668)
This commit is the first making use of #15627 to remove hard coded
branches for the DRA Snapshot build schedule.

With this pattern, we will only need to keep `ci/branches.json` up to date,
as versions evolve, and not need to update/maintain hard coded branches
in `catalog-info.yaml` anymore.

Once this is verified working, we'll add a corresponding schedule
pipeline (in `catalog.info`) for the JDK matrix job.

Relates: https://github.com/elastic/ingest-dev/issues/2664
2023-12-19 11:42:28 +02:00
Dimitrios Liappis
f062fef603
[ci] Add Java 21 option for multi JDK CI pipeline (#15691)
Now that CI VM images are pre-provisioned with various flavors of
Java 21, we add the option for the corresponding CI job.
Adoptium 17 remains the default pre-selected option.

Relates https://github.com/elastic/ci-agent-images/pull/463
2023-12-18 16:56:48 +02:00
Andrea Selva
6b22cc8dd1
Separate scheduling of segments flushes from time (#15680)
Introduces a new interface named SchedulerService to abstract from the ScheduledExecutorService to execute the DLQ flushes of segments. Abstracting from time provides a benefit in testing, where the test doesn't have to wait for things to happen, but those things could happen synchronously.
2023-12-18 11:07:02 +01:00
João Duarte
aa05205a9e
Update logstash_releases.json to include 7.17.16 and 8.11.3 (#15688) 2023-12-12 18:23:46 +00:00
João Duarte
9e93ded8ea
Update catalog-info.yaml to include testing for 8.12 branch (#15666)
Don't remove 8.11 yet as we may have 8.11.x maintenance releases until 8.12.0 is GA.
2023-12-12 17:30:26 +00:00
github-actions[bot]
64ef307a73
Release notes for 8.11.3 (#15681) (#15685)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit a45349ea47)
2023-12-12 10:28:39 -05:00
Andrea Selva
241c03274c
Avoid to run integration tests while testing all supported plugin (#15511)
Update the test_plugins pipeline script to execute only the unit tests.
Use the vendored JRuby in every Ruby related duty, such as running `bundler` and `gem`.
Temporarily comments plugins that has needs to be fixed and already fails on  their Travis CI.
Executes the testing of input tier1 plugins in VM instead of Buildkite agent.
2023-12-11 10:11:03 +01:00
github-actions[bot]
042e5d4c2d
Release notes for 8.11.2 (#15660) forwardport to main (#15676)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 4e3e09c5d6)
2023-12-07 17:17:32 -05:00
Mashhur
6a44d9df68
Update JRuby core to 9.4.5.0 of rubyUtils.gralde (#15671) 2023-12-07 11:29:16 -08:00
Karen Metts
6c2e123a24
Doc: Add docs for extending integrations with filter-elastic_integrations (#15518) 2023-12-07 14:21:23 -05:00
Dimitrios Liappis
365ca4e2d6
Add new 8.12 branch to CI (#15667)
Now that we have a new 8.12 branch[^1], add it to CI definitions.

[^1]: https://github.com/elastic/logstash/tree/8.12
2023-12-07 15:59:08 +02:00
João Duarte
6c12e6f4c2
bump version to 8.13.0 (#15665) 2023-12-06 23:00:47 +00:00
Karen Metts
0954a687f0
Doc: Update Logstash intro and security overview for serverless (#15313) 2023-12-06 17:00:01 -05:00
Andrea Selva
eddd91454f
Shutdown DLQ segments flusher only if it has been started (#15649)
In DLQ unit testing sometime the DLQ writer is started explicitly without starting the segments flushers. In such cases the test 's logs contains exceptions which could lead to think that the test fails silently.

Avoid to invoke scheduledFlusher's shutdown when it's not started (such behaviour is present only in tests).
2023-12-05 09:06:24 +01:00
Dimitrios Liappis
a26b1d399f
[ci] Skip Logstash PR checks when docs change (#15650)
Changes made under `docs/` are unrelated to the PR tests triggered from
this repo[^1]

This commit skips regular PR tests when changes are made (only) under the `docs/` directory.

Note that the current docs-specific Jenkins Job is getting migrated
at an org level[^2] to Buildkite, and this change will be merged soon.

Relates:

- https://github.com/elastic/ingest-dev/issues/2703

[^1]: via `.buildkite/pull_requests_pipeline.yml`
[^2]: https://github.com/elastic/docs/blob/master/.buildkite/pull-requests.org-wide.json
2023-12-04 19:14:57 +02:00
Dimitrios Liappis
d42b938f81
[ci] Compatibility tests for Exhaustive suite (#15641)
This commit adds the compatibility tier for the Exhaustive tests suite.
Specifically, we introduce two new groups (running in parallel) for Linux and Windows compat tests.
Linux picks one OS per family from [^] and likewise Windows one of the three available choices from the same file.

We also support manual override, if user chooses to, by setting `LINUX_OS` or `WINDOWS_OS` as env vars in the Buildkite build prompt (in this case there is no randomization, and only one OS can be defined for Linux and Windows respectively).

For example:
```
LINUX_OS=rhel-9
WINDOWS_OS=windows=216
```

Relates:

- https://github.com/elastic/ingest-dev/issues/1722

[^1]: 4d6bd955e6/.buildkite/scripts/common/vm-images.json
2023-11-30 20:28:19 +02:00
Dimitrios Liappis
0b1d15e250
Add list of active branches for automation (#15627)
This commit introduces a json file that contains a list of active
branches. It's essentially the same thing done in the Elasticsearch
repo in https://github.com/elastic/elasticsearch/pull/99026 and helps
simplify and automate Buildkite scheduled jobs.

Relates:

- https://github.com/elastic/ingest-dev/issues/2664
- https://elasticco.atlassian.net/browse/ENGPRD-318
- https://github.com/elastic/ingest-dev/issues/2663
2023-11-30 16:55:46 +02:00
kaisecheng
05392ad16e
Added missing method of logger wrapper for puma (#15640)
This commit fixes no method error when node stats API got
invalid API path, which triggers puma to print error using stderr

Fix: #15639
2023-11-30 13:53:18 +00:00
Edmo Vamerlatti Costa
5543e3c3b2
Add support to add and remove multiple keystore keys in a single operation (#15612)
This commit added support to add and remove multiple keystore keys in a single operation. It also fixed the empty value validation for editing existing key values and added ASCII validation for values.
2023-11-30 10:21:51 +01:00
github-actions[bot]
8b9acf12fa
Release notes for 8.11.1 (#15572) forwardport to main (#15637)
(cherry picked from commit 3d4e7e121d)
2023-11-29 18:12:10 -05:00
Dimitrios Liappis
6446bba962
[ci] Switch to Adoptium distro for JDK 11 (#15629)
AdoptOpenJDK is nowadays Adoptium, so we replace it in favor of
the latter which is actively maintained.

Relates https://github.com/elastic/logstash/pull/15628
2023-11-29 11:37:27 +02:00
Mashhur
6785038435
Logstash core integration tests for Logstash to Logstash communication. (#15541)
* Logstash core integration tests for Logsthas to Logstash communication.

* Cleanify: Logstash core integration tests for Logsthas to Logstash communication.
2023-11-28 10:02:22 -08:00
Dimitrios Liappis
66d37412e8
[ci] Switch to Adoptium JDK 17 for Jenkins CI (#15628)
The last remaining Jenkins job prior to BK migration is for
exhaustive tests. The compatibility phase seems to be failing
since 57dc14c92
with Java 17.0.2

This commit switches from OpenJDK 17 (whose last release was 17.0.2)
to AdoptiumJDK 17 which actively receives updates and is bundled
in the custom images used by Jenkins.
2023-11-28 19:28:44 +02:00
Dimitrios Liappis
f0019bf33c
[ci] Fix scheduled JDK matrix CI jobs (#15623)
This commit fixes failed scheduled JDK matrix CI jobs, that
can't access the default values for the OS and JDK from the input
steps, as observed in [^1] and [^2].

[^1] https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/53#018c1371-b760-4c28-9203-340c0a1df150
[^2]: https://buildkite.com/elastic/logstash-windows-jdk-matrix-pipeline/builds/35#018c1371-b72e-48b4-b707-ce103eb6039c
2023-11-28 16:00:32 +02:00
Karen Metts
906c2513c3
Doc: Improvements to monitoring with agent (#15619) 2023-11-27 14:18:06 -05:00
Mashhur
1e65f53d68
Use proper BK agent and simplify some operations in Snyk report pipeline. (#15610)
* Use Java installed BK agent and remove unnecessary git clone operation since repo is already cloned.

* Switch back to normal VM since Logstash BK agent doesn't support docker operations.
2023-11-27 09:31:25 -08:00
Dimitrios Liappis
db50983ab5
[ci] Initial Exhaustive tests Buildkite pipeline (#15607)
This commit adds a skeleton Buildkite pipeline for the Exhaustive tests
suite.
2023-11-27 11:06:19 +02:00
Dimitrios Liappis
ade2fb0687
[ci] Initial Exhaustive tests Buildkite resource (#15608)
This commit adds a new resource for the Exhaustive tests Buildkite
pipeline.

Relates:

- https://github.com/elastic/ingest-dev/issues/1722
- https://github.com/elastic/logstash/pull/15607
2023-11-27 11:06:02 +02:00
Dimitrios Liappis
2cbb4500dc
[ci] Fix slack alerts for Linux JDK matrix pipeline (#15609)
This commit enables slack alerts for the Linux part of the JDK
matrix pipeline, which was missed in the previous PR#15593.
2023-11-24 18:03:01 +02:00
Dimitrios Liappis
f8bb0480fc
[ci] Explicit maximum timeout for pipelines (#15601)
This commit adds a maximum default (global) timeout for every pipeline
definition (now that it's possible to define this programmatically in
an RRE).

The default values have been chosen arbitrarily based on intuition
about how much (in the worst case) we should wait for each job to
run until we consider them stuck/failed.

While at it, we update the yaml schema for RREs to point to the
latest commit (rather than a pinned commit that doesn't reflect the
latest changes, e.g. `maximum_default_timeout`).

Relates #15380
2023-11-24 17:37:22 +02:00
github-actions[bot]
b7c31f3fda
swap dataformat-yaml with snakeyaml (#15599) (#15606)
This removes the dependency on jackson's dataformat-yaml. Since there's only a single place where this library is used in core: to load the plugin alias definition, the code can be replaced by the underlying snakeyaml.

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
(cherry picked from commit 93d8a9da32)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-11-22 12:07:10 +00:00
Edmo Vamerlatti Costa
57dc14c92c
Fix issue with Jackson 2.15: Can not write a field name, expecting a value (#15564)
This commit fixes the issue with Jackson > 2.15 and `log.format=json`: "Can not write a field name, expecting a value", by adding a default serializers for JRuby's objects.
2023-11-21 15:30:24 +01:00
Dimitrios Liappis
db8f87bf9d
[ci] Enable auto runs of JDK matrix pipelines (#15593)
This commit enables scheduled runs of the JDK matrix pipelines for
both Windows and Linux, once a week, Tuesdays at 1am UTC, using the
pipeline defaults for OS and JDK.
2023-11-21 16:11:54 +02:00
Dimitrios Liappis
e259e04e53
[ci] Use GCP prod image for Linux JDK matrix job (#15600)
So far we've been using images from the -qa GCP image project throughput
the development of the Logstash Linux JDK matrix pipeline for quicker
iteration.

As we have scheduled weekly builds of those images that promote to
prod[^1] we can now switch to the prod version of the GCP images.

[^1]: https://buildkite.com/elastic/ci-vm-images/builds/2888

Relates https://github.com/elastic/ingest-dev/issues/1725
2023-11-20 17:27:04 +02:00
Dimitrios Liappis
8fa3bd0d7f
[ci] Support amazonlinux for JDK matrix pipeline (#15595)
The last part of the Logstash JDK matrix CI migration from Jenkins to
Buildkite is AmazonLinux 2023.

While we have a working image[^1], this is the only step that requires
a agent that runs on AWS.

This commit refactors the builder to support GCP or AWS agents depending
on the OS.

[^1]: https://github.com/elastic/ci-agent-images/pull/441
2023-11-20 11:32:47 +02:00
Dimitrios Liappis
cd01abb1c7
[ci] Add yaml language server to pipelines (#15590)
Add missing yaml-language-server definition to Buildkite pipeline files
(static and dynamic generated) for consistency and to ease spotting
errors with editors.
2023-11-15 17:47:15 +02:00
Dimitrios Liappis
abc1384ea3
[ci] Add 90min timeout for supported plugins test (#15581)
This commit adds a global max timeout of 90min for the supported plugins
Buildkite pipeline. This prevents hanging builds (for 24hrs, which is
the default).

Relates: #15380
2023-11-15 12:11:20 +02:00
kaisecheng
53a346c57f
[Doc] add reference to ECK (#15565)
add ECK reference to doc

Fixed: #15471

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-11-14 23:26:45 +00:00
Karen Metts
c060c00d7c
Doc: Add Elastic Agent collection (#15528)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2023-11-14 13:55:39 -05:00
Dimitrios Liappis
ce63ea4a51
[ci] Fix image name for Rocky Linux 8 (#15584)
Fix typo for image name of Rocky Linux 8 for JDK matrix jobs.
2023-11-14 19:26:49 +02:00
João Duarte
6547f8c5c4
Update logstash_releases.json to include 7.17.15 and 8.11.1 (#15578) 2023-11-14 11:03:54 +00:00
verogo
496f18effc
[Buildkite] Add pipeline max timeout property (#15579)
Build's maximum_timeout_in_minutes and default_timeout_in_minutes are available now through the catalog-info.yaml file.
As this change was made manually before we implemented this in RRE/Terrazzo, they got reverted to the default value (0); thus, I am raising this PR to get it as it was specified before the upgrade (120 mins.)
2023-11-14 09:12:24 +02:00
Mashhur
8700179cf2
Update 8.x CI to 8.11 (#15551) 2023-11-12 05:10:56 +05:00
Dimitrios Liappis
0ede19a0e1
[ci] JDK matrix Buildkite pipelines (pt 2/Windows) (#15563)
This commit adds JDK matrix Buildkite pipelines for
Windows 2022, 2019 and 2016.

It also makes the groups easier to read (on both Linux and Windows
pipelines) by removing the os-jdk prefix from the job labels.

`testDLQWriterFlusherRemovesExpiredSegmentWhenCurrentHeadSegmentIsEmpty`
fails on Windows Buildkite agents and it's a test issue tracked in
https://github.com/elastic/logstash/issues/15562.

Relates:

- https://github.com/elastic/logstash/pull/15539
- https://github.com/elastic/ingest-dev/issues/1725
2023-11-10 17:25:13 +02:00
Dimitrios Liappis
f87651fee0
[ci] Remove 8.10 scheduled builds for DRA (#15544)
This commit removes 8.10 from the automated builds of DRA
artifacts, and should be merged once 8.11.0 is out.
2023-11-10 17:18:10 +02:00
Andrea Selva
5af14f4e1c
Fixed functional test in case the LS_JAVA_HOME is configured (#15535)
Adds filtering on Logstash output message in an integration tests when setting LS_JAVA_HOME environment variable.
2023-11-10 11:01:42 +01:00
Dimitrios Liappis
956bf483f2
[ci] JDK matrix Buildkite pipelines (part 1) (#15539)
This commit is the first part of the migration of JDK matrix tests
from Jenkins to Buildkite. There will be two separate pipelines, for
Linux and Windows.

Linux is currently limited to Ubuntu 22.04 and 20.04, but
additional operating systems will be added outside of the Logstash
repository seamlessly through additional VM images.

Steps are created dynamically and the underlying script is meant to be
common for Linux and Windows. Windows is currently a stub and
will be added in a follow up PR.

Relates:

- https://github.com/elastic/ingest-dev/issues/1725
- https://github.com/elastic/ci-agent-images/pull/424
2023-11-09 09:53:27 +02:00
github-actions[bot]
c762deceae
Release notes for 8.11.0 (#15465) (#15548)
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit d4715a36c0)
2023-11-07 19:10:04 -05:00
Ry Biesemeyer
a7e2839a83
build meta: bump 8.x snapshot to 8.12 (#15546)
once 8.11 was cut, snapshot build for 8.x should be 8.12
2023-11-07 14:34:08 -08:00
Andrea Selva
7a055c34d1
Fixed definitions of licenses for some dependencies (#15540)
Update some dependency's licenses definitions.
2023-11-07 17:12:28 +01:00
João Duarte
bd6189db8e
Update JRuby to 9.4.5.0 (#15531) 2023-11-07 13:41:04 +00:00
Dimitrios Liappis
07147b3e40
[ci] Split JDK matrix pipelines per OS (#15534)
This commit splits the generic Buildkite pipelines introduced
in #15520 for JDK tests to separate pipelines for Linux and Windows.
2023-11-07 15:22:37 +02:00
Dimitrios Liappis
b86ad3038a
[ci] Split JDK matrix resources per OS (#15533)
This commit splits the generic Buildkite catalog resource introduced
in #15519 for JDK tests to separate resources for Linux and Windows.
2023-11-07 14:19:47 +02:00
Mashhur
fa1382fd22
Update the Logstash to Logstash Native doc to reflect the multiple hosts usage. (#15512)
* Update the Logstash to Logstash Native doc to reflect the multiple hosts usage.

* Logstash to Logstash comm page, adding LS-to-LS native HA support.

* Apply suggestions from code review

Refining the context.

Co-authored-by: Andres Rodriguez <andreserl@gmail.com>

---------

Co-authored-by: Andres Rodriguez <andreserl@gmail.com>
2023-11-06 12:32:48 -08:00
Ry Biesemeyer
51886b9102
geoip: extract database manager to stand-alone feature (#15348)
* geoip: extract database manager to stand-alone feature

Introduces an Elastic-licensed GeoipDatabaseManagement tool that can be used
by ANY plugin running on Elastic-licensed Logstash to retrieve a subscription
to a GeoIP database that ensures EULA-compliance and frequent updates, and
migrates the previous Elastic-licensed code-in-Logstash-core extension to
the Geoip Filter to use this new tool, requiring ZERO changes to in-the-wild
versions of the plugin.

The implementation of the new tool follows the previous implementation as
closely as possible, but presents a new interface that ensures that a
consumer can ATOMICALLY subscribe to a database path without risk that the
subscriber will receive an update or expiry before it is finished applying
the initial value:

~~~ ruby
geoip_manager = LogStash::GeoipDatabaseManagement::Manager.instance
subscription = geoip_manager.subscribe('City')

subscription.observe(construct: ->(initial_dbinfo){ },
                     on_update: ->(updated_dbinfo){ },
                     on_expire: ->(       _      ){ })

subscription.release!
~~~

* docs: link in geoip database manager docs

* docs: reorganize pending 'geoip database management' feature

* docs: link to geoip pages from feature index

* geoip: add SubscriptionObserver "interface"

simplifies using Subscription#observe from Java

* geoip: fixup SubscriptionObserver after rename

* geoip: quacking like a SubscriptionObserver is enough

* geoip: simplify constants of legacy geoip filter extension

* geoip: bump logging level to debug for non-actionable log

* geoip: refine log message to omit non-actionable info

* re-enable invokedynamic (was disabled to avoid upstream bug)

* geoip: resolve testing fall-out from filter extension's "private" constants removal

* geoip: consistently use `DataPath#resolve` internally, too
2023-11-06 09:22:23 -08:00
Andres Rodriguez
e3584fd53e
Plugin Tests: Exit 1 on error (#15527)
The plugin tests were not correctly exiting when plugin errors were present. It will now correctly exit 1 if there are plugins with errors.
2023-11-03 12:38:01 -04:00
Andres Rodriguez
cf71dae3ff
Add support to test unsupported plugins (#15526)
Add support to test unsupported plugins. Only enable input-rss for now.
2023-11-03 12:08:01 -04:00
Dimitrios Liappis
ccc41d76ff
[ci] Initial JDK matrix Buildkite pipeline (#15520)
This commit adds a skeleton Buildkite pipeline for the JDK matrix tests.

Relates:

- https://github.com/elastic/logstash/pull/15519
- https://github.com/elastic/ingest-dev/issues/1725
2023-11-02 17:51:50 +02:00
Dimitrios Liappis
5df18f1053
[ci] Initial jdk matrix Buildkite resource (#15519)
This commit adds a skeleton resource definition for a Buildkite
pipeline for JDK matrix tests.

Relates:
https://github.com/elastic/ingest-dev/issues/1725
https://github.com/elastic/logstash/pull/15520
2023-11-02 17:51:27 +02:00
Andrea Selva
73daec05ed
Download of JDK from the Elastic catalog instead of Adoptium (#15514)
* Adapted the JDK's download URL creation to intereact with Elastic catalog to get metadata, and return the catalog download link instead of directly pointing to Adoptium API

* Silenced the Download task of JDK to print the full url
2023-10-30 16:24:27 +01:00
João Duarte
206362212a
Update JDK to 17.0.9+9 (#15509) 2023-10-27 10:20:26 +01:00
Rob Bavey
a398c93eec
Update Iron Bank base image to ubi9.2 (#15490) 2023-10-26 09:53:29 -04:00
Dimitrios Liappis
1b794dfcd6
[ci] Slack notifications for aarch64 pipeline (#15507)
This commit enables slack notifications for aarch64 Buildkite pipeline
failures.
2023-10-26 15:20:16 +03:00
Dimitrios Liappis
c384190718
[ci] aarch64 Buildkite pipeline part 2 (#15473)
This commit is the follow up PR after #15466, which migrates away
the remaining aarch64 acceptance test Jenkins jobs to Buildkite.

Relates:

- #15466
- https://github.com/elastic/ingest-dev/issues/1724
2023-10-25 18:08:56 +03:00
Andrea Selva
90964fb559
Updates callsites synthax for i18n.t method to avoid deprecated and prohibited format (#15500)
Updates invocations of i18n.t method which are leftovers and missed in the original Ruby 3.1 update PR #14861

Without this, some error reporting logs are hidden by the mismatch of arguments error in translate the error message.
2023-10-25 11:42:46 +02:00
Dimitrios Liappis
16da966290
[ci] re-enable Java unit tests on aarch64 pipeline (#15492)
PR#15466 skipped the Java unit tests as on the `main` and `8.11`
branches they attempted to run sonar scans (which are only meant to
run for PRs).

This commit re-enables the Java unit tests, taking advantage of #15486,
disabling the sonar scan part of the test suite.
2023-10-24 18:05:14 +03:00
Dimitrios Liappis
b1ab2fad3e
Option to disable SonarQube with Java Tests (#15486)
This commit introduces a way to optionally disable SonarQube scanning
and coverage reports when running Java unit tests. The integration
was introduced in #15279, however, there are cases (e.g. running Java
unit tests outside of PRs) where we don't want this integration.

Disabling can be achieved by setting the env var `ENABLE_SONARQUBE`
to `false`.
2023-10-24 10:32:44 +03:00
Rob Bavey
57cc392d0e
Update ubi8 base image to 8.7 (#15487) 2023-10-23 12:47:27 -04:00
Dimitrios Liappis
36656de4f0
[ci] aarch64 Buildkite pipeline part 1 (#15466)
This commit is the first part of migrating away the aarch64 Jenkins
jobs to Buildkite. It adds a group of exhaustive test steps in the
aarch64 pipeline.

The java unit tests are temporarily disabled as they run SonarQube
scans which need to be associated with pull requests.

Relates:

https://github.com/elastic/ingest-dev/issues/1724
2023-10-23 15:01:14 +03:00
João Duarte
e626409695
Update JRuby, JDK and Jackson (#15477)
* update JDK to 17.0.8.1+1
* update JRuby to 9.4.4.0
* update jackson to 2.15.3
2023-10-23 11:17:01 +01:00
João Duarte
6046402a35
Remove pinning of psych 5.1.0 (#15474)
https://github.com/ruby/psych/issues/655 has been fixed with the release of 5.1.1.1
2023-10-18 16:02:37 +01:00
Dimitrios Liappis
0083738cde
[ci] Initial aarch64 Buildkite pipeline (#15460)
This commit adds a skeleton Buildkite pipeline for aarch64
exhaustive tests.

- https://github.com/elastic/logstash/pull/15459
- https://github.com/elastic/ingest-dev/issues/1724
2023-10-18 09:45:05 +03:00
Dimitrios Liappis
9aa291a2a1
[ci] Initial aarch64 Buildkite pipeline (#15459)
This commit adds a skeleton resource definition for a Buildkite
pipeline for aarch64 exhaustive tests.

Relates:
https://github.com/elastic/ingest-dev/issues/1724
2023-10-18 09:27:34 +03:00
Rob Bavey
860785bbb0
Release notes for 8.10.4 (#15435) (#15463)
* Update release notes for 8.10.4
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <karen.metts@elastic.co>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-17 09:54:08 -04:00
Dimitrios Liappis
9a924f45ef
[ci] Slack notifications for PR Buildkite builds (#15452)
This commit enables Slack notifications for the pull request Buildkite
pipeline.
2023-10-16 18:32:19 +03:00
Andres Rodriguez
235ba422cc
Change plugin test buildkite pipeline to run in parallel
Closes #15440
2023-10-16 10:42:05 -04:00
Dimitrios Liappis
1284c675d1
[ci] Enable Buildkite PR comments (#15453)
This commit enables automatically updated comments from Buildkite for
PRs. It posts comments to PRs whenever a Buildkite build finishes or
encounters its first failing step and keeps the comment updated.
2023-10-16 17:12:14 +03:00
Dimitrios Liappis
784ca0243e
[docs] Small typo fixes in README (#15429)
Fix a few typos in the Logstash README.md
2023-10-16 16:49:52 +03:00
Dimitrios Liappis
555a8ff8e3
Migrate remaining PR jobs to Buildkite #15444
This commit adds the remaining steps for the Buildkite pull request pipeline i.e.

- `IT Persistent Queues / part 1`
- `IT Persistent Queues / part 2`
- `x-pack unit tests`
- `x-pack integration`

Once merged we will be able to retire the corresponding Logstash pull request multijob.

Relates:

- https://github.com/elastic/logstash/pull/15438
- https://github.com/elastic/logstash/pull/15437
- https://github.com/elastic/ingest-dev/issues/1721
- https://github.com/elastic/logstash/pull/15279
2023-10-14 09:46:52 +03:00
Dimitrios Liappis
816d7e6b2b
[ci] Add PR it-tests (part 1+2) to Buildkite (#15438)
This commit adds integration tests to the
Buildkite PR pipeline.

Relates:

- https://github.com/elastic/logstash/pull/15437
- https://github.com/elastic/ingest-dev/issues/1721
- https://github.com/elastic/logstash/pull/15279
2023-10-13 17:01:01 +03:00
Dimitrios Liappis
e285425d54
[ci] Commit PR based Java unit tests for Buildkite (#15437)
This commit adds Java unit tests (including sonar scans) to the
Buildkite pull request pipeline.

Relates: https://github.com/elastic/ingest-dev/issues/1721
2023-10-13 10:48:10 +03:00
Mashhur
3a753e49e8
Update Logstash core versions in CI after release. (#15424) 2023-10-12 22:57:43 -07:00
Dimitrios Liappis
4ee74c9de6
[ci] Daily DRA snapshot builds with Buildkite (#15395)
This commit enables the snapshot job schedule for Buildkite jobs.
They are set to run after Jenkins (scheduled @midnight) so that any
remote/unknown chance of conflict with the release manager is limited.

While at it, we also enable slack notifications for failures to the
same channels as Jenkins.
2023-10-11 21:00:45 +03:00
João Duarte
401d166a89
pin psych 5.1.0 due to ruby/psych#655 (#15433)
The new psych 5.1.1 gem seems to not work when installed in JRuby 9.4 (used in main).

This change pins the version back to 5.1.0 until ruby/psych#655 is sorted.
2023-10-11 14:58:42 +01:00
Andrea Selva
a03a05b697
Defines a pipeline to run specs tests on supported plugins (#15380)
Defines a Buildkite pipeline to run specs tests on tier1 and tier2 plugins, using container images. The tasks are divided by plugin type for each tier, to run them in parallel. Once all tier1 testing is completed then starts with tier2.
2023-10-11 11:40:54 +02:00
Dimitrios Liappis
d4eccd256f
[ci] Don't trigger BK PR jobs on pushes (#15426)
Currently while PR jobs get triggered as expected in Buildkite via
the bot, they also get re-triggered after something gets pushed,
including e.g. the squash merge commit when the PR is merged.

This commit disables this behavior as documented in Buildkite[^1].
and by tightening our filter.

Relates:

- #15402
- https://github.com/elastic/ingest-dev/issues/1721

[^1]: https://buildkite.com/docs/apis/rest-api/pipelines
2023-10-11 11:45:30 +03:00
Dimitrios Liappis
fd2910a6ef
[ci] Improve PR step names for Buildkite (#15421)
This commit shortens the descriptions of the PR Buildkite steps for
better readability on the UI.
2023-10-11 09:29:30 +03:00
Dimitrios Liappis
bc5ad292d4
[ci] Fix agents in BK pipeline for PRs (#15415)
This commit fixes a typo introduced in #15413 and #15402
2023-10-10 18:55:40 +03:00
Andrea Selva
c0e812158c
Update Guava dependency to 32.1.2 (#15394) 2023-10-10 17:14:23 +02:00
Dimitrios Liappis
e1eb1978e5
[ci] Add missing repository in Buildkite PR (#15413)
PR #15402 missed the required repository property for the Buildkite
pull request resource.
2023-10-10 17:41:53 +03:00
Dimitrios Liappis
3bfd824f7c
[ci] Initial pull request jobs for buildkite (#15402)
This commit adds a Buildkite resource for pull requests and
the two simple jobs, license checking and ruby unit tests that are
already part of the Jenkins PR multi job setup.

As this is WiP, slack notifications aren't enabled.
2023-10-10 16:39:41 +03:00
Andres Rodriguez
64ddec5c9d
Fix a few lint format issues
Fix lint issues found by 'rake lint:format'
2023-10-10 09:00:54 -04:00
github-actions[bot]
be063e2eab
Release notes for 8.10.3 (#15390) (#15404)
* Add known imap and email plugin issues section to Logstash 8.10+ versions.

Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit a88f82e77f)
2023-10-09 20:19:44 -04:00
github-actions[bot]
537f1b942d
Add bigdecimal > 3.1 dependency. (#15377) (#15384)
(cherry picked from commit 9680bbd82a)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-10-09 14:54:28 +01:00
Andrea Selva
2b7515cfee
Add definition for plugin's test pipeline to Buildkite catalog (#15382)
Add definition of pipeline  to Buildkite catalog.  The new pipeline execute supported plugins' tests
2023-10-05 11:32:24 +02:00
Dimitrios Liappis
94dfd4773b
[DRA] Remove wait step in buildkite (#15366)
DRA artifact builds support two optional parameters
`VERSION_QUALIFIER_OPT` and `DRA_DRY_RUN`.  The most important is
`VERSION_QUALIFIER_OPT` which should be provided when `alpha1` or
similar versions need to be built.

Currently, after clicking new build, the pipeline takes ~20s to
assemble the steps and then pauses the job waiting for these options to be
filled (or just accept the empty defaults) and press continue.

I feel that this could be trappy behavior because the majority of the
use cases don't need it, and it's likely that a user manually clicks
build and forgets that they'd need to confirm these parameters later
on, left with a hanging build.

This commit makes the parameters optional. If needed, they should be
defined explicitly as Environment Variables in the New Build prompt,
after expanding the Options section.

The downside of this approach is that when needed, users need to
consult the documentation about the environment variable names.
2023-10-05 10:06:07 +03:00
Mashhur
0adcc09bf6
Bump core version to 8.12 (#15378) 2023-10-03 23:33:46 -07:00
Ry Biesemeyer
70081bbcac
deps: downgrade jruby, keep updated default-gem dependencies (forward-port #15283) (#15369)
* deps: downgrade jruby, keep updated default-gem dependencies (#15283)

forward-ports non-release-branch components of #15283 to `main`

* deps: downgrade jruby, keep updated default-gem dependencies

By downgrading JRuby to 9.4.2.0 we avoid the silent global crash of the
scheduler backing `Concurrent::TimerTask` that occurs when Jruby 9.4.3.0's
invokedynamic promotes a method to run natively, incorrectly.

Upstream bug: https://github.com/jruby/jruby/issues/7904

Along with the downgrade of JRuby itself to 9.4.2.0, we cherry-pick the
updates to gems that were included in the latest JRuby 9.4.3.0 to ensure
we don't back out relevant fixes to stdlib.

We also remove a pinned-dependency on `racc` that is no longer relevant.

Resolves: https://github.com/elastic/logstash/issues/15282

* Imported the licenses for some gems

- cgi
- date
- ffi-binary-libfixposix
- io-console
- net-http
- net-protocol
- reline
- time
- timeout
- uri

* specs: avoid mocking global ::Gem::Dependency::new

* build: remove redundanct dependsOn declaration

* deps: notice use of ffi-binary-libfixposix via Ruby license

this gem is tri-licensed `Ruby` / `EPL-2.0` / `LGPL-2.1-or-later` and
the Ruby license is preferred to EPL when available

---------

Co-authored-by: andsel <selva.andre@gmail.com>

* deps: add license notices for gems moved from default to bundled

---------

Co-authored-by: andsel <selva.andre@gmail.com>
2023-10-03 14:32:28 -07:00
Andres Rodriguez
2b091432cb
Add native Logstash to Logstash documentation (#15346)
Add native Logstash to Logstash documentation, which replaces HTTP Input/Output
2023-10-03 10:58:51 -04:00
Dimitrios Liappis
9307c4de1c
[DRA] Rename Buildkite metadata for DRA pipelines (#15365)
To provide a smoother migration experience from Jenkins, this commit adds better information about the two types of DRA jobs.

Relates https://github.com/elastic/ingest-dev/issues/1720
2023-10-03 17:21:03 +03:00
Mashhur
7ed8d37630
Bundle plugin. (#15359) 2023-10-02 21:36:05 -07:00
Dimitrios Liappis
da51a6ac53
[buildkite] DRA staging + snapshot pipelines (#15344)
This commit is the step after #15337 and switches away from the generically named [logstash-dra-pipeline-ci](https://buildkite.com/elastic/logstash-dra-pipeline-ci)
pipeline to two separate pipelines for `snapshot` and `staging`, reflecting the current structure in [Jenkins](https://logstash-ci.elastic.co/view/DRA/).

We define a daily schedule for `snapshot`, but it's commented out for now, until we ramp down the Jenkins job.

Finally, as we've created a dedicated Buildkite team for `logstash`, we place both pipelines under this team.

Relates:

- https://github.com/elastic/ingest-dev/issues/1720
- https://github.com/elastic/logstash/pull/15337
2023-10-02 12:10:59 +03:00
Dimitrios Liappis
05c2627123
[DRA, buildkite] Use GCP vms for package build step (#15356)
We seem to be hitting a weird issue with the psych gem when running in a container:

```
> Task :bootstrap
2023-09-27T15:13:23.844Z [Execution worker Thread 5] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
Error Errno::ENOENT, retrying 1/10
No such file or directory - /buildkite/builds/bk-agent-prod-k8s-1695827479442731913/elastic/logstash-dra-pipeline-ci/vendor/bundle/jruby/3.1.0/gems/psych-5.1.0-java/deps.lst
```

This commit works around this problem by running inside a VM. The underlying root cause (and that gradle should be erroring in this case) will be investigated separately.
2023-09-28 11:16:51 +03:00
Andres Rodriguez
ad3b89a2b4
Clarify Env Variable usage for list-type URI params (#15345)
Clarify Env Variable usage for list-type URI params
2023-09-27 17:24:21 -04:00
Dimitrios Liappis
12a98250cb
[DRA,buildkite] Use AWS aarch64 instance type (#15352)
We've spotted network flakiness downloading artifacts with gradle (connection resets) when using GCP/t2a on us-central1.
This commit switches to AWS Graviton instance types for building the aarch64 artifacts.
2023-09-27 16:41:51 +03:00
Dimitrios Liappis
dd77c9f927
[ci] Commit DRA -SNAPSHOT buildkite pipeline (#15337)
This commit adds support for building + publishing DRA (-SNAPSHOT for now) artifacts for Logstash. It builds on top of #15312 and therefore only targets the `main` branch and is intended to be run manually during a trial period before we retire the corresponding Jenkins job.

The structure is similar to Jenkins:

1. Three steps runs in parallel to build packages, x86_64 docker and aarch64 docker artifacts.

2. Once 1. is successfully done, use release manager to publish the artifacts.

We generate the pipeline steps for 1. and 2. dynamically (with a simple Python script) to avoid repetition for future PRs: we will add a new pipeline in a follow up PR for -STAGING.

The actual shell scripts are simplified copies from the existing `dra*` scripts under https://github.com/elastic/logstash/tree/main/ci; the simplification comes from native support for copying artifacts between steps in Buildkite and
not having to use an intermediate bucket.

Relates: https://github.com/elastic/ingest-dev/issues/1720
Blocked by: https://github.com/elastic/ci/pull/2312/files
2023-09-26 16:00:56 +03:00
Andrea Selva
b31c429d19
Expanded the description how to size the memory of the JVM (#15210)
Expands the description of memory used by Logstash, dividing the heap and non-heap; describing in details which parts composes the non-heap, how to size it and list the JVM settings that can be used to properly define this space.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-09-26 09:13:50 +02:00
Dimitrios Liappis
9af39e8b66
[ci, buildkite] Fix backstage link to logstash ... (#15343)
DRA buildkite job
2023-09-25 14:32:41 +03:00
Andrea Selva
03e0b1a301
Updates CI versions after 8.10.2 (#15339) 2023-09-21 09:24:02 -07:00
github-actions[bot]
23ccdda4f7
Release notes for 8.10.2 (#15336) (#15340) 2023-09-21 10:17:17 -04:00
João Duarte
c33af94faa
Update logstash_releases.json to include 8.10.1 2023-09-20 13:28:40 +01:00
github-actions[bot]
0c31ea4523
Fix releasenotes.asciidoc for 8.10.1 (#15327) (#15331)
Since the DRA build for 8.10.1 was made with 82daae80bb , this fix didn't get in.
(cherry picked from commit aa9265665e)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-09-19 13:05:53 -04:00
github-actions[bot]
48156077bc
Release notes for 8.10.1 (#15326) (#15330)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 4ae4db31fb)
2023-09-19 12:41:18 -04:00
Pavel Zorin
f90647d98d
Sonar integration with Java Tests code coverage (#15279)
* Sonar integration

* Removed sonar from test target
2023-09-15 00:47:38 +02:00
kaisecheng
cd78558121
fix NPE when getting native thread id (#15301)
This commit adds null guard to get the native thread when constructing pipeline report

Fix: #15300
2023-09-14 16:46:26 +01:00
Andrea Selva
4bddfd7d06
Update CI releases after 7.17.13 (#15293) 2023-09-13 16:48:59 +02:00
kaisecheng
03f1a18a77
Update CI releases after 8.10.0 (#15319) 2023-09-13 10:56:50 +01:00
kaisecheng
c204f38718
Release notes for 8.10.0 (#15265) (#15316)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-09-12 14:14:24 +01:00
kaisecheng
236b8cb8cb
bump_ci_8.10.0 (#15315) 2023-09-12 14:14:08 +01:00
Dimitrios Liappis
77d2ec31fa
[CI] Add initial buildkite pipeline for DRA (#15312)
Add initial buildkite pipeline for DRA artifacts.
This is a "hello-world" pipeline skeleton required to iterate on migrating the actual DRA jobs.
This commit also updates the backstage component for logstash to become a top level entity with the
necessary annotations and linked dependencies to pipelines.

Relates https://github.com/elastic/ingest-dev/issues/1720
2023-09-12 12:05:24 +03:00
Andrea Selva
a623377086
Forward port 8.9.2 release notes to main (#15310)
Forward port 8.9.2 release notes to main
2023-09-08 14:47:58 +02:00
Andrea Selva
3d67f8238d
Update CI releases after 8.9.2 (#15295) 2023-09-08 14:47:06 +02:00
kaisecheng
fde473d976
buildkite serverless test against main (#15306)
- test against main branch
- fix rename
2023-09-06 14:40:53 +01:00
github-actions[bot]
0f3330eba2
Update .ruby-version to 9.3.10.0 (#15303) (#15305)
(cherry picked from commit 8e5676d7c6)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-09-05 09:29:58 +01:00
Dimitrios Liappis
bee6749076
[Docs] Update build from source instructions in README.md (#15302)
The instructions to build from source in README.md were outdated. This
commit updates and simplifies them, preferring the use of `gradle`.
2023-09-04 16:50:16 +03:00
kaisecheng
0286f671d2
serverless test use minimum privileges per case (#15264)
This commit splits the privileges per use case and 
removes ilm in template for serverless test
2023-08-31 22:27:43 +01:00
kaisecheng
6b2fa20622
disable xpack API and monitoring pipeline for serverless (#15277)
This commit adds a call to identify serverless cluster before fetching `/_xpack` to verify the license and supported features.
When it is serverless, the license checker uses hardcoded xpack info instead of calling xpack API. The internal pipeline of monitoring is disabled and logs error when configured to use legacy monitoring.

Fixes: 
ingest-dev#2303
ingest-dev#2284

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2023-08-31 17:00:13 +01:00
kaisecheng
da4c918122
bump to 8.11.0 (#15276) 2023-08-23 13:52:30 +01:00
vodorok
8e00989a37
Remove unnecessary whitespace from logstash.yml (#15262) 2023-08-22 09:21:41 -07:00
Andrea Selva
58e23fbdc3
Fix the update of Puma (#15271)
Revert PR #15267 which updated Puma in Gemfile.template and correctly place it in logstash-core.gemspec, beeing a dependency of Logstash core.
2023-08-22 12:32:50 +02:00
Rob Bavey
fe1b1ed1da
Remove DepProxy patch, as Bundler::DepProxy is removed in Bundler 2.4.0 (#15269) 2023-08-21 15:54:01 -04:00
Andrea Selva
afc50eb676
Update Puma (#15267)
Update Puma dependency
2023-08-21 14:11:31 +02:00
kaisecheng
9e48f9cfde
update release version (#15263) 2023-08-17 17:14:15 +01:00
github-actions[bot]
710905248d
Release notes for 8.9.1 (#15244) (#15261)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
(cherry picked from commit db86da61db)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-16 17:44:58 +01:00
kaisecheng
a51c788e0c
[doc] serverless setup endpoint for test (#15249)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-08-16 17:37:12 +01:00
kaisecheng
fb66e9888c
Fix serverless test for api protection (#15252) 2023-08-16 14:02:11 +01:00
Edmo Vamerlatti Costa
499091824b
Fix update oldest segment reference order (#15246)
The DeadLetterQueueWriter#updateOldestSegmentReference was sorting the existing segments by the lexicographic file names. For example, if there are a few segments on the DQL path with index 8, 9 and 10, it was choosing the 10 as the oldest segment instead of 8.
This commit changed it to comparing the segment ID as numbers, so the file deletion will happen following the proper order.
2023-08-16 10:00:08 +02:00
João Duarte
04fd0840fe
bump rake 13 for jruby 9.4 compatibility (#15256) 2023-08-15 22:45:45 +01:00
Mashhur
e890049c1b
Pipeline to pipeline communication acked queue improvements. (#15173)
* Pipeline to pipeline communication acked queue improvements.

* Handle InterruptedException exception in input back, warn message improvement when in-flight events are partially sent and other minor such as descriptive logs, etc improvements.

* Apply suggestions from code review

Check if queue is open after thread acquires the lock.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Apply suggestions from code review

Unite test case improvement: use `assertThrows` when validating the exception.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Pulling off of introducing  wrap with  operations.

* Introduce  functional interface to broadly use to catch the exception types.

* Addressing comments: do not retry sending inflight events on  case. We still throw  if we get error when opening queue.

* will not be reached input retry logic, removing.

* Move queue close check after thread acquiring a lock. Make read next page interface private since it is an internal use purpose.

* Apply suggestions from code review

Leave a comment for the write lock and remove unnecessary warning with `ensure_delivery=>false`

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Remove unused  method, check if current thread acquired lock when accessing next page.

* pq: getting possibly-shared access to next read page is illegal

The private `Queue#nextReadPage()` method requires that the caller has
exclusive ownership of the lock, and failing to have the lock is an
illegal state that cannot be recoverd from; it would leak the
effectively-private `Page` to a caller that cannot reliably use it
without corrupting other callers.

Both callers of this private method already call it with exclusive
access, so this safeguard is merely to prevent future development from
breaking the expectation unknowingly.

As such, we throw an `IllegalStateException`.

* pq: use shared queue-closed check for block and non-block reads

By moving the closed-check from the blocking `Queue#readBatch` to the
shared private `Queue#nextReadPage`, we ensure that both blocking reads
by `Queue#readBatch` and non-blocking reads by `Queue#nonBlockReadBatch`
behave the same when the queue has been closed.

* pq: make exception message constants descriptive

* p2p: clarify comment about cumulating retry behaviour

---------

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2023-08-08 16:05:41 -07:00
Rob Bavey
fd1b3498dd
Forward port of release notes from 8.9.0 (#15230)
Contains the following PRs

Release notes for 8.9.0 (#15162)
8.9 Release notes updated. (#15221)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-08-08 18:00:58 -04:00
Edmo Vamerlatti Costa
88f42f334e
Fix DeadLetterQueueWriter unable to finalize segment error (#15233)
This commit moves the Files.size(...) call into the try catch block, that way, when the oldest segment is deleted by the DeadLetterQueueReader, no NoSuchFileException will be thrown up, and the writer will gracefully update the oldest segment on the next updateOldestSegmentReference invocation (scheduled flush, entry write, delete expired, etc).
It also adds the volatile keyword to the shared mutable variables, making sure that all the changes will be instantly visible among all the running threads (scheduler & writer).
2023-08-08 16:06:44 +02:00
kaisecheng
9af7c7cef4
Serverless test against restricted API key (#15224)
This commit changes the serverless tests to use a restricted API key with necessary permissions and disables Logstash legacy monitoring test.

Fixes: #15234

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-08-02 15:27:46 +01:00
James Rodewig
d196496f36
doc: remove breaking change tags (#15231)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-08-01 19:04:10 -04:00
Rob Bavey
6d4ae5e8e7
Update releases.json with latest released versions (#15219) 2023-07-25 10:24:13 -04:00
João Duarte
dfc61c6693
Update JDK to 17.0.8+7 (#15215) 2023-07-25 10:13:48 +01:00
Andres Rodriguez
3d257083c6
Update lint_docs.yml 2023-07-20 14:19:58 -04:00
Andres Rodriguez
5fbf60ccdf
Create lint_docs.yml 2023-07-20 14:17:36 -04:00
Andres Rodriguez
b082e519c0
Fix typo that caused subtitle not to show (#15202) 2023-07-20 11:22:34 -04:00
Andres Rodriguez
cf67cb1377
Rubocop: Enable most SpaceInside cops (#15201)
Enabled:
* SpaceInsideArrayLiteralBrackets
* SpaceInsideParens
* SpaceInsidePercentLiteralDelimiters
* SpaceInsideStringInterpolation
* Add enforced style for SpaceInsideStringInterpolation

Enabled without offenses:
* SpaceInsideArrayPercentLiteral
* Layout/SpaceInsideRangeLiteral
* Layout/SpaceInsideReferenceBrackets
2023-07-20 09:49:46 -04:00
kaisecheng
0f8695593e
buildkite serverless test (#15150)
This commit adds a Buildkite pipeline to test against serverless endpoint daily

Tests cover 
- es-output
- es-input
- es-filter
- central pipeline management
- legacy monitoring
- dlq
- integration-filter
- kibana API
- metricbeat stack monitoring

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: João Duarte <jsvduarte@gmail.com>
2023-07-19 17:21:53 +01:00
Andres Rodriguez
2165d43e1a
Rubocop: Enable SpaceBefore cops (#15197)
Enables the following cops:

 * Layout/SpaceBeforeBlockBraces
 * Layout/SpaceBeforeBrackets
 * Layout/SpaceBeforeComma
 * Layout/SpaceBeforeComment
 * Layout/SpaceBeforeFirstArg
 * Layout/SpaceBeforeSemicolon
2023-07-18 22:32:17 -04:00
Andres Rodriguez
4255a8fd1c
Rubocop: Enable SpaceAround cops (#15196)
* Enable SpaceARoundBlockParameters
* Enable SpaceAroundEqualsInParameterDefault
* Enable SpaceAroundKeyword
* Enable SpaceAroundOperators
* Enable SpaceBeforeBlockBraces, which yields no changes
2023-07-18 21:11:57 -04:00
Andres Rodriguez
acd87a69e7
Rubocop: Enable various EmptyLine cops (#15194)
Disabled:
 * EmptyLineAfterGuardClause
 * EmptyLineAfterMultilineCondition
 * EmptyLinesAroundAccessModifier

Enabled:
 * Layout/EmptyLineAfterMagicComment
 * Layout/EmptyLineBetweenDefs
 * Layout/EmptyLines
 * Layout/EmptyLinesAroundArguments
 * Layout/EmptyLinesAroundAttributeAccessor
 * Layout/EmptyLinesAroundBeginBody
 * Layout/EmptyLinesAroundBlockBody
 * Layout/EmptyLinesAroundExceptionHandlingKeywords
 * Layout/EmptyLinesAroundMethodBody
 * Layout/EmptyLinesAroundModuleBody
2023-07-18 16:49:16 -04:00
Andres Rodriguez
d95a0bba74
Fix deprecated ERB and BigDecimal instances (#15189) 2023-07-18 08:48:01 -04:00
Andrea Selva
5d6aa105b0
Script to run all plugins tests and try an install, rooting in local Logstash (#15018)
Implements a script to test all supported plugins against Logstash/JRuby, in particular it uses the JRuby(and JDK) bundled with Logstash to execute the unit tests, create the gem and install the gem on local Logstash.

This doesn't start a real pipeline run into the local Logstash, but should be enough to reveal macroscopic Ruby syntax compatibility errors.

Refer to PR  https://github.com/elastic/logstash/pull/15018 for usage examples.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2023-07-18 10:37:44 +02:00
Andres Rodriguez
1d558c35d0
Fix instances of deprecated class methods (#15183)
Replace ::File.exists? for ::File.exist?
2023-07-17 11:32:46 -04:00
Andres Rodriguez
cb19d4e88a
Add rake lint task to correct custom cods
Add a rake task that allows users to correct all the instances of a specific cop.
2023-07-14 16:48:53 -04:00
Andres Rodriguez
b63ffea472
Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon (#15180)
Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon and fix occurrences.
2023-07-14 16:46:35 -04:00
Andres Rodriguez
26ff2f7db9
Enable Style/TrailingEmptyLines and fix ocurrences (#15179) 2023-07-14 14:46:33 -04:00
Andres Rodriguez
5e34aacc6e
Enable trailing whitespace formating (#15174)
* Enable Layout/TrailingWhitespace cop formation
* Remove Trailing Whitespaces
2023-07-14 13:22:02 -04:00
Edmo Vamerlatti Costa
6463a4aab1
Add API SSL supported protocols setting (#15166)
This commit adds a new Logstash API setting to configure the SSL/TLS supported protocols (api.ssl.supported_protocols).
2023-07-14 14:21:20 +02:00
Andres Rodriguez
6154a69c15
Add basic ruby linter (#15168)
Adds rubocop as a linter for ruby.:
 - Adds .rubocop.yml which defines specific config on top of default
 - Adds Gradle task 'lint' task
 - Adds 'lint:report' rake task to report Lint Cops.
 - Adds 'lint:format' rake task to automatically format the code.
2023-07-13 17:18:10 -04:00
Mashhur
07b663561c
Snyk scans Logstash container vulnerabilities. (#15117)
* Snyk scans Logstash container vulnerabilities.

* Exclude integ test and tools when Snyk scanning.

* Remote repo url fix for main branch.

* Update .buildkite/scripts/snyk/report.sh

Simplify the logic to retrieve the version from `versions.yml`

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

* Add backstage definition for Snyk Report pipeline.

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2023-07-12 14:54:03 -07:00
Andres Rodriguez
c2bbed8266
Add initial PQ sizing doc (#15033)
Add storage sizing guidance for Persistent Queues.

Co-authored-by: Karen Metts <karen.metts@elastic.co>
Co-authored-by: Joao Duarte <joao@elastic.co>
2023-07-12 17:45:49 -04:00
Edmo Vamerlatti Costa
7c472b4498
Updated puma gem from 5.6 to 6.3 (#15158)
This commit updates the puma gem from version 5 to the latest version 6.3.
A few breaking changes were introduced in Puma 6.0.0, which required some refactoring on the Logstash side, especially to adapt it to the "Extracted LogWriter from Events #2798" changes.
Before this PR, all the logs generated by Puma were using the debug level, even the ones that were actually errors and needed attention/action from the users. This commit also changes the log level as following:
error(...): changed from debug to error
unknown_error(..): changed from debug to error
2023-07-12 17:46:34 +02:00
Andres Rodriguez
0092a82a93
Bundle ESF forwarder (#15126) 2023-07-10 18:10:52 -04:00
Edmo Vamerlatti Costa
2adf488164
[Doc] Add monitoring/management SSL regression note on release 8.8.0 (#15090) 2023-07-10 16:14:22 +02:00
Rob Bavey
902b386413
Remove license header from settings.xml template (#15131)
When using a proxy with the plugin manager, this template is written to `~/.m2/settings.xml`. The
license header is also copied, which generates invalid XML which maven cannot parse.
2023-06-30 13:39:21 -04:00
Rob Bavey
9f14c649ff
Update released versions (#15129) 2023-06-30 13:37:36 -04:00
Rob Bavey
2176eb603a
Forward port Release notes for 8.8.2 (#15116) (#15132)
* Update release notes for 8.8.2

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-06-30 12:41:08 -04:00
João Duarte
1d1fa7a471
update commons-io commons-compress jrjackson databind (#15125)
* update commons-io to 2.13.0 and commons-compress to 1.23.0

* update databind and jackson
2023-06-29 09:02:32 +02:00
João Duarte
98c3d30ca8
Remove custom bundler (#15066)
* reintroduce bundler patches for bundler < 2.4
2023-06-29 08:59:54 +02:00
João Duarte
a8a5442e58
Update catalog-info.yaml 2023-06-28 16:58:41 +02:00
João Duarte
1022a8f63a
Update serverless_integration_pipeline.yml to invoke es output test 2023-06-28 14:58:24 +02:00
João Duarte
9f0e820b86
Update catalog-info.yaml to use core_serverless_test on serverless test 2023-06-28 14:56:39 +02:00
João Duarte
0a35754392
Delete serverless_pipeline.yml 2023-06-28 13:37:33 +02:00
Andrea Selva
26d1c7ccdb
Update to JRuby 9.4 (#14861)
Set of changes to make Logstash compatible to JRuby 9.4.
Bundle JRuby 9.4.3.0

- Redefine space token in `LSCL`  and `grammar` treetop from `_` which would generated methods in the form `def _0` (deprecated since `2.7`) to `sc`.
- `I18n.t` method doesn't accept hash as second argument
- `URI.encode` has been replaced with same functionality with `URI::Parser.new.escape`
- `YAML.load` needs explicit `fallback: false` to return false when the yaml string is empty (or contains only comments)
- JRuby's  `JavaClass` has been removed, now it can use `java.lang.Class` directly
- explicitly require gem `thwait` to satisfy `require "thwait"` (In `Gemfile.template` and `logstash-core/logstash-core.gemspec`)
- fix not args `clone` to be `def clone(*args)`
- fix `Enumeration.each_slice` which from `Ruby 3.1` is [chainable](https://rubyreferences.github.io/rubychanges/3.1.html#enumerableeach_cons-and-each_slice-return-a-receiver) and doesn't return `nil`. JRuby fixed in https://github.com/jruby/jruby/issues/7015
- Expanded `Down.download` arguments map ca16bbed3c302006967413eb9d3862f2da81f7ae
- Avoid to pass `nil` in the list of couples used in `Hash[ <list of couples> ]` which from Ruby `3.0` generates an `ArgumentError`
- Removed space not allowed between method name and parentheses `initialize (` is forbidden. 29b607dcdef98f81a73ad171639fd13aaa65e243
- With [Ruby 2.7 the `Kernel#open`](https://rubyreferences.github.io/rubychanges/2.7.html#network-and-web) doesn't fallback to `URI#open`, fixed test code that used that to verify open port. e5b70de54c5301f51a767da67294092af0cfafdc
- Avoid to drop `rdoc/` folder from vendored JRuby else `bin/logstash -i irb` would crash, commit b71f73e9c6edb81a7b7ae1305047e506f61c6e8c

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-28 13:05:43 +02:00
João Duarte
019bb9547c
Update catalog-info.yaml fix indentation and change trigger mode 2023-06-28 09:35:18 +02:00
João Duarte
85891f4679
Update catalog-info.yaml fix spec indentation in pipeline definition 2023-06-28 09:13:00 +02:00
João Duarte
c8812eeb91
Update catalog-info.yaml to introduce resource encapsulating pipeline 2023-06-27 17:30:12 +02:00
João Duarte
52f5650abd
Update catalog-info.yaml to define a component + pipeline instead of resource (#15121) 2023-06-27 16:56:43 +02:00
João Duarte
caff3bf1ce
Rename serverless_integration_pipeline.yml.yml to serverless_integration_pipeline.yml 2023-06-27 16:54:34 +02:00
João Duarte
0998b6a398
reshape catalog-info (#15120)
allow for multiple pipeline definitions
2023-06-27 15:24:50 +02:00
João Duarte
403c361bb1
fix yaml structure for catalog-info (#15119) 2023-06-27 14:45:30 +02:00
elastic-backstage-prod[bot]
a9112fc8f7
Create catalog-info file (#15072)
This will eventually replace the pipeline definition in the catalog repo, using the local file instead.

---------

Co-authored-by: elastic-backstage-prod[bot] <123036547+elastic-backstage-prod[bot]@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-27 12:29:30 +02:00
kaisecheng
e919305fee
placeholder for serverless test in buildkite (#15112)
Use any Buildkite agent for empty serverless pipeline.

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-06-26 22:11:46 +02:00
Mashhur
6f6a446f3c
Install Java on Buildkite Agent. (#15097) 2023-06-22 09:10:33 -07:00
Mashhur
2ccf1a0596
Upgrade bundler version used in ruby utils. (#15109) 2023-06-22 10:11:15 +01:00
Rob Bavey
22dc7a8a91
Bump version to 8.10.0 (#15103) 2023-06-21 09:54:29 -04:00
Mashhur
e3b9324602
Read Snyk token from logstash repo scoped vault. (#15096) 2023-06-20 13:29:47 -07:00
Mashhur
9c080eac53
Snyk Integration (#15083)
* This commit includes number of changes:
- adds initial pipeline steps, each step proceeds one branch report job
- a script to resolve current and previous release latest branches from the release URL. Noting that it considers the branches from snapshots where upcoming releases will be our interest.
- pseudo logic to download logstash, build and report to Snyk. In order to script fully work we need a logstash machine to access Buildkite vault, which I am working.

* Source optimization and use Buildkite Vault to access to Snyk token.

* Add git branch and head to Snyk project tag.

* Dynamically resolve latest branches instead of manually defining.

* Update .buildkite/scripts/snyk/report.sh

Improve comment readability.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-20 08:25:21 -07:00
Edmo Vamerlatti Costa
52bbbaa054
Change shutdown stalled method to also include the main/pipeline thread (#15056)
This commit changed the java_pipeline.rb to include the pipeline/main thread on the stalling threads info list, that way, Logstash can provide users with more helpful information when the stalling thread is the pipeline/main one.
2023-06-20 14:48:45 +02:00
Ry Biesemeyer
c187158b58
Forward-port Release notes for 8.8.1 (#15085) (#15086)
* Update release notes for 8.8.1

* Update releasenotes.asciidoc

* Update docs/static/releasenotes.asciidoc



* Update docs/static/releasenotes.asciidoc

* Update docs/static/releasenotes.asciidoc

* Update docs/static/releasenotes.asciidoc



---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-06-08 00:08:04 -07:00
Andres Rodriguez
0b68a36e28
Remove obsolete plugin version notice (#15032)
* Remove unneeded tests
2023-06-02 10:35:35 +01:00
Andrea Selva
755fcf8843
Forward port release notes for 8.8.0 (#15062) 2023-05-26 09:08:04 +02:00
Andrea Selva
e5f35df62b
Update versions used in plugins CI (#15061) 2023-05-26 09:07:03 +02:00
David Kilfoyle
b831888318
[Docs] Add instructions to verify Docker install images (#15058)
* Add instructions to verify Docker install images

* remove line breaks

* Update docs/static/docker.asciidoc

Co-authored-by: Maxime Gréau <maxime.greau@elastic.co>

---------

Co-authored-by: Maxime Gréau <maxime.greau@elastic.co>
2023-05-24 08:46:05 -04:00
João Duarte
feb3ee0506
use setLoadPaths instead of RUBYLIB (#15059) 2023-05-24 11:06:00 +01:00
João Duarte
fd2b1ff340
added psych to dependency list and updated NOTICE.txt (#15050)
* replace jruby-complete with jruby-core in build tasks
* place bundler in the rubylib path for testing
2023-05-23 14:16:40 +01:00
Edmo Vamerlatti Costa
e76e582086
Add missing Elasticsearch SSL settings and replace deprecated options (xpack.monitoring and xpack.management) (#15045)
This commit adds missing Elasticsearch SSL settings and replaces deprecated options being used on `xpack.monitoring.*` and `xpack.management.*` settings:

Changes:
- Updated deprecated monitoring and management Elasticsearch's SSL settings so no warnings are logged.
- Added monitoring settings support for file-based certificates and for the cipher suites: `xpack.monitoring.elasticsearch.ssl.certificate`, `xpack.monitoring.elasticsearch.ssl.key`, and `xpack.monitoring.elasticsearch.ssl.cipher_suites`.
- Added management settings support for file-based certificates and for the cipher suites: `xpack.management.elasticsearch.ssl.certificate`, `xpack.management.elasticsearch.ssl.key`, and `xpack.management.elasticsearch.ssl.cipher_suites`.
2023-05-15 11:54:38 +02:00
Ry Biesemeyer
519f3fb2e0
Plugin flow docs fixes (#14820)
* docs: fix example block syntax types and truncations

* docs: provide wrapping hints to flow metric tables

* docs: refresh node stats api response examples

include only `current` and `lifetime` metrics that are GA, and not
technology preview metrics.

* docs: use "m(onospace)" modifier for metric name columns

* docs: swap literal column to first

relies on `#guide table td:first-child .literal` having `white-space: nowrap`
2023-05-10 23:02:39 -07:00
David Kilfoyle
af47b7b478
Fix link to loadbalance in Filebeat ref (#15034) 2023-05-08 09:37:45 -04:00
João Duarte
139acd1058
Update logstash_releases.json with the releases of 7.17.10 and 8.7.1 (#15037) 2023-05-02 09:57:44 +01:00
github-actions[bot]
28880711d1
Release notes for 8.7.1 (#15024) (#15029)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 6ae1987c95)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-27 15:30:20 +01:00
Andrea Selva
643bb0c5c2
Bumped versions.yml for 8.9 cycle (#15022) 2023-04-26 10:50:45 +02:00
Andrea Selva
c0a5665f52
Fix duplicate description for storage_policy in yaml config files (#15014)
With PR #13923 was described how the DLQ storage_policy behaves. With PR #14261 was introduced a duplication of the description in logstash.yml.

This commit resolves the duplication and keeps the latest description that seems more direct expressive.
2023-04-20 16:04:36 +02:00
João Duarte
d7c81dfece
Update JDK to 17.0.7+7 (#15007) 2023-04-20 10:44:36 +01:00
Andrea Selva
1016c59290
Fix DLQ scheduled checks removes expired age segments (#15000)
Modifies the logic used by the scheduled task flusher so that execute age policy also in case the current (head) segments is not stale (haven't received any write, and the segment is empty).
This means that generally used finalize segment logic is applied plus a reinforcement step to grant the age policy is respected.
However this PR:
- introduced new debug log lines, improving the description of the context when a segment is finalized (because the DLQ is closing or  because the segment file has reached its maximum size or because the flush interval expiration). This is done with the introduction of `SealReason` enumeration.
- introduces `Awaitility` test dependency to improve the testing of asychronous conditions.
2023-04-19 17:32:19 +02:00
João Duarte
0df07d3f11
Reintroduce bundler 2.4 (#14995)
* Revert "Revert "Unpin bundler to allow 2.4 (#14894)" (#14942)"

This reverts commit 5e3038a3d3.

* prevent bundler 2.4 from blowing up memory during ./gradlew generatePluginsVersion

for some reason, instances of Bundler::Dsl are retained in
org.jruby.MetaClass. Each Bundler::Dsl will retain Bundler::SourceList
which is > 150MB. This commit sets the internal state of each Dsl's
source list so the large objects can be collected.

The proper fix would be to either reuse a single Dsl object or fix the
code upstream to avoid having Dsl objects retained by org.jruby.MetaClass.

* skip input cloudwatch during generatePluginsVersion

the new bundler 2.4's resolution algorithm seems to struggle in certain
situations, like resolving combination of "logstash-input-cloudwatch" and
"logstash-integration-aws".

Until the issue is solved let's skip it.
2023-04-12 10:11:07 +01:00
Ry Biesemeyer
cb9316b486
document infinite flow metric rates (#14975) 2023-04-11 18:43:37 +01:00
Andrea Selva
137168d1c6
Negative ack of batch aborted by plugin (#14940)
Modify the WorkerLoop to catch the newly introduced exception org.logstash.execution.AbortedBatchException so that an inflight batch could be negatively ACK-ed. This feature is used in combination with PQs to let exit plugins without completing the processing. Any filter and output already executed for the batch will be executed again next time the batch is picked by the persistent queue.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-04-04 10:07:15 +02:00
kaisecheng
f6b14b9a28
Update ci release version 8.7.0 (#14983) 2023-04-02 16:31:21 +01:00
Andres Rodriguez
a1166cc9ba
Fix system unit TimeoutStopSec on older version. (#14947)
Fixes the system unit TimeoutStopSec option to set 0 on older version that do not support 'infinity'.
Also handles the upgrade case where the OS may not automatically upgrade the systemd file.
2023-03-31 14:38:11 -04:00
kaisecheng
311d4dc30e
[Forwardport] Release notes for 8.7.0 (#14972) (#14982)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-03-31 14:38:22 +01:00
kaisecheng
f6d4550ff0
Fixed the DLQ writer to bypass 1 byte entry (#14970)
In commit, DLQ writer skips searching segments with 1 byte during the search of the oldest segment timestamp in the initialization

Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
2023-03-28 11:37:09 +01:00
DeDe Morton
58abffce33
[DOCS] Describe how to use Elastic Agent to monitor Logstash (#14959)
* [DOCS] Describe how to use Elastic Agent to monitor Logstash

* Apply suggestions from code review

Co-authored-by: Kevin Lacabane <klacabane@gmail.com>

* Remove reviewer questions

* Apply suggestions from code review

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

* Fix security statement

---------

Co-authored-by: Kevin Lacabane <klacabane@gmail.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-03-23 11:22:56 -07:00
João Duarte
5e3038a3d3
Revert "Unpin bundler to allow 2.4 (#14894)" (#14942)
This reverts commit 6d08a7c1cd.

Bundler 2.4 is accumulating memory during the `generateDocsVersion` task
outside of the known Bundler 2.3 DepProxy class.
Until the memory mitigation patch is adapted to Bundler 2.4 it's best to revert 6d08a7c1cd.
2023-03-23 11:45:24 +00:00
Andres Rodriguez
56e626afc5
Allow usage of dead_letter_queue.retain.age in pipeline settings (#14954)
* Allow usage of dead_letter_queue.retain.age in pipeline settings (Closes: 14951)
2023-03-21 09:57:59 -04:00
Andrea Selva
a126364102
Centralized version definition for snakeyaml and shadow plugin used in buildscripts (#14952)
Create a variable in the Gradle's 'ext' map to store the versions of libraries and plugins used across the various .gradle files.
2023-03-10 16:50:16 +01:00
Andres Rodriguez
2f57453822
Revert partial change in c99a7b2f4 that broke packaging builds (#14955)
Fixed: #14941
2023-03-09 22:19:45 +00:00
kaisecheng
c99a7b2f46
Add env LOG_STYLE to control the log behavior (#14949)
This commit adds environment variable LOG_STYLE to control log behavior of docker container
`console` - this is the default to output to standout
`file` - log to disk.

Fixed: #14941
2023-03-08 23:25:33 +00:00
Andres Rodriguez
445a15489d
Update project-board-assigner.yml 2023-02-27 13:04:25 -05:00
Andres Rodriguez
3f17620194
Create project-board-assigner.yml 2023-02-27 12:58:28 -05:00
Andres Rodriguez
fdcaa5dbf5
Update platform_logstash_project_board.yml 2023-02-27 12:34:47 -05:00
Andres Rodriguez
5ecbbf8c54
Update platform_logstash_project_board.yml 2023-02-27 12:26:18 -05:00
Andres Rodriguez
6d0ab95362
Update platform_logstash_project_board.yml 2023-02-27 12:23:18 -05:00
Andres Rodriguez
c1ecd3879f
Update platform_ingest_docs_project_board.yml 2023-02-27 12:22:57 -05:00
Andres Rodriguez
fbb747ad84
Create platform_ingest_docs_project_board.yml 2023-02-27 12:17:25 -05:00
Andres Rodriguez
0759ddfa11
Rename platform_ingest_project_board.yml to platform_logstash_project_board.yml 2023-02-27 12:14:23 -05:00
Andres Rodriguez
a8b6315f1a
Update platform_ingest_project_board.yml 2023-02-27 12:08:38 -05:00
Andres Rodriguez
6524a19440
Update platform_ingest_project_board.yml 2023-02-27 12:01:10 -05:00
Andres Rodriguez
16f4ba84a5
Update platform_ingest_project_board.yml 2023-02-27 11:56:43 -05:00
Andres Rodriguez
57c1ca4aca
Update platform_ingest_project_board.yml 2023-02-27 11:51:46 -05:00
Andres Rodriguez
7d30dc68cd
Rework project actions (#14917)
Rework GitHub Actions to add to multiple projects depending on label.
2023-02-27 11:48:44 -05:00
Andres Rodriguez
836a36e938
Update platform_ingest_project_board.yml 2023-02-27 11:17:14 -05:00
João Duarte
6d08a7c1cd
Unpin bundler to allow 2.4 (#14894)
* use Bundler::SolveFailure
2023-02-22 17:05:16 +00:00
Mashhur
5f3f18c9b0
Release notes for 8.6.2 (#14896) (#14914)
* Update release notes for 8.6.2

* Apply suggestions from code review



---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2023-02-22 11:44:46 +05:00
Mashhur
34dcdad62c
CI LS version bump, 8.6.2 (#14911) 2023-02-21 15:39:20 +05:00
Andrea Selva
3d84b82e1c
Fix inversion of pluginId and pluginType parameteres in DLQ entry creation (#14900)
Pass the argument in correct order when calls DeadLetterQueueWriter.writeEntry from PluginDeadLetterQueueWriterExt.
Adds a unit test to verify the DLQ writer-read interaction.
2023-02-14 16:05:12 +01:00
Mashhur
3875a24cda
Skip dependency Gemfile.lock during the artifact creation. (#14899)
* Skip dependency Gemfile.lock during the artifact creation. This will help vulnerability scanners not to confuse while scanning.

* Apply suggestions from code review

Add to exclude `Gemfile`, apply pattern to include shared gems as well.
2023-02-13 19:55:43 +05:00
Andrea Selva
02b83e3840
Fix DLQ age retention policy to be applied also in case head segment is untouched (#14878)
This PR fixes a bug on DLQ age policy not executed if the current head segment haven't receives any write.
The change update the `flushCheck` method, executed both on DLQ writer close and also by the scheduled flusher, so that the `executeAgeRetentionPolicy` is invoked also when the current writer hasn't received any writes.
Adds some test, and to separate the testing of the close from the scheduled flush a new constructor's parameter is added, and consequently updated builder utility.
2023-02-13 10:39:43 +01:00
João Duarte
281ce70d86
Workaround for #14873 (#14890)
import platform-specific ffi binaries from JRuby 9.3.9.0 to overcome jruby/jruby#7579

Since JRuby ignores the files in "lib/jni" and uses the ones inside "lib/jruby.jar" instead, we have to inject the older versions into the new JRuby's "jruby.jar"

fixes #14873
2023-02-11 12:20:58 +00:00
João Duarte
6911a71178
add license information for snakeyaml (#14886) 2023-02-09 20:04:14 +00:00
João Duarte
15b2d88647
bump snakeyaml to 1.33 (#14881)
ensure logstash-core picks up 1.33 as well from jackson-data format-yaml's
transititive dependency.
2023-02-09 18:20:03 +00:00
Mashhur
0600ff98bb
Bump to 8.8.0 (#14874) 2023-02-08 09:14:13 +05:00
João Duarte
fb8cfb2f1d
set rpm_digest to sha256 instead of default md5 (#14864)
this allows FIPS enabled Operating Systems to validate the RPM package
2023-02-02 15:37:57 +00:00
João Duarte
1b7820a7ae
update jruby to 9.3.10.0 (#14865)
* Fixed regression which caused longer strings to match slower https://github.com/jruby/jruby/issues/7484

fixes https://github.com/logstash-plugins/logstash-filter-grok/issues/185
2023-02-02 15:22:06 +00:00
João Duarte
d2858ffd66
Update releases list to include 8.6.1 2023-01-26 21:54:23 +00:00
kaisecheng
46443e460d
Guard reserved tags field against incorrect use (#14822)
Reject illegal value assigning to `tags` field. Top-level `tags` should only accept string of array of string. 
When `tags` got illegal value on event creation, LogStash::Event will rename the field to `_tags` and add a tag `_tagsparsefailure` to `tags`. 
When `tags` got illegal value on `set` operation, LogStash::Event will throw exception.

Add a flag `--event_api.tags.illegal` to allow fallback to old logic. There are two options.
`warn` - the old flow that allows illegal value assignment to tags field.
`rename` - the new flow. This is the default value in 8.7

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-01-25 15:14:18 +00:00
Andrea Selva
3516986a38
Update bundeld JDK to 17.0.6+10 (#14849) 2023-01-24 18:25:17 +01:00
Pamir
50c395a443
Update snakeyaml to 1.33 2023-01-23 10:56:40 +00:00
Mashhur
d1f3415d82
jrjackson and jackson versions bump. (#14845) 2023-01-18 22:01:15 +05:00
Andres Rodriguez
518665ea59
[doc] update Debian/Ubuntu instructions following apt-key deprecation (#14835)
Update Debian/Ubuntu instructions following apt-key deprecation
2023-01-17 11:21:38 -05:00
Ry Biesemeyer
42ce9fc3e4
metrics: remove delayed implementation of timers interface (#14815)
The delayed implementation `AfterCompletionTimerMetric` of the `TimerMetric`
interface, introduced along-side that interface's introduction to replicate
the previous (undesired) behaviour, is superceded by an already-merged live-
tracking implementation that is effectively as performant when not under
concurrent contention and still reasonably performant when a single timer is
contended across multiple threads.

The `metric.timers` setting removed here has not been a part of any Logstash
release and can safely be removed without going through the normal deprecation
path; from the user's perspective this removal combined with the previously-
merged work is simply an improvement to the accuracy of the existing timer
metrics exposed via our API.
2023-01-12 15:31:09 -08:00
Andrea Selva
6bbe0700da
Retrive JVM_VERSION from Logstash's home directory (#14797)
Updates bootscripts common part to retrieve the JVM_VERSION file from the Logstash home directory
2023-01-12 13:56:51 +01:00
Andrea Selva
a7027dc547
Update CI configured versions after 8.6.0 release (#14830) 2023-01-11 08:02:22 +01:00
Andrea Selva
775a718605
Forward port of 8.6 and 8.5.3 release notes to main (#14833)
* Forward port of 8.6 and 8.5.3 release notes to main
* Better phrasing for pipeline level metrics feature

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-01-10 11:34:47 +01:00
Andrea Selva
01876d2ca7
Pins murmurhash3 to last version with java library (#14832)
Pins murmurhash3 to last version with java library
2023-01-10 11:32:53 +01:00
Edmo Vamerlatti Costa
e4dc82a9b3
Add setting to disable the GeoIP database downloader (#14823)
This commit adds a new logstash.yml setting "xpack.geoip.downloader.enabled" to disable the GeoIP databases auto-update feature. When disabled, Logstash will fall back to the CC database license indefinitely and delete any previously downloaded EULA databases.

Closes #14724
2023-01-05 15:46:35 +01:00
Mashhur
cfafce23c6
Plugin throughput, worker utilization and worker cost per event flow metrics. (#14743)
* Initial effort to initialize plugin flow metrics. Followings are addressed:
- Namespace store is shaped with RubySymbol key but filter and output codecs were using string key. This commit intends to standardize the namespace key with RubySymbol for filter & output codecs.
- Initializes throughput flow metrics for the input plugins.
- Initializes the worker cost per event and worker utilization for the filter and output plugins with only uptime metrics but it should combine with worker count, will be implemented in next commits.
- Fetching codec ID generated in ruby scope is possible but problematic to in Java scope. We will skip codec flow metrics since they are rarely produce the hard times.

* Worker utilization metrics implementation.

- Worker count will be provided as a fraction to the flow metrics. At the time when we fetch the metric value, fraction is applied.

* Unit tests added for fractured extended & simple metrics.

* Code review change requests applied.

- To simplify the scale (or fraction) at metric get value time, we can introduce the wrapper (`UpScaleMetric`) that applies the scale at metric value fetch time.
- Unit test added for `UpScaleMetric`
- We don't touch the codec namespace shape for now since we skipped codec metrics.
- Unused sources removed.

* Worker utilization and worker cost per event explanation added in the documentation.

* Integration test added for plugin-level flow metrics.

* Apply suggestions from code review

- Integration test failure fix: input plugin ID is not always in context config.
- Suggestions to simplify integration test source and rollback to intentional namings.
- Metrics explanation improvement in the doc.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* plugin flow: fix units; pass UptimeMetric and scale when needed

Aligns the units of the newly-introduced plugin metrics with the specification,
and passes our `UptimeMetric` through to the individual helper methods so that
they can scale appropriately for their context and our type-checker can ensure
we don't receive an incorrectly-scaled `Metric<Long>`.

Input `throughput`
------------------

all throughput metrics should be expressed in events-per-second; this
per-plugin scoped view of the pipeline's `input_throughput` flow should be
expressed in the same units.

Filters, Outputs `worker_utilization`
-------------------------------------

> a worker_utilization (duration / (uptime * worker count)) shows what percent
> of available resources an individual plugin instance is taking and can help
> identify where the blocker is.

To achieve this, we need to divide millis used by _millis_ available.

Filters, Outputs `worker_cost_per_event`
----------------------------------------

> we also provide a (to be named) cost-per-event metric (duration / event) to
> surface issues with a plugin that operates on a very small subset of events
> (via conditionals) but contributes disproportionately to the cost of getting
> its events through.

We start with a baseline of seconds-per-event, and acknowledge that this may
need to be scaled to a more understandable number before merging.

* plugin flow: express cost per event in millis per event

The "worker cost per event" metric when expressed as an inverse per-worker
throughput in seconds-per-event produces a range of values that are not
particularly easy to compare at-a-glance, with "nearly free" operations
being expressed in negative-exponent scientific notation and extremely
expensive operations being expressed with single-digits.

By scaling this metric up by a factor of 1000 to "millis per event" or its
eqivalent "seconds per thousand events", the resulting numbers in practice
are easier to make sense of:

+------------------------+--------------+---------------+------------+
| EXAMPLE        / SCALE |    s/event   |    ms/event   |  µs/event  |
+------------------------+--------------+---------------+------------+
| no-op mutate @ 12k eps | 8.33e-05     |        0.0833 |       83.3 |
| stdout w/ dots codec   |     0.000831 |        0.831  |      831   |
| ES out 1s RTT/125      |     0.008    |        8      |     8000   |
| ES out 30s retries/125 |     0.24     |      240      |   240000   |
| ES filter 1s/event     |     1        |     1000      |  1000000   |
| grok 30s timeout       |    30        |    30000      | 30000000   |
+------------------------+--------------+---------------+------------+

* plugin flow: reshape docs

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2022-12-16 14:11:21 -08:00
Rob Bavey
7e25a0d76a
Update Ironbank base image to 8.7 (#14812) 2022-12-16 10:12:09 -05:00
Edmo Vamerlatti Costa
21a298635c
Fix pipeline compilation to make it fail when multiple top-level codec per plugin are specified #14810
Logstah currently does not support multiple top-level `codec` per plugin. This commit fixes the pipeline compilation ensuring that erroneously configured plugins fail to compile and result in a configuration error.
2022-12-16 13:29:22 +01:00
Andres Rodriguez
3fee1429c4
Update platform_ingest_project_board.yml 2022-12-15 12:51:27 -05:00
Andres Rodriguez
115a310f26
Update platform_ingest_project_board.yml 2022-12-14 15:00:42 -05:00
Andres Rodriguez
284ff27958
Update platform_ingest_project_board.yml 2022-12-14 14:57:28 -05:00
Andres Rodriguez
e81019c89f
Update platform_ingest_project_board.yml 2022-12-14 14:39:08 -05:00
Andres Rodriguez
d2080b8796
Update platform_ingest_project_board.yml (#14814) 2022-12-14 14:34:04 -05:00
Andres Rodriguez
58b22a391b
Update platform_ingest_project_board.yml (#14813)
Fix actions to add docs
2022-12-14 14:28:03 -05:00
Andres Rodriguez
59c693a7b5
Update platform_ingest_project_board.yml (#14801)
Include automation for docs label.
2022-12-14 14:21:22 -05:00
Ry Biesemeyer
e121650e56
live timers: API boundary, implementation, opt-in (#14748)
* live timers: introduce API boundary

Introduces an API boundary for timers as a first-class metric, as described
in elastic/logstash#14675, and migrates all known internal timers to use the
new API boundary for tracked execution.

Please refer to the specification for details on motivations.

This commit is net zero change to behaviour, and introduces a single new
undocumented setting `metric.timers` to `logstash.yml`, which presently only
takes its default value `delayed` to indicate that delayed committing of
execution time is acceptable.

It implements the new `TimerMetric` API in a way that is also net-zero-change.
Tracked executions are still performed by marking a start time, performing
the tracked execution, and incrementing an underlying long-type counter with
the number of elapsed milliseconds _after_ execution has completed. This means
that long-running execution is still missing from the metric until it has
completed.

The new Timer API is available to both the Ruby- and the Java-based plugin APIs

* timer metrics: sub-package and add baseline tests

* WIP: move execution metric ownership out of queue

* noop: remove useless abstract method

Our `AbstractMetric` implements `Metric` and does not need to declare
an abstract override of `Metric#getType`. Doing so prevents interfaces
from providing a default override for all implementers.

* timer metric tests: extract util, refactor for reuse

* timers: accumulate milli-excess-nanos

* live timers: single-checkpoint implementation

* timer metric: use explicit type parameters to make intent clear

* remove unused imports

* use safe int conversion

* test fixup: use given name for tested metric

* test helper: TimerMetricFactory prefers nanotime supplier

* timers: flesh out test coverage, incl live-timers

* test: move validation of queue-read metrics to ObservedExecution

* flow: support non-moving denominator (±infinity)

* metrics: add metric config pass-through to env2yaml
2022-12-13 13:35:53 -08:00
Lisa Cawley
f21edfb7ea
[DOCS] Remove glossary from Logstash Reference (#14808) 2022-12-12 09:51:23 -08:00
kaisecheng
52d2d2e57a
update ci release file (#14807) 2022-12-12 13:54:54 +00:00
Mashhur
43d1c8cdf4
Logstash is logging unnecessary pipeline configuration. (#14779)
* Remove unnecessary IR graph loggings.

* Add the guides for protecting sensitive info leaking in the logs.

  `CONTRIBUTING.md` now contains the guide to prevent sensitive info leaking in the debug logs.

  Fixes: #14778
  Pull-request: #14779

* Add sample source codes to the `CONTRIBUTING.md`.

* Apply suggestions from code review

Contribution guide for using sensitive data in Logstash improved.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-12-07 15:11:26 +05:00
Andrea Selva
720996fa7c
Cover all #system invokation with exit code checking, eventually failing the execution of Rake task (#14782)
Covers all invocations of system Ruby method inside artifcts.rake script to check the exit status and eventually raise an exception.
2022-11-30 16:02:27 +01:00
Andrea Selva
7a39d97055
Avoid to create and upload AARCH64 Docker images for UBI8 (#14786)
On ARM architecture UBI8 Docker images aren't created, so avoid to create empty tar.gz files.
2022-11-29 11:21:08 +01:00
Andrea Selva
2e5e49d10d
[DRA] Avoid to loose err code on docker save (#14780)
* [DRA] Force docker save to save directly on file instead of pipe to another command loosing the execution error code
2022-11-28 16:47:04 +01:00
João Duarte
394abbd4b1
bump jruby to 9.3.9.0 (#14694)
fixes Encoding bug on Windows https://github.com/jruby/jruby/issues/7367
2022-11-28 15:35:10 +00:00
Andrea Selva
10d6530f8b
Forward port 8.5.2 release notes (#14775) 2022-11-23 11:10:51 +01:00
Andrea Selva
aa73187d93
Update CI used versions after 8.5.2 release (#14772) 2022-11-22 18:39:30 +01:00
Ry Biesemeyer
4941c25f32
fix: calculated inflight_count from in-flight batches (#14760)
During stalled shutdowns while waiting for in-flight batches to complete,
our shutdown watcher emits helpful information about what work is in flight,
including the actual threads and plugins that are still executing.

Since ~6.3.0, the `inflight_count` metric in this log message has always
been `0`, in part because of two somewhat-overlapping bugs:

 - elastic/logstash#8987 and elastic/logstash#9056 (7.0, 6.3) changed
   the `inflight_batches` map provided by the queue read clients to index
   batches by native thread id, but pipeline reporter continued to
   attempt to extract by ruby thread object. Because it does not find
   the thread in the "batch map", it reports zero.
 - elastic/logstash#9111 (7.0, 6.3) changed the _value_ stored in
   the `inflight_batches` map provided by a new common queue read client
   from an object responding to `#size` to a java `QueueBatch` which
   does not respond to `size`. If our pipeline reporter had been able to
   look up the queue batch, it would have failed with a `NoMethodError`.

We resolve the issue by (1) extracting the batch from our "batch map" using
the native thread id and (2) safely extracting the value from a `QueueBatch`
before falling through to `Object#size` or 0.
2022-11-18 01:49:52 -08:00
Mashhur
dd06ec53e9
Use aarch64 artifact arch for integration tests on Mac M1 (darwin) OS. (#14754) 2022-11-17 16:24:57 +05:00
Andrea Selva
25b4187392
Forward port releasenotes from 8.5.0 and 8.5.1 (#14763) 2022-11-17 12:23:23 +01:00
Rob Bavey
1f8ee249bb
Logstash Getting started with Kubernetes Guide (#14655)
This PR presents a getting started guide to working with Logstash in Kubernetes, and comes in three parts:

- A walkthrough of a sample scenario, setting up a Kubernetes cluster with 
  - Elasticsearch
  - Kibana
  - Filebeat to read Kubernetes API server logs and sent to Elasticsearch via Logstash
  - Logstash
  - Metricbeat to monitor Logstash
and walks through the setup of these files
- An annotated guide to these files
- Explanations of how Logstash configuration and settings files map to the Kubernetes environment


Relates #14576
Closes #14576 

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-11-16 16:06:56 -05:00
Andrea Selva
b40136c76c
Bump to 8.7.0 (#14755) 2022-11-16 16:34:29 +01:00
Andrea Selva
9242105c3c
[Doc] Document the usage of LS_JAVA_OPTS environment variable (#14738)
* [Doc] Document the usage of LS_JAVA_OPTS environment variable

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-11-15 08:53:45 +01:00
Andrea Selva
05bfaff799
Avoid the wrapping of LogstashMessageFactory with log4j's MessageFactory2Adapter (#14727)
Starting with Log4j2  2.6 if a subclass of MessageFactory associated with an Logger instance
is not subclass of MessageFactory2, then it's wrapped with MessageFactory2Adapter.

This trigger a log4j warn log that, when a class subclasses LogStash::Plugin for example, is noisy and report about
a Logger is not associated with the default MessagedFactory (LogstashMessageFactory) every time a subclass of Plugins is instantiated.

This commit adapt LogstashMessageFactory to implement the MessagedFactory2 instead of the older MessageFactory to avoid the wrapping with the adapter class.
2022-11-09 10:16:34 +01:00
kaisecheng
90aae6a6f3
[doc] Logstash Kubernetes - Persistent Storage Docs (#14714)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-11-04 20:40:47 +00:00
kaisecheng
6847ad80e1
[doc] Logstash Kubernetes - Stack Monitoring docs (#14696)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-11-04 20:40:24 +00:00
kaisecheng
7cc0646a26
[doc] Logstash Kubernetes - Securing Logstash (#14737)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-11-04 18:47:45 +00:00
Andrea Selva
c6880f226f
Update bundled JDK to 17.0.5+8 (#14728) 2022-11-03 15:12:27 +01:00
Andres Rodriguez
77009b253c
Add missing step (#14735) 2022-11-03 09:50:29 -04:00
Andres Rodriguez
531a4fa077
Add GitHub action to add issues to another project board. (#14733) 2022-11-03 09:38:49 -04:00
Andres Rodriguez
1dead06cdd
DRA: Build dockerfiles for release (#14730) 2022-11-03 09:14:44 -04:00
Andres Rodriguez
ef6852b687
DRA: uploading missing docker-build-context files (#14722) 2022-11-02 16:35:45 -04:00
Ry Biesemeyer
372a61219f
Fix pipelines yaml loading (#14713)
* source/multilocal: fix detection of empty pipelines.yml

Fixes a regression introduced in elastic/logstash#13883 in which the presence
of an empty `pipelines.yml` file produces an error message indicating that
the file cannot be read.

When either `YAML::load` or `YAML::safe_load` encounter an effectively-empty
payload (such as one that is entirely comments), they use a `fallback` param
to determine what value to emit, with the former emitting `false` and the
latter emitting `nil`.

This is problematic because a _separate_ blind-`rescue nil` causes `nil` to
be bound to the MultiLocal's `@detected_marker`, and we assume that a `nil`
value in the marker means that there was an exception reading the file (such
as a permissions issue or parse failure).

By providing a `fallback: false` directive when parsing the contents, we
ensure that an empty file is reported as such.

* source/multilocal: avoid `rescue nil` that loses helpful context

When the pipelines yaml cannot be read, or can be read but fails to parse,
the MultiLocal#read_pipelines_from_yaml emits a helpful exception including
specifics about why it failed to load or parse, but a blind `rescue nil`
here causes that helpful information to be lost.

When pipeline detection is exceptional, hold onto the helpful exception
so that it can be reported along with the config conflicts.

* source/multilocal: differentiate between reading and parsing failure

* source/multilocal: use translations for conflict messages

* source/multilocal: specs for error conditions
2022-11-02 11:05:01 -07:00
Ry Biesemeyer
9460d4d7fc
specs: assert presence of logging without risking NoMethodError (#14633)
* specs: assert presence of logging without risking NoMethodError

* Update qa/integration/specs/monitoring_api_spec.rb
2022-11-02 11:01:59 -07:00
kaisecheng
0c1dcc2334
[Doc] k8s troubleshooting (#14606)
doc for k8s troubleshooting and common issues

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-10-28 14:54:51 +01:00
Andres Rodriguez
dd399b62b2
Update add-docs-preview-link.yml (#14710)
Adds docsk8s/** to build preview links.
2022-10-27 11:09:10 -04:00
kaisecheng
cf54386d01
update release version (#14709) 2022-10-26 17:55:08 +01:00
kaisecheng
08072aae0b
update release file 7.17.8 (#14692) 2022-10-26 17:44:45 +01:00
Andres Rodriguez
2e8bd20cf5
DRA - Fix docker image build (#14706)
Fix the docker image building and upload process:
 * Builds ubi8 on x86_64.
 * Uploads ironbank and ubi8 context files from x86_64 only.
2022-10-26 11:20:50 -04:00
Andrea Selva
6ad5690a8c
Adds upload of missed docker docker-build-context.tar.gz artifacts (#14703)
Updates the dra_docker.sh script to upload also docker-build-context.tar.gz files
2022-10-26 12:15:55 +02:00
Andres Rodriguez
17d0bb5ffb
DRA - Fix error reporting (#14698)
Ensures the DRA build script surfaces a rake error, instead of allowing the build to continue.

This ensures that the build doesn't continue if any of the steps fails.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-10-25 17:00:09 -04:00
Andres Rodriguez
6ba5cc112f
DRA - generalize docker image building (#14670)
* Generalize docker image building
* Rename and add ability to pass the architecture as a parameter
* Handle ARCH env variable
2022-10-24 12:50:11 -04:00
Andres Rodriguez
9584d1332b
DRA - fix dra_upload syntax, breaking builds (#14685)
Fix dra_upload.sh syntax that's breaking the build.
2022-10-22 13:02:34 -04:00
Andrea Selva
9c7b7b7454
[DRA] Don't download Darwin arrch64 for 7.17 (#14677)
Version 7.17 doesn't generate Darwin aarch64 artifacts. Don't download these artifacts from the GCS bucket, given that we don't build Darwin for that release.
2022-10-20 16:30:41 +02:00
Andres Rodriguez
86a18e6e3f
Exclude jruby's bundler from artifacts (#14667)
Exclude Jruby's bundler and rake from the built artifacts. The artifacts don't need to ship with such dependencies. Also, Logstash will bundle its own bundler for plugin management but it is not the one shipped with jruby.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-10-18 11:13:02 -04:00
Andres Rodriguez
393460025e
Fix sourcing on dra_upload (#14659)
Fix sourcing on dra_upload.sh
2022-10-17 12:55:47 -04:00
Andres Rodriguez
8bfc7ef164
Fix dra_common sourcing (#14657)
Fixes the source of dra_common.sh. It will now first check the directory of the file from which this dra_common.sh script is being called. This allows the common script to be sourced regardless of where the sourcing script is being called from.
2022-10-17 11:09:56 -04:00
Andres Rodriguez
5b1d53622c
DRA: Improve shell scripts for debuggability (#14654)
The changes remove some code duplication by introducing a common file that can be sourced between all scripts. It also improves debuggability by adding better messages.
2022-10-17 10:23:26 -04:00
Mashhur
f19e9cb647
Collect queue growth events and bytes metrics when PQ is enabled. (#14554)
* Collect growth events and bytes metrics if PQ is enabled: Java changes.

* Move queue flow under queue namespace.

* Pipeline level PQ flow metrics: add unit & integration tests.

* Include queue info in node stats sample.

* Apply suggestions from code review

Change uptime precision for PQ growth metrics to uptime seconds since PQ events are based on seconds.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Add safeguard when using lazy delegating gauge type.

* flow metrics: simplify generics of lazy implementation

Enables interface `FlowMetrics::create` to take suppliers that _implement_
a `Metric<? extends Number>` instead of requiring them to be pre-cast, and
avoid unnecessary exposure of the metrics value-type into our lazy init.

* flow metrics: use lazy init for PQ gauge-based metrics

* noop: use enum equality

Avoids routing two enum values through `MetricType#toString()`
and `String#equals()` when they can be compared directly.

* Apply suggestions from code review

Optional.ofNullable used for safe return. Doc includes real tested expected metric values.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* flow metrics: make lazy-init wraper inherit from AbstractMetric

this allows the Jackson serialization annotations to work

* flow metrics: move pipeline queue-based flows into pipeline flow namespace

* Follow up for moving PQ growth metrics under pipeline.*.flow.
- Unit and integration tests are added or fixed.
- Documentation added along with sample response data

* flow: pipeline pq flow rates docs

* Do not expect flow in the queue section of API. Metrics moved to flow section.

Update logstash-core/spec/logstash/api/commands/stats_spec.rb

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Integration test failure fix.

Mistake: `flow_status` should be `pipeline_flow_stats`

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Integration test failures fix.

Number should be Numeric in the ruby specs.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Make CI happy.

* api specs: use PQ only where needed

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2022-10-13 15:30:31 -07:00
Andres Rodriguez
db6a7bc619
DRA: Handle env variables better (#14644)
* DRA: Handle env variables better
* Moved the addition of SNAPSHOT suffix to the version after the VERSION_QUALIFIER
* Fix badly assigned variable, version qualifier has to be appended also to PLAIN_STACK_VERSION and not RELEASE_VER

Co-authored-by: andsel <selva.andre@gmail.com>
2022-10-13 10:38:55 -04:00
Andrea Selva
cb76c685b7
Follow up PR of #14645, adds version qualifier to the plain version variable (#14646) 2022-10-13 11:47:30 +02:00
Andrea Selva
b8792107ad
Avoid to pass SNAPSHOT particle to the version passed to release-manager (#14645)
The version passed to the release-manager doesn't need the SNAPSHOT particle because already handled by the --workflow="snapshot", if inserted make the release manager to search for artifacts named as 8.5.0-SNAPSHOT-SNAPSHOT
2022-10-13 10:24:34 +02:00
Andres Rodriguez
ad71ff24c8
Disable -x in dra build scripts (#14643) 2022-10-12 17:46:27 -04:00
Andres Rodriguez
bfaa063280
Enable debug for DRA shells scripts (#14642) 2022-10-12 16:22:30 -04:00
Andres Rodriguez
363adad3b6
dra_upload.sh: Leave artifacts under build/ (#14639)
Do not move out artifacts from the build/ former to ensure the upload doesn't fail.
2022-10-12 14:36:57 -04:00
João Duarte
00a7ae8a75
fix PipelineIR.getPostQueue by accounting for vertex copies (#13621)
During graph composition vertices may be copied. This caused
getPostQueue to malfunction as the QueueVertex object stored in the
PipelineIR isn't the one present in the graph once it's fully generated.

This object mismatch caused Graph.getSortedVerticesBetween to not find
the QueueVertex since it takes Objects instead of ids.

This commit waits for the graph to be built and then retrieves the
QueueVertex from the graph and sets it in PipelineIR.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-10-12 16:19:05 +01:00
Andrea Selva
11ecaaea5a
Fix/dra use another technique to extract branch name (#14636)
Avoid to leverage on git local commands to guess the local branch, it switches to listing the branches and checking against the the stack version. If doesn't exists it's main
2022-10-12 14:51:47 +02:00
Andrea Selva
63d5658015
Re-added execution rights to dra_upload.sh (#14626)
Re-apply execution permission to DRA upload script
2022-10-12 09:02:23 +02:00
Ry Biesemeyer
bab2e1c03e
timestamp: respect locale's decimal-style when parsing (#14628)
Uses the locale-defined decimal style first.

When encountering a failure and the locale-defined decimal style is NOT
the "standard" decimal style, retry the parse operation with the "standard"
decimal style.
2022-10-11 15:29:56 -07:00
Andrea Selva
ff8afb2293
Switch branch selector from major.minor to read the current branch name (#14619)
Switch branch selector from major.minor to read the current branch name
2022-10-11 18:59:28 +02:00
Ry Biesemeyer
de49eba22a
api: source pipelines that are fully-loaded (#14595)
* specs: detangle out-of-band pipeline initialization

Our API tests were initializing their pipelines-to-test in an out-of-band
manner that prevented the agent from having complete knowledge of the
pipelines that were running. By providing a ConfigSource to our Agent's
SourceLoader, we can rely on the normal pipeline reload behaviour to ensure
that the agent fully-manages the pipelines in question.

* api: do not emit pipeline that is not fully-initialized
2022-10-11 08:14:00 -07:00
Andrea Selva
d8d690079a
Updates DRA scripts to build snapshot artifacts (#14600)
Handle the WORKFLOW_TYPE enviroment variable used to select the kind of artifacts to generate and consequently adapt the version name.
If the WORKFLOW_TYPE has a value assigned other then empty string it's assumed to be snapshot and so it generates snapshot artifacts else the release ones.

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-10-11 16:32:39 +02:00
Andrea Selva
3075029b27
DRA - Update scripts to use the version qualifier in stack_version (#14589)
Update DRA scripts to use the version qualifier in stack_version variable for alpha and beta builds

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-10-10 18:08:16 +02:00
Andrea Selva
d07eb01e23
Adds new close method to Java's Filter API to be used to clean shutdown resources allocated by the filter during registration phase. (#14485)
- Adds a new method to the public API interface
- Pass the call through the JavaFilterDelegatorExt

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-10-10 17:35:29 +02:00
kaisecheng
8a8a036896
Fix DLQ fails to start due to read 1 byte file (#14605)
This commit ignores DLQ files that contain only the version number. These files have no content and should be skipped.

Fixed: #14599
2022-10-10 11:07:13 +01:00
Andrea Selva
d3b92ec20c
Extract the branch name passed to release-manager from version file (#14592)
* Extract the branch name passed to release-manager from version and not from git current branch

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-10-10 11:13:27 +02:00
Ry Biesemeyer
46babd6041
Extended Flow Metrics (#14571)
* flow metrics: extract to interface, sharable-comon base, and implementation

In preparation of landing an additional implementation of FlowMetric, we
shuffle the current parts net-unchanged to provide interfaces for `FlowMetric`
and `FlowCapture`, along with a sharable-common `BaseFlowMetric`, and move
our initial implementation to a new `SimpleFlowMetric`, accessible only
through a static factory method on our new `FlowMetric` interface.

* flow-rates: refactor LIFETIME up to sharable base

* util: add SetOnceReference

* flow metrics: tolerate unavailable captures

While the metrics we capture from in the initial release of FlowMetrics
are all backed by `Metric<T extends Number>` whose values are non-null,
we will need to capture from nullable `Gauge<Number>` in order to
support persistent queue size and capacity metrics. This refactor uses
the newly-introduced `SetOnceReference` to defer our baseline lifetime
capture until one is available, and ensures `BaseFlowMetric#doCapture`
creates a capture if-and-only-if non-null values are available from
the provided metrics.

* flow rates: limit precision for readability

* flow metrics: introduce policy-driven extended windows implementation

The new ExtendedFlowMetric is an alternate implementation of the FlowMetric
introduced in Logstash 8.5.0 that is capable of producing windoes for a set of
policies, which dictate the desired retention for the rate along with a
desired resolution.

 - `current`: 10s retention, 1s resolution [*]
 - `last_1_minute`: one minute retention, at 3s resolution [*]
 - `last_5_minutes`: five minutes retention, at 15s resolution
 - `last_15_minutes`: fifteen minutes retention, at 30s resolution
 - `last_1_hour`: one hour retention, at 60s resolution
 - `last_24_hours`: one day retention at 15 minute resolution

A given series may report a range for slightly longer than its configured
retention period, up to the either the series' configured resolution or
our capture rate (currently ~5s), whichever is greater. This approach
allows us to retain sufficient data-points to present meaningful rolling
averages while ensuring that our memory footprint is bounded.

When recording these captures, we first stage the newest capture, and then
promote the previously-staged caputure to the tail of a linked list IFF
the gap between our new capture and the newest promoted capture is larger
than our desired resolution.

When _reading_ these rates, we compact the head of that linked list forward
in time as far as possible without crossing the desired retention barrier,
at which point the head points to the youngest record that is old enough
to satisfy the period for the series.

We also occesionally compact the head during writes, but only if the head
is significantly out-of-date relative to the allowed retention.

As implemented here, this extended flow rates are on by default, but can be
disabled by setting the JVM system property `-Dlogstash.flowMetric=simple`

* flow metrics: provide lazy-initiazed implementation

* flow metrics: append lifetime baseline if available during init

* flow metric tests: continuously monitor combined capture count

* collection of unrelated minor code-review fixes

* collection of even more unrelated minor code-review fixes
2022-10-06 18:35:33 -07:00
kaisecheng
b408638084
update ci release version (#14598) 2022-10-06 10:45:24 +01:00
David Kilfoyle
6dc5c5648a
[DOC] Add a short guide for using Logstash with K8s (#14532)
This contains an early draft structure and some content for a planned Logstash and Kubernetes Reference.
2022-10-03 09:33:23 -04:00
Andrea Selva
8ddd3ae6f3
Collect all artifacts created and upload to GCP with release-manager (#14584)
Downloads all artifacts generated for ARM and x86 by ci/dra_x86_64.sh ci/dra_aarch64.sh, position in locations expected by the release-manager and invokes it to upload to the global bucket.
2022-10-03 12:05:30 +02:00
Andrea Selva
4fbb57a522
Upload DRA artifacts to collector GCS bucket (#14568)
Save ARM and x86 artifacts into GCS collector bucket

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-09-28 17:48:31 +02:00
Andrea Selva
214d2bed64
Split ci scripts into ARM and x86 ones (#14567)
Splitted DRA script for x86_64 and aarch64
2022-09-28 15:42:48 +02:00
Andres Rodriguez
184fb1075e
Update add_to_projects_beta.yml 2022-09-28 09:31:45 -04:00
Mashhur
bd3451270c
Dev instructions improvement (#14219)
* LS local development guide improvements.

* Use imperative guide instead abstraction.

* Give a proper name to Gradle task to install the dev gems.
2022-09-27 13:38:36 -07:00
Karol Bucek
74e72fb9b0
Perf: use JRuby JIT defaults (improves startup) (#14284)
Removing the -Djruby.jit.threshold=0 flag, which seems to have been introduced due benchmarking.

Removing the force of AOT means a noticeably faster startup (we do not need to 'compile' every method we bump into). The JIT threshold default is 50 in JRuby 9.2/9.3, there might be other heuristics in the future to better determine hot methods.
2022-09-27 16:28:08 -04:00
Ry Biesemeyer
228030c494
Simplify Pipeline class Hierarchy (#14551)
* refactor: pull members up from JavaBasePipelineExt to AbstractPipelineExt

* refactor: make `LogStash::JavaPipeline` inherit directly from `AbstractPipeline`
2022-09-26 18:16:20 -07:00
Andres Rodriguez
cd03c86102
Document JDK17 by default (#14511)
Document that JDK17 is now the default.
2022-09-26 13:23:05 -04:00
Andrea Selva
7e95f6ecaf
DRA fixes: (#14552)
- save docker images as tar.gz files
- move the CSV dependency report in the path that's expected by release-manager
2022-09-23 14:12:15 +02:00
github-actions[bot]
9bc2496e7b Release notes for 8.4.2 (#14531)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-09-21 16:40:07 +01:00
João Duarte
05785e9a0b
bump to 8.6.0 (#14545) 2022-09-21 15:44:35 +01:00
Ry Biesemeyer
6e0b365c92
Feature: flow metrics integration (#14518)
* Flow metrics: initial implementation (#14509)

* metrics: eliminate race condition when registering metrics

Ensure our fast-lookup and store tables cannot diverge in a race condition
by wrapping mutation of both in a single mutex and appropriately handle
another thread winning the race to the lock by using the value that it
persisted instead of writing our own.

* metrics: guard against intermediate namespace conflicts

 - ensures our safeguard that prevents using an existing metric as a namespace
   is applied to _intermediate_ nodes, not just the tail-node, eliminating a
   potential crash when sending `fetch_or_store` to a metric object that is not
   expected to respond to `fetch_or_store`.
 - uses the atomic `Concurrent::Map#compute_if_absent` instead of the
   non-atomic `Concurrent::Map#fetch_or_store`, which is prone to
   last-write-wins during contention (as-written, this method is only
   executed under lock and not subject to contention)
 - uses `Enumerable#reduce` to eliminate the need for recursion

* flow: introduce auto-advancing UptimeMetric

* flow: introduce FlowMetric with minimal current/lifetime rates

* flow: initialize pipeline metrics at pipeline start

* Controller and service layer implementation for flow metrics. (#14514)

* Controller and service layer implementation for flow metrics.

* Add flow metrics to unit test and benchmark cli definitions.

* flow: fix tests for metric types to accomodate new one

* Renaming concurrency and backpressure metrics.

Rename `concurrency` to `worker_concurrency ` and `backpressure` to `queue_backpressure` to provide proper scope naming.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* metric: register flow metrics only when we have a collector (#14529)

the collector is absent when the pipeline is run in test with a
NullMetricExt, or when the pipeline is explicitly configured to
not collect metrics using `metric.collect: false`.

* Unit tests and integration tests added for flow metrics. (#14527)

* Unit tests and integration tests added for flow metrics.

* Node stat spec and pipeline spec metric updates.

* Metric keys statically imported, implicit error expectation added in metric spec.

* Fix node status API spec after renaming flow metrics.

* Removing flow metric from PipelinesInfo DS (used in peridoci metric snapshot), integration QA updates.

* metric: register flow metrics only when we have a collector (#14529)

the collector is absent when the pipeline is run in test with a
NullMetricExt, or when the pipeline is explicitly configured to
not collect metrics using `metric.collect: false`.

* Unit tests and integration tests added for flow metrics.

* Node stat spec and pipeline spec metric updates.

* Metric keys statically imported, implicit error expectation added in metric spec.

* Fix node status API spec after renaming flow metrics.

* Removing flow metric from PipelinesInfo DS (used in peridoci metric snapshot), integration QA updates.

* Rebasing with feature branch.

* metric: register flow metrics only when we have a collector

the collector is absent when the pipeline is run in test with a
NullMetricExt, or when the pipeline is explicitly configured to
not collect metrics using `metric.collect: false`.

* Apply suggestions from code review

Integration tests updated to test capturing the flow metrics.

* Flow metrics expectation updated in tegration tests.

* flow: refine integration expectations for reloads/monitoring

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Co-authored-by: Mashhur <mashhur.sattorov@gmail.com>

* metric: add ScaledView with sub-unit precision to UptimeMetric (#14525)

* metric: add ScaledView with sub-unit precision to UptimeMetric

By presenting a _view_ of our metric that maintains sub-unit precision,
we prevent jitter that can be caused by our periodic poller not running at
exactly our configured cadence.

This is especially important as the UptimeMetric is used as the _denominator_ of
several flow metrics, and a capture at 4.999s that truncates to 4s, causes the
rate to be over-reported by ~25%.

The `UptimeMetric.ScaledView` implements `Metric<Number>`, so its full
lossless `BigDecimal` value is accessible to our `FlowMetric` at query time.

* metrics: reduce window for too-frequent-captures bug and document it

* fixup: provide mocked clock to flow metric

* Flow metrics cleanup (#14535)

* flow metrics: code-style and readability pass

* remove unused imports

* cleanup: simplify usage of internal helpers

* flow: migrate internals to use OptionalDouble

* Flow metrics global (#14539)

* flow: add global top-level flows

* docs: add flow metrics

* Top level flow metrics unit tests added. (#14540)

* Top level flow metrics unit tests added.

* Add unit tests when config reloads, make sure top-level flow metrics didn't get reset.

* Apply suggestions from code review

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Validating against Hash test cases updated.

* For the safety check against exact type in unit tests.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* docs: section links and clarity in node stats API flow metrics

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@gmail.com>
2022-09-19 14:21:45 -07:00
Andrea Selva
6534386f21
Created DRA shell script to create artifacts and dependency report (#14522)
* Created DRA shell script to create artifacts and dependency report
* Added console listing of the generated artifacts
2022-09-15 16:36:08 +02:00
Rob Bavey
0578ddbbd3
Upgrade jruby to 9.3.8.0 (#14524)
Also remove the explicit CSV import added in #14507, jruby-9.3.8.0 includes
the correct version by default
2022-09-13 17:36:40 -04:00
Rob Bavey
5d7fa78e09
Fix Windows scripts (#14515)
The work done in #14355 to fix the keystore and plugin scripts erroneously included
%JAVA_OPTS% in the command to invoke `jruby`, rather than as an environment variable, which
prevented these scripts from operating correctly, due to `jruby.exe` not handling Java options,
causing the scripts to crash on invocation.

This commit removes the %JAVA_OPTS% - this is already set as an environment variable, and allows the
scripts to operate correctly
2022-09-09 09:06:57 -04:00
Dan Kortschak
b7b9613c62
winlogbeat-modules: add docs for interfacing winlogbeat with logstash (#14472)
These are taken from the filebeat-modules doc with minor changes to
localise to winlogbeat and to remove the fully worked example.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-09-08 12:48:11 +09:30
Rob Bavey
8d41b85498
Manually import CSV gem to work around thread leak (#14507)
* Manually import CSV gem to work around thread leak

The version of CSV included in jruby distributions >= `9.3.0.0` and
< `9.3.8.0` include a bug that triggers a thread leak when calling
`parse_line` in CSV files.

This commit updates the version of the CSV gem to the latest version,
which includes fixes, and remains compatible with ruby 2.6

Relates: https://github.com/jruby/jruby/issues/7346

* Add CSV license info
2022-09-07 14:45:37 -04:00
Andres Rodriguez
2a2f5ae24c
Update add_to_projects_beta.yml 2022-09-07 13:39:22 -04:00
Andres Rodriguez
328a4e20d1
Update add_to_projects_beta.yml 2022-09-07 13:32:58 -04:00
Andres Rodriguez
37ebcee716
Update add_to_projects_beta.yml 2022-09-07 13:32:25 -04:00
Andres Rodriguez
248a512350
Update add_to_projects_beta.yml 2022-09-07 11:57:01 -04:00
Andres Rodriguez
955c48131e
Update add_to_projects_beta.yml 2022-09-07 11:42:16 -04:00
Andres Rodriguez
842e45abaf
Update add_to_projects_beta.yml 2022-09-07 11:36:12 -04:00
Andres Rodriguez
5c5a52d6b0
Update add_to_projects_beta.yml 2022-09-07 11:26:18 -04:00
Andres Rodriguez
3d43f86fae
Update add_to_projects_beta.yml 2022-09-07 11:19:33 -04:00
João Duarte
4584b632fd
drop support for all DES ciphers in OpenSSL and simplify cipher list (#14499)
Remove support for DES-CBC3-SHA.

Also removes unnecessary exclusions for EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA and KRB5-DES-CBC3-SHA since there's already a "!DES" rule.
2022-09-07 13:12:27 +01:00
Andrea Selva
89c45d6d80
Change deb/rpm specification to describe as replacement of noarch old Logstash packages (#14346) 2022-09-06 18:56:33 +02:00
kaisecheng
3a78621109
fix SettingsImpl to remove hardcoded checkpointRetry (#14487)
SettingsImpl.checkpointRetry is hardcoded to false in builder. Prior to this change, users are unable to set queue.checkpoint.retry to true to enable Windows retry on PQ AccessDeniedException in checkpoint.

Fixed: #14486
2022-09-05 16:22:08 +01:00
Andrea Selva
26289b955c
Forward port release notes for 8.4.0 and 8.4.1 (#14484) 2022-08-31 09:44:45 +02:00
Andrea Selva
a10e236853
Update CI versions after 8.4.1 (#14482) 2022-08-31 09:44:08 +02:00
Andres Rodriguez
2944eacd29
Add missing reference to full config of LS-to-LS over HTTP (#14466) 2022-08-29 14:18:05 -04:00
kaisecheng
88d89fe896
[Doc] add off-heap memory session (#14431)
Relates: #12622

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-08-24 22:24:06 +01:00
Rob Bavey
a2a82f7406
Bump release and snapshot versions (#14469) 2022-08-24 16:45:16 -04:00
João Duarte
6bc2483cfc
bump jruby version to 9.3.7.0 (#14455) 2022-08-17 14:30:45 +01:00
João Duarte
9d16c3bce5
Stop pinning mustermann in logstash-core.gemspec (#14453) 2022-08-17 11:37:14 +01:00
João Duarte
24c675ccd8
remove sinatra constraint (#14446) 2022-08-17 10:04:16 +01:00
João Duarte
4cb900ce7e
update flores dependency to at least 0.0.8 (#14437) 2022-08-17 09:56:45 +01:00
Rob Bavey
c124cc6c9e
Remove the chmod g+s command from ironbank docker image (#14435) 2022-08-16 10:10:06 -04:00
Rob Bavey
cd60c6522a
Update tests to allow integration tests to use the bundled JDK (#14432)
* Adds tasks to add bundled JDK to tar file used to run integration tests
* Uses `RUNTIME_JAVA_HOME` environment variable to control whether bundled JDK or
  alternative is to be used
* Updates logstash service helper to respect value of `RUNTIME_JAVA_HOME`

* Requires updates to jenkins repo to set `RUNTIME_JAVA_HOME` correctly only for
  integration tests that expect to use a custom version of Java, such as the JDK
  matrix tests.
2022-08-16 09:03:52 -04:00
lior-orca
5767b3b986
Ensuring COPY instruction is used instead of ADD in Dockerfiles (#14423) 2022-08-12 14:59:52 +01:00
Andrea Selva
2e4837ccff
Fixes typo in running logstash CLI doc (#14428)
Co-authored-by: @zhangzheng1212
2022-08-10 14:34:12 +02:00
Boris Djurdjevic
f03330acd3
Add monitoring.cluster_uuid as Docker env setting(#14425)
Fix env2yaml tool to expose monitoring.cluster_uuid as Docker environment variable
2022-08-10 14:17:00 +02:00
Andres Rodriguez
5959676809
Update feature-request.md (#12873)
Update feature-request.md to provide a nicer description.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: hendry-lim <48344515+hendry-lim@users.noreply.github.com>
2022-08-09 14:46:28 +01:00
Rob Bavey
4771ad61b9
Update version of the bundled JDK to 17.0.4+8 (#14424) 2022-08-09 09:21:23 -04:00
kaisecheng
5b69f65797
Pin jar-dependencies 0.4.1 (#14421)
* pin jar-dependencies to 0.4.1
CI red with `Gem::LoadError: You have already activated jar-dependencies 0.4.1, but your Gemfile requires jar-dependencies 0.4.2`

* add comment
2022-08-04 11:13:30 -07:00
Andrea Selva
7887972348
Open java modules for gradle test after 7.5 upgrade (#14413)
Open the access to java.lang and java.util packages in java.base module.
With Gradle 7.5 these packages aren't anymore implicitly opened in test tasks. With this commit, those packages are opened for all test tasks, also on the buildSrc.
2022-08-03 15:32:49 +02:00
Karen Metts
5354998113
Doc: Fileset must be enabled in module (#14405) 2022-08-02 19:23:05 -04:00
João Duarte
dfa88aa0e9
Make version bump github action work with future JRuby versions (#14391)
Release branches are expected to have a lock file whose name is `Gemfile.jruby-X.Y.lock.release`, where `X.Y` is the Ruby language version.
This Ruby language version differs from JRuby version: for example, JRuby 9.2 is compatible with Ruby 2.5, while JRuby 9.3 is compatible with Ruby 2.6.
This commit makes the version bump agnostic to the version. Since there will be a lock file already present when the action is run, we only need to replace it, so there's no need to know the exact file name.
2022-07-29 21:18:15 +01:00
João Duarte
8aa62dc441
pin bundler 2.3.18 to avoid bug in .19 (#14394)
When using Bundler 2.3.19, doing a "bin/logstash-plugin uninstall <plugin>"
will crash, failing to find gems in the :build group.

Until we know more about why, pin bundler to 2.3.19
2022-07-29 17:46:10 +01:00
Mashhur
f798d5f0e4
Upgrade CI stack version to 8.3.3 (#14393) 2022-07-28 15:52:46 -07:00
github-actions[bot]
cf84698570
Release notes for 8.3.3 (#14365) (#14389)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit b25960f86f)
2022-07-28 13:34:21 -04:00
github-actions[bot]
506094eda2
Release notes for 8.3.2 (#14327) (#14387)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit f007d0ec04)
2022-07-28 12:24:29 -04:00
Andrea Selva
07fe589d8a
[doc] Describe DLQ's age retention policy (#14340)
Describe the DLQ age retention policy.
2022-07-27 13:01:22 -04:00
Andrea Selva
3c5ed2b62f
Document the cleaning of consumed events feature (#14341)
Documents the clean_consumed setting, which allows the user to remove processed/consumed DLQ events . 

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-07-27 12:43:41 -04:00
Rob Bavey
5a6460899d
Bump version to 8.5.0 (#14382) 2022-07-27 08:57:02 -04:00
João Duarte
6262cc6b70
upgrade to gradle 7.5 (#14378) 2022-07-26 14:34:50 +01:00
João Duarte
f377fd3e4f
update some java dependencies (#14377)
Update the following java dependencies:

* org.reflections:reflections
* commons-codec:commons-codec
* com.google.guava:guava
* com.google.googlejavaformat:google-java-format
* org.javassist:javassist

The goal of these updates is to not fall behind and avoid surprises when an upgrade is necessary due to a security issue.
2022-07-26 11:34:35 +01:00
João Duarte
ae4a64d9ae
introduce logstash-integration-aws (#14369)
The logstash-integration-aws plugin replaces the underlying individual plugins related to AWS.

This commit also updates the necessary files around license checking.
2022-07-26 10:50:58 +01:00
Andres Rodriguez
e5bc14b51d
[doc] Update example ES output configs to reflect DS being default (#14011)
Update example ES output configs to reflect DataStreams being default

Fixes #14008
2022-07-25 13:12:59 -04:00
Rob Bavey
422dfa7a26
Add darwin to aarch64 builds (#13425) 2022-07-22 15:55:17 -04:00
Rob Bavey
777254f6bc
Fix mismatched Java versions in integration tests (#14374)
* Fix version of java used to retrieve logstash version in integration tests

Prior to this commit, the system java would be used to retrieve logstash
version in integration tests, leading to test failures with IT environments
that have java 1.8 as system java

* Actually fix `test_port` this time

Use bash `/dev/tcp` to test ports rather than attempting to use `nc` and
`ruby`
2022-07-22 14:15:32 -04:00
Rob Bavey
254fdbb8a3
Revert "Update .ruby-version to match jruby version of 9.3.6.0 (#14357)" (#14373)
This reverts commit 772d4e89d2.

Release Manager workers are not ready for this update
2022-07-22 10:04:17 -04:00
Karen Metts
1ef4afcf61
Doc: Migrate terminology to emphasize pipeline for better seo (#14032)
* Apply suggestions from code review
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
2022-07-21 15:49:16 -04:00
Karen Metts
9454ad0703
LSR: Removes version plugin conditionals from plugin headers (#14352) 2022-07-21 13:18:19 -04:00
Aaron Walker
c9d9f7c1a4
Add config.field_reference.escape_style to env2yaml (#14364) 2022-07-20 16:33:06 -04:00
Rob Bavey
cfbded232c
Clean up java plugin threadsafe/concurrency check (#14360)
Prior to this commit, the java filter delegator would return "java" to the
`#threadsafe?` call when determining whether a filter is considered thread safe.
This is correct for the _outputs_, where this prefix is used to construct the
appropriate delegator object, but not for filters, where a simple true/false is
required. This commit replaces the `getCurrency` call with a `isThreadsafe` call
to make it clearer that a boolean call is required.
2022-07-20 09:00:14 -04:00
Rob Bavey
88c3f95ffc
jruby-9.3 test fix for windows CI (#14331)
This test has been broken on Windows since the jruby 9.3 update, and is
similar to an issue we saw when referencing other classes in the
org.logstash.util namespace
2022-07-19 11:41:14 -04:00
Rob Bavey
44450684ef
Reduce the amount of memory required by gradle for integration tests (#14359)
A new class of build node has recently been added which appears to have fewer
memory resources than previous nodes, causing integration test failures. The
gradle task for integration tests doesn't appear to require 4gb, so this commit
reduces the -Xmx setting to 4gb
2022-07-19 09:07:38 -04:00
Rob Bavey
71a831a825
Fix test_port_ruby on build nodes with outdated system java (#14358)
When running certain integration tests, a test against a given port is
performed to ensure that certain dependent services are up. Currently,
these are tests are done either via `nc` or `ruby` if no `nc` is provisioned
on the build nodes. The current `ruby` implenentation attempts to use a system
ruby before using the ruby script shipped with Logstash. This commit removes the
use of the system jruby - certain build boxes are still using java8 as their system
java, which causes builds to fail, as java 11 is expected
2022-07-19 09:07:24 -04:00
Rob Bavey
772d4e89d2
Update .ruby-version to match jruby version of 9.3.6.0 (#14357)
Infra changes have been committed in https://github.com/elastic/infra/pull/36656,
so this should be good to go
2022-07-19 09:07:10 -04:00
João Duarte
90872fb6ff
ArcSight Module Broken (Invalid Type), Fixed (#13874)
The Module is broken with the current version. The Type needs to be changed from syslog to _doc to fix the issue.

* remove dangling setting and add arcsight index suffixes
* add tests for new suffix in arcsight module

Co-authored-by: Tobias Schröer <tobias@schroeer.ch>
2022-07-18 16:56:24 +01:00
Rob Bavey
59c5374849
Fix windows scripts to also pull settings from JvmOptionsParser (#14355)
* Fix windows scripts to also pull settings from JvmOptionsParser

Prior to this commit, the windows version of the keystore and plugin scripts
diverged from the bash version of these scripts, as they did not pick up Jvm Options
from the JvmOptionsParser, leading to certain mandatory settings not being picked up,
breaking compatibility with Windows on certain versions of the JDK. This PR ensures
that these scripts also use the JvmOptionsParser.

This does not resolve the issue described in #14176, which will be looked at in a future
PR

Relates: #14354

* Add goto :eof as per code review suggestion
2022-07-18 09:03:40 -04:00
Rob Bavey
0181745a99
This commit updates the default version of the JDK to jdk17. (#13343)
Also updates ci to jdk17.
2022-07-13 12:27:54 -04:00
Andrea Selva
39f39658a1
Create wrapper class to bridge the calls to Ruby codec and present it self as a Java codec (#13523)
Open the ability to use Ruby codec inside Java plugins.
Java plugins need subclasses of Java `co.elastic.logstash.api.Codec` class to properly work. This PR implements an adapter for Ruby codecs to be wrapped into a Java's Codec subclass.

Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2022-07-13 11:44:12 +02:00
Andrea Selva
394edbbd71
Expose DLQ deleted events count on reader side (#14336)
Increments the counters of consumed events and consumed events every time a segment is completely read from the reader side.
Publish the collected data to the input plugin through the newly added method `segmentsDeleted(numberOfSegments, numberOfEvents` to `SegmentListener`.
2022-07-13 09:13:51 +02:00
Andrea Selva
430d3af7dc
Update dependencies (#14348) 2022-07-13 09:06:18 +02:00
kaisecheng
2cc415c1f5
[DOC] update link from master to main (#14347) 2022-07-12 17:21:33 +01:00
Cleydyr Bezerra de Albuquerque
1ddd4ccd83
Fix broken link to image (#14343) 2022-07-12 14:53:07 +01:00
Guido Lena Cota
04d9326fcd
Docs: Fix 404s (#12276)
* Fix url that ended in a 404

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-07-12 11:51:38 +01:00
Andrea Selva
d2c2ab1a0d
[Docs] Fixes a typo in the docs (#14342) 2022-07-11 13:51:28 +02:00
Andrea Selva
cfdd5d521d
Bugfix for DLQ when writer is pushing data and reader consuming. (#14333)
Bugfix for DLQ when writer and reader with clean_consumed feature are working on same queue.

The writer side keeps the size of DLQ in memory variable and when exceed it applies the storage policy, so essentially drop older or never events.
If on the opposite side of the DLQ there is a read, with clean_consumed feature enabled, that delete the segments it processes, then the writer side could have a not consistent information about the DLQ size.

This commit adds a filesystem check when it recognizes that "DLQ full" condition is reached, to avoid consider false positive as valid data.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-07-11 09:57:54 +02:00
Andrea Selva
34588791fa
Added metric to count removed events when age retention kicks in (#14324)
Adds the metric measure `expired_events` to node stats graph to track the number of events removed by age retention pruning policy.
In the _node/stats API, under the path `pipelines.<pipeline upstream>.dead_letter_queue` enrich the document with the new metric.
The number of expired events is incremented every time a segment file is deleted; this happens opening the file and counting the `complete` and `start` records.
2022-07-08 14:39:01 +02:00
kaisecheng
c8a5e5527b
rollback ruby-version to 9.3.4.0 (#14330) 2022-07-06 13:57:44 +01:00
kaisecheng
eea655b8c9
Fix flaky geoip test (#14329)
* Fix flaky geoip tests
* update ruby version

Fixed: #14325
2022-07-06 10:57:33 +01:00
Rob Bavey
120648abe4
Bump release version in releases.json (#14323) 2022-06-30 12:24:35 -04:00
Andrea Selva
be87b0b878
Implement DLQ age retention policy (#14255)
Updates DLQ writer's writeEvent method to clean the tail segments  older then the duration period. This happens only if setting dead_letter_queue.retain.age is configured.
To read the age of a segment it extract the timestamp of the last (youngest) message in the segment.

The age is defined as a number followed by one of d, h, m, s that stands for days, hours, minutes and seconds. If nothing is used then assumes seconds as default measure entity.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-06-30 18:09:15 +02:00
Julien Mailleret
79c36c5ac2
Fix artifact path for integration with ubireleaser (#14319)
<artifact_path> need to be hardcoded so it can be replaced properly by
the ubireleaser during the creation of the Ironbank merge request.

Relates to https://github.com/elastic/logstash/pull/14298/
2022-06-30 16:21:08 +01:00
Andrea Selva
df19e557a6
Forward port of release notes for 8.3.1 8.3.0. 8.2.3 to main (#14316)
* Forward port of 8.3.1 release notes
* Forward port of 8.3.0 release notes
* Forward port of 8.2.3 release notes

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-06-30 11:47:43 +02:00
Carlos Crespo
168732ff88
[doc] Removes 'beta' from pipeline viewer doc (#14082) 2022-06-30 11:09:27 +09:00
Rob Bavey
d054391461
Update version of jdk11 to openjdk11 to allow aarch64 builds (#14310) 2022-06-29 11:52:49 -04:00
João Duarte
36704142fc
update releases list with new 7.17.5 and 8.3.0 (#14308) 2022-06-29 16:52:05 +01:00
Rob Bavey
d268f58a55
Update jruby to 9.3.6.0 (#14304) 2022-06-29 11:42:42 -04:00
João Duarte
601c45f49d
allow any class in CBOR deserialization (#14312)
This should be followed by introducing a tighter validator
but the current one introduced in 8.3.0 was creating issues for users.
2022-06-29 10:16:45 +01:00
Ry Biesemeyer
7757908c34
Add ca_trusted_fingerprint to core features (monitoring/central-management) (#14155)
* add `ca_trusted_fingerprint` to core features (monitoring/central-management)

* Rely on released ES output

* fix: ensure commented-out examples in logstash.yml are functionally correct

* add admonition for how to get a trusted CA's fingerprint
2022-06-28 17:07:59 -07:00
Andres Rodriguez
e9d4d022f9
devtools/label: Add initial script that can label issues/PRs (#14296)
devtools/label: Add initial script to auto-label issues/PRs.

 The first iteration of this script only allows users to add a version label based on the local branch version.yml.
2022-06-28 09:13:30 -04:00
kaisecheng
dfb109843d
Support ironbank docker build (#14298)
This commit adds a rake task `rake artifact:dockerfile_ironbank` to generate ironbank docker build context for automatic release.
The output can be found in build/logstash-ironbank-$VERSION-docker-build-context.tar.gz

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-06-28 10:29:55 +01:00
Karol Bucek
f073529d70
Build: make sure lock is created in integration specs (#14302)
without these changes doing (an in-process) `bundle install`
did not generate a Gemfile.lock

this is than problematic, when using git sourced gem (locally) those gems do not not get resolved properly with the *qa/integration/rspec.rb* script
2022-06-28 09:06:15 +02:00
Andrea Selva
3b218a3ce7
Adds DLQ reader's lock to force single reader access to segments when clean_consumed feature is enabled (#14256)
Uses the FileLock mechanism, already used in PQ, to force the single consumer pattern in case clean_consumed is enabled. This avoid concurrency problem of multiple readers trying to delete each other consumed tail segments.
2022-06-27 11:34:09 +02:00
Ry Biesemeyer
5e372fed91
Timestamp#toString(): ensure a minimum of 3 decimal places (#14299)
* Timestamp#toString(): ensure a minimum of 3 decimal places

Logstash 8 introduced internals for nano-precise timestamps, and began relying
on `java.time.format.DateTimeFormatter#ISO_INSTANT` to produce ISO8601-format
strings via `java.time.Instant#toString()`, resulting in a _variable length_
serialization that only includes sub-second digits when the Instant represents
a moment in time with fractional seconds.

By ensuring that a timestamp's serialization has a minimum of 3 decimal places,
we ensure that our output is backward-compatible with the equivalent timestamp
produced by Logstash 7.

* timestamp serialization-related specs fixup
2022-06-24 15:20:07 -07:00
Andres Rodriguez
303fdb0193
Only remove /etc/s/s/logstash.service if previously installed by Logstash (#14200)
During upgrade, Logstash packaging removes /etc/systemd/system/logstash.service because Logstahs used to install the systemd unit there. However, this could have been modified by the user by overriding the systemd file. As such, the upgrade process should only remove if it is certain it wasn't installed by Logstash.

Unfortunately, there's no particular way to determine if Logstash installation process installed the file because it was done on the fly, by a script, on a postinst script of the package.

As such, the best way to address this is to check if both the new and the old file exists. If the new one doesn't exist, we can assume we are upgrading (or installing afresh), and the old file should be removed. If the new one exists and the user-create one (old location) also exists, we assume it is user created, and as such, we don't remove it just to be safe.
2022-06-24 10:56:07 -04:00
Andrea Selva
080c2f6253
Increase Gradle network timeouts to increment resiliency on network issues (#14283)
When an external repository reaches IO error or generates network timeouts the build fails in resolving external dependencies (plugins or libraries used by the project).
This commits increase a little bit those limits.
2022-06-21 15:01:08 +02:00
Karol Bucek
989f9e7937
Deps: un-pin (and avoid) rufus-scheduler (#14260)
+ Refactor: specific require + scope java_import
+ Refactor: redundant requires
+ Refactor: avoid rufus - hook up a timer task
2022-06-21 12:26:03 +02:00
João Duarte
ce27e08eac
make retries in pip and go get extra shell compatible (#14282)
the use of ranges (e.g. {0..5}) or seq (e.g. $(seq 0 5)) may not
correctly in some systems, so let's just have a plain list of elements
for the loop to go through.
2022-06-21 09:41:11 +01:00
João Duarte
ff9f1e5a7f
improve resiliency of make venv and golang Dockerfile with retries (#14239)
This helps with transient network problems by not failing at the first try.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-06-20 17:08:42 +01:00
Andrea Selva
7aa9d8e856
Fix/dlq avoid to delete not segment files (#14274)
Restrict the listing of segment files to delete, during reader's cleaning, to just completed segment files
2022-06-20 17:16:53 +02:00
Andrea Selva
2b88b5f29e
Print the pipeline id of the queue that's draining (#14272)
Log also the pipeline_id of the draining queue when the shutdown watcher is monitoring the shutdown of pipelines
2022-06-17 16:28:16 +02:00
Mashhur
d0c9aa8f48
File system mismatch when each pipeline uses separate file system. (#14212)
* Logstash checks different file system if each pipeline has a symlink to other filesystem.

* Apply suggestions from code review

* FileAlreadyExistsException case handling when queue path is symlinked.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-06-16 09:22:00 -07:00
Rob Bavey
64fb24fe4a
Pipeline->pipeline workaround for jruby-9.3.4.0 bug (#14266)
This commit replaces the use of a block with a lambda as an argument for Stream.forEach.
This is to work around the jruby issue identified in https://github.com/jruby/jruby/issues/7246.

This commit also updates the multiple_pipeline_spec to update the test case for pipeline->pipeline
communication to trigger the issue - it only occurs with Streams with more than one event in it.
2022-06-16 09:48:18 -04:00
kaisecheng
c725aabb49
Fix pq size checking to not stop the pipeline (#14258)
This commit changes the behavior of PQ size checking.
When it checks the size usage, instead of throwing exception that stops the pipeline,
it gives warning msg in every converge state if it fails the check

Fixed: #14257

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-06-16 11:39:48 +01:00
Andrea Selva
9c6e8afaca
Added description into logstash.yml for sotrage_policy, missed in #13923 (#14261)
Updates the logstash.yml with the description of dead_letter_queue.storage_policy which was missed in PR #13923

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-06-16 09:36:09 +02:00
Andrea Selva
fc13a4ce3e
Mark all not serializable fields as transient (#14240)
With JDK 18, the Javac lint checking was expanded to raise an error on serializable subclasses that contains instance fields which are not serializable themselves.
This could be solved suppressing the warning or marking the field as transient. The majority of classes with this problem inherit transitively from Serializable but are not intended to be serialized (from Java's serialization mechanism) because has the serialVersionUID = 1L which is just a fix to make linter happy, but are not effectively used in a serialization context.

This commit also removes a finalize method, that could be safely be removed.
2022-06-15 09:56:03 +02:00
João Duarte
9e7ca4ccdf
Update releases file to account for 8.2.3 (#14253) 2022-06-14 17:09:28 +01:00
Andrea Selva
de4f976527
Delete consumed DLQ segments and exposes API to acknowledge read events. (#14188)
Introduce a method (markForDelete) in the DeadLetterQueueReader class as way to get acknowledged when events, read by the input plugin, could be considered eligible for deletion. This mechanism is used to delete the tail segments once they result completely consumed.
Other than this, exposes a listener interface, that the client of this class has to register to get notified when the deletion of a segment happened. This is useful for the DLQ input plugin to understand when it could flush the current position to the sinceDB.

This commit also delete the, eventually present, segments files that are older than the current position, and it happens during the setCurrentReaderAndPosition execution.

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-06-14 16:45:23 +02:00
kaisecheng
d63b6ae564
Fix exception of i18n in logstash-keystore (#14246)
This PR adds the load of i18n to LogStash::Settings to fix uninitialized constant I18n exception when using `logstash-keystore`
2022-06-13 18:12:04 +01:00
Sean Story
17700fc70c
14203 fix generated plugin dependencies (#14229)
* Make generated input plugin immediately buildable

* Apply the same changes to codec, filter, and output templates

* Uncomment TODOs in example gemspecs
2022-06-13 10:30:46 -05:00
Andres Rodriguez
0605b75420
[docs] Correctly reference the base OS (ubuntu) for docker (#14214)
* Fix docs to correctly reference the base OS (ubuntu) for docker
2022-06-09 10:00:02 -04:00
João Duarte
0191756f4e
Add Github Action workflow for release notes generation (#14236)
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2022-06-08 22:40:03 +01:00
github-actions[bot]
805bf063f5
Doc: Add pipeline improvements to release notes (#14193) (#14238)
(cherry picked from commit a78aebcd1e)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-06-08 17:23:48 -04:00
github-actions[bot]
579515a386
Doc: Add placeholder for 8.3 release notes (#14180) (#14237)
(cherry picked from commit d1f52eac25)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-06-08 16:25:45 -04:00
Andrea Selva
99e309fe7b
Avoid to throw an exception from a finally block (#14192)
Proposes a code cleanup of the FileLockFactory.obtainLock method. It removes the nesting of ifs using a "precondition style" check, lifting up the error condition, and checking on top of the code flow.

It removed a throw exception from the clean-up finally block.
If an exception is raised from that point it hides the original cause of the problem.
This commit switches the finally block, used in obtaining a file lock, to a catch and re-throw.
2022-06-08 16:26:56 +02:00
Karol Bucek
d2b9b15bc1
Refactor: drop java.util.Collection#inspect extension (#14208)
since JRuby 9.3 a useful inspect is provided out of the box

LS' inspect: <Java::JavaUtil::ArrayList:3536147 ["some"]>
JRuby 9.3's: "#<Java::JavaUtil::ArrayList: [\"some\"]>"
2022-06-07 10:08:32 +02:00
Karol Bucek
433b341f0f
Refactor: avoid loading polyglot (#14175)
* Refactor: require treetop/runtime - avoids loading polyglot
* Build: instruct Bundler not to auto-load polyglot/treetop

+ Build: these deps are properly required as needed
all of them only used in one place (outside of normal bootstrap)
2022-06-07 08:28:56 +02:00
Karol Bucek
2b3e9a1832
Refactor: use Java API for String#split (#14207) 2022-06-07 08:13:13 +02:00
Sean Story
7ab777f4da
Added necessary require, removed instance variable usage of plugin_name (#14206)
* Added necessary require, removed instance variable usage of plugin_name

* Updated usages of plugin_name in codec plugin
2022-06-06 09:48:07 -05:00
Ioannis Kakavas
04f3e32ffa
Add licence mapping for netty (#14117)
Include Netty NOTICE.txt

Co-authored-by: João Duarte <jsvduarte@gmail.com>
2022-06-06 11:58:35 +02:00
João Duarte
4d6942c240
update jackson and jackson-databind to 2.13.3 (#13945)
In jackson-databind 2.10, enabling Default Typing requires having a type validator, and while there's an "allow all" validator called LaissezFaireSubTypeValidator, this commit also tightens the validation a bit by narrowing down the allowed classes.

The default typing validator is only applied to the ObjectMapper for CBOR, which is used in the DLQ, leaving the one for JSON as-is.

Other changes:
* make ingest-converter use versions.yml for jackson-databind
* update jrjackson
2022-06-06 09:47:44 +01:00
Mashhur
886f1caed1
Fix deprecation logging of password policy. (#14159)
* Fix deprecation logging of password policy.
Give users a guide to not only upgrading but also keep current behavior if they really want.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-06-01 16:47:59 -07:00
Andres Rodriguez
498c41bccc
Remove startup.options and system-install docs (#14197)
Removes documentation related to startup.options and system-install binary as they are no longer used in the latest versions of Logstash.
2022-06-01 12:08:08 -04:00
João Duarte
8d01b1649d
Tighten validation of comment body in PR backport workflow (#14186) 2022-05-30 15:53:15 +01:00
João Duarte
9cbcd68faf
Update pr_backporter.yml 2022-05-30 15:14:13 +01:00
Karol Bucek
c08be755b1
Deps: lock faraday to 1.x due elasticsearch-transport (#14185) 2022-05-30 15:50:38 +02:00
João Duarte
a55034f8a9
Set step id for use in following steps on pr backporter workflow (#14181) 2022-05-30 11:00:46 +01:00
github-actions[bot]
79f02b28e1
Release notes for 8.2.2 (#14168) (#14178)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit eb5179fb74)
2022-05-26 18:46:56 -04:00
Karen Metts
87e528ac81
Doc: Add missing release notes (#14169) 2022-05-25 18:37:45 -04:00
Andrea Selva
81566e3522
Forward port of release notes for 8.2.0 and 8.2.1 (#14148)
Forward port of release notes for 8.2.0 and 8.2.1

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-05-25 18:21:46 +02:00
kaisecheng
7f36665c09
Handle out-of-date firstUnackedPageNum in head checkpoint (#14147)
This commit adds a checkpoint for a fully acked page before purging to keep the checkpoint up-to-date
Fixed: #6592

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-05-25 14:38:24 +01:00
João Duarte
c1908c4231
Make version bump action "branch" parameter free form (#14162)
Being a "choice" type parameter required frequent PRs every time there's a new minor. This commit changes the field to take a string instead.
2022-05-25 12:15:37 +01:00
João Duarte
83b3c39871
bump version to 8.4.0 (#14161) 2022-05-25 12:12:25 +01:00
kaisecheng
9daffad8ad
update release ci 7.17.4 (#14062) 2022-05-25 10:17:55 +01:00
Andrea Selva
7dff55c8bc
Update CI versions after 8.2.1 (#14137) 2022-05-25 08:48:47 +02:00
Ry Biesemeyer
e3988f534a
Revert accidental (#14158)
* Revert "Improve log readability and remove extra logging."

This reverts commit 67cdbb050d.

* Revert "Password policy deprecation log fixup."

This reverts commit 46b71b1cd4.
2022-05-24 15:15:14 -07:00
mashhur
67cdbb050d Improve log readability and remove extra logging. 2022-05-24 14:58:40 -07:00
mashhur
46b71b1cd4 Password policy deprecation log fixup. 2022-05-24 14:44:05 -07:00
Rob Bavey
ea1690d5ba
update jdk to 11.0.15+10 (#14152)
This commit re-adds the update to jdk 11.0.15+10 originally made in #14031
2022-05-24 11:06:40 -04:00
Ry Biesemeyer
d8454110ba
Field Reference: handle special characters (#14044)
* add failing tests for Event.new with field that look like field references

* fix: correctly handle FieldReference-special characters in field names.

Keys passed to most methods of `ConvertedMap`, based on `IdentityHashMap`
depend on identity and not equivalence, and therefore rely on the keys being
_interned_ strings. In order to avoid hitting the JVM's global String intern
pool (which can have performance problems), operations to normalize a string
to its interned counterpart have traditionally relied on the behaviour of
`FieldReference#from` returning a likely-cached `FieldReference`, that had
an interned `key` and an empty `path`.

This is problematic on two points.

First, when `ConvertedMap` was given data with keys that _were_ valid string
field references representing a nested field (such as `[host][geo][location]`),
the implementation of `ConvertedMap#put` effectively silently discarded the
path components because it assumed them to be empty, and only the key was
kept (`location`).

Second, when `ConvertedMap` was given a map whose keys contained what the
field reference parser considered special characters but _were NOT_
valid field references, the resulting `FieldReference.IllegalSyntaxException`
caused the operation to abort.

Instead of using the `FieldReference` cache, which sits on top of objects whose
`key` and `path`-components are known to have been interned, we introduce an
internment helper on our `ConvertedMap` that is also backed by the global string
intern pool, and ensure that our field references are primed through this pool.

In addition to fixing the `ConvertedMap#newFromMap` functionality, this has
three net effects:

 - Our ConvertedMap operations still use strings
   from the global intern pool
 - We have a new, smaller cache of individual field
   names, improving lookup performance
 - Our FieldReference cache no longer is flooded
   with fragments and therefore is more likely to
   remain performant

NOTE: this does NOT create isolated intern pools, as doing so would require
      a careful audit of the possible code-paths to `ConvertedMap#putInterned`.
      The new cache is limited to 10k strings, and when more are used only
      the FIRST 10k strings will be primed into the cache, leaving the
      remainder to always hit the global String intern pool.

NOTE: by fixing this bug, we alow events to be created whose fields _CANNOT_
      be referenced with the existing FieldReference implementation.

Resolves: https://github.com/elastic/logstash/issues/13606
Resolves: https://github.com/elastic/logstash/issues/11608

* field_reference: support escape sequences

Adds a `config.field_reference.escape_style` option and a companion
command-line flag `--field-reference-escape-style` allowing a user
to opt into one of two proposed escape-sequence implementations for field
reference parsing:

 - `PERCENT`: URI-style `%`+`HH` hexadecimal encoding of UTF-8 bytes
 - `AMPERSAND`: HTML-style `&#`+`DD`+`;` encoding of decimal Unicode code-points

The default is `NONE`, which does _not_ proccess escape sequences.
With this setting a user effectively cannot reference a field whose name
contains FieldReference-reserved characters.

| ESCAPE STYLE | `[`     | `]`     |
| ------------ | ------- | ------- |
| `NONE`       | _N/A_   | _N/A_   |
| `PERCENT`    | `%5B`   | `%5D`   |
| `AMPERSAND`  | `&#91;` | `&#93;` |

* fixup: no need to double-escape HTML-ish escape sequences in docs

* Apply suggestions from code review

Co-authored-by: Karol Bucek <kares@users.noreply.github.com>

* field-reference: load escape style in runner

* docs: sentences over semiciolons

* field-reference: faster shortcut for PERCENT escape mode

* field-reference: escape mode control downcase

* field_reference: more s/experimental/technical preview/

* field_reference: still more s/experimental/technical preview/

Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2022-05-24 07:48:47 -07:00
Rob Bavey
9e2c87a1ab
Switch adoptopenjdk url to adoptium (#14098)
* Switch adoptopenjdk url to adoptium

Newer versions of the JDK are only available from api.adoptium.net, and not dual hosted on api.adoptopenjdk.net
This commit allows the use of adoptium versions of the JDK.

Relates: #14072
2022-05-24 09:33:44 -04:00
Ry Biesemeyer
e6520cfee1
deps: pin rufus-scheduler to 3.7.x (#14150)
* deps: pin rufus scheduler to 3.7.x

* duplicate add_runtime_dependency 'rufus-scheduler'

Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2022-05-24 00:50:41 -07:00
Mashhur
15dd1babf0
Simplifying HTTP basic password policy. (#14105)
* Simplifying HTTP basic password policy.
2022-05-23 21:11:10 -07:00
beirtipol
938db64636
Add value converters for java.time (#13972)
Add value converters for java.time.LocalDate, LocalDateTime and ZonedDateTime
2022-05-23 22:30:14 +01:00
Ry Biesemeyer
5337cde599
Add support for ca_trusted_fingerprint in Apache HTTP and Manticore (#14120)
* Add support for ca_trusted_fingerprint in Apache HTTP and Manticore

Adds a module `LogStash::Plugins::CATrustedFingerprintSupport`, which can be
included in a plugin class to add a `ca_trusted_fingerprint` option to create
an Apache SSL TrustStrategy that can be used to bypass the TrustManager when
a matching certificate is found on the chain.
2022-05-20 09:31:32 -07:00
Rob Bavey
02c2aec710
Fix debug output for bin/logstash-plugin (#14132)
When run in debug mode, #invoke was returning an instance of UI::Shell rather
than a string, causing the plugin to crash when `<<` was called on.
This commit ensures that a string is returned regardless of whether debug is set

Fixes: #14131
2022-05-20 09:13:08 -04:00
Andrea Selva
69107a5bc6
Simplifies aliass registry marking task config and move into separate class (#14138)
Introduce some default configs for Alias registry signing task, extract into separate class and cover with tests.
2022-05-20 13:59:55 +02:00
kaisecheng
da68ff3803
This commit avoids unnecessary thread sync of PQ notFull state. (#14129)
When PQ is full, workers wake up writer thread in every read.
However, without removing a fully acked page, queue is still full.
This commit changes the condition of notFull signal.
Fixed: #6801
2022-05-20 12:14:54 +01:00
kaisecheng
205cf43213
[Doc] queue.max_bytes for all queues (#14128)
* bring back the details of PQ size checking
2022-05-20 10:32:21 +01:00
Andrea Selva
2e2dcbb46a
Fixed SignAliasDefinitionsTask task to depend on input yaml registry file (#14126)
Updates the SignAliasDefinitionsTask Gradle task to express as input dependency the Aliases registry yaml file, so that when the input changes then a new signed registry is created.
2022-05-20 09:26:37 +02:00
Nicole Albee
a6e418adf7
Doc: Update settings file doc to call out queue type (#14127)
* [DOCS] Added a few missing "(`queue.type: persisted`)" to a few of the logstash.yml.
* [DOCS] Moved a few of the queue_type persisted indicators.
2022-05-19 20:36:06 -04:00
Rob Bavey
4209481cc1
Add troubleshooting information around using certain versions of the … (#14061)
* Add troubleshooting information around using certain versions of the JDK on Windows

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-05-19 11:44:56 -04:00
Rob Bavey
4a2268a43f
Update jruby version to 9.3.4.0 (#14114)
This commit updates the version of jruby used in Logstash to `9.3.4.0`.

* Updates the references of `jruby` from `9.2.20.1` to `9.3.4.0`
* Updates references/locations of ruby from `2.5.0` to `2.6.0`
* Updates java imports including `org.logstash.util` to be quoted
  * Without quoting the name of the import, the following error is observed in tests:
  * `java.lang.NoClassDefFoundError: org/logstash/Util (wrong name: org/logstash/util)`
  * Maybe an instance of https://github.com/jruby/jruby/issues/4861
* Adds a monkey patch to `require` to resolve compatibility issue between latest `jruby` and `polyglot` gem 
  * The addition of https://github.com/jruby/jruby/pull/7145 to disallow circular
causes, will throw when `polyglot` is thrown into the mix, and stop logstash from
starting and building - any gems that use an exception to determine whether or not
to load the native gem, will trigger the code added in that commit.
  * This commit adds a monkey patch of `require` to rollback the circular cause exception
back to the original cause.
* Removes the use of the deprecated `JavaClass`
* Adds additional `require time` in `generate_build_metadata`
* Rewrites a test helper to avoid potentially calling `~>` on `FalseClass`


Co-authored-by: Joao Duarte <jsvduarte@gmail.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-05-19 10:29:59 -04:00
RobertShan2000
379ebaf1bd
Update JVM document to fix issue 13561 (#14099)
Fix a contradictory statements about setting LS_JAVA_HOME with Logstash bundled with JDK.
Fix #13561
2022-05-19 10:13:37 +02:00
Rob Bavey
2c7f14d25a
Move JvmOptionParser to separate project (#13657)
This commit moves the JvmOptionParser into its own gradle project.

This enables the JvmOptionParser to remain compatible with Java 1.8 to present a helpful error message to a user attempting to start Logstash using older versions of Java, while allowing the main Logstash code base to freely use idiomatic Java 11 features.
2022-05-18 14:58:53 -04:00
Ry Biesemeyer
06bca0150f
deps: pin concurrent-ruby pending removal of TimerTask (#14113) 2022-05-18 00:29:34 -07:00
Mashhur
33328955c4
[CPM] Fetch pipelines with wildcard IDs from ES and apply. (#14076)
* [Central Pipeline Management] Fetch pipelines with wildcard IDs from ES and apply. #14076

* URL encoding applied, code review feedbacks taken: unit test case for getting es version API and separate method for ES wildcard support.
2022-05-17 16:08:53 -07:00
Mashhur
12162cbd80
Change on_superuser to run_as_superuser to clear a confusion. (#14089)
* Change on_superuser to run_as_superuser to clear a confusion.
2022-05-17 10:54:06 -07:00
Rob Bavey
88e607b7bb
Revert "Restrict json to avoid 2.6.2 until upstream jruby issue is solved (#14104)" (#14115)
As a `json-2.6.2-java` has been released, the pin can be removed

This reverts commit e72515c871.
2022-05-17 11:51:00 -04:00
kaisecheng
7641b076f4
fix monitoring api integration test with draining queue (#14106)
This commit ends the integration test with teardown instead of sending a signal to kill
Related: #13935
2022-05-16 23:26:24 +01:00
Rob Bavey
e72515c871
Restrict json to avoid 2.6.2 until upstream jruby issue is solved (#14104)
* Pin json to avoid 2.6.2 until upstream jruby issue is solved

Version 2.6.2 of json will not install under jruby - https://github.com/flori/json/issues/497
This commit pins to only allow previous versions until the issue is resolved.
2022-05-16 11:53:49 -04:00
Andrea Selva
17d62fa080
Fix of DLQ stream position retrieval (#14093)
Adds some tests to proof that the offset position retrieved from the `RecordIOReader` effectively point to the start of the next available event and not to the last channel position retrieved.
Adds fixes for the problem, moving the concept of `channelPosition` to `streamPosition` differentiating the position on the stream from the position on the channel. However the already published interface (method getChannelPosition) is not renamed to avoid the introduction of a breaking change.
2022-05-16 17:49:29 +02:00
kaisecheng
0af9fb0d5f
Allow metrics update when PQ draining (#13935)
This commit moves the stop of metrics collection after pipelines shutdown to allow metrics update during PQ draining
Fixed: #13832
2022-05-16 15:36:56 +01:00
kaisecheng
90e7c8864e
[Doc] PQ and DLQ do not support NFS (#14095)
* [Doc] PQ and DLQ do not support NFS
Fixed: #12097

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-05-16 15:28:19 +01:00
Rob Bavey
b4c6db29f7
Fix hang bug on DLQ test (#14097)
The recent commit #14079 to the DLQ would cause the `testSeekByTimestampWhenAllSegmentsAreDeleted`
to intermittently hang. This is due to files being deleted from the file system in the test,
but not from the internal list of segments. This would cause `pollEntryBytes` to loop indefinitely
looking for a deleted segments file. This commit also removes the segment path from the internal
segment list when a File is not found initially, and not just when a `NoFileException` is thrown
2022-05-12 08:57:18 -04:00
Karol Bucek
c9f9c38753
CI: docs preview comment working, for real (#14094) 2022-05-12 08:30:58 +02:00
Karol Bucek
5d46a72381
CI: improve doc-preview action (#14067) 2022-05-11 15:59:23 +02:00
João Duarte
1f93672b73
Ensure pipelines.yaml is loaded safely (#13883) 2022-05-11 10:03:40 +01:00
Andrea Selva
1e3b0a65a0
Protected FileChannel open of segment files against NoSuchFileException (#14079)
This PR is a refactoring of `open` invocation inside `RecordIOReader` of DLQ segments from the reader side.
After PR #13923, which when  `storage_policy` `drop_older` mode is active delete segment files from the tail, it could happen that, also after a file existence check, the opening operation throw a `NoSuchFileException`. 
It could happen in unlucky concidences, where the file existence check return a positive response, but in the meanwhile the upstream process decides to delete the file. This event has to be recognized as a "deletion of a segment", and managed.
2022-05-11 09:02:56 +02:00
Rob Bavey
092892cdd4
Add thread safety around Puma startup/shutdown (#14080)
If #stop is called on Puma before #run is finished - for example, when an
incorrect configuration is specified, Puma can be left with threads hanging
around.
This is due to a check/notify pipe used to signal state changes not being created
until halfway through the #run method, enabling a window where #stop can be called
before the pipe has been created, leading to the run thread not exiting. Prior to
jruby-9.3.x, this would tend to be benign and Logstash would exit normally. However,
jruby-9.3.x introduced a tear down as part of the shutdown mechanism, which will join
active threads on shutdown. This puma issue would cause an indefinite hang on exit
when this condition is triggered.
2022-05-10 13:22:45 -04:00
Rob Bavey
6a7077c534
Add mandatory option to jvm configuration to handle logstash startup … (#14066)
* Add mandatory option to jvm configuration to handle logstash startup issues

OpenJDK versions 11.0.15+10, 17.0.3+7 introduced new functionality to allow Java to enable
strict path checking. This included disallowing the use of `:` in any place other than directly
after the drive letter. Unfortunately, this check had the side effect of breaking compatibility
with special device paths, such as `NUL:`, which in turn, prevents Logstash from starting.
This feature was gated by the use of the `jdk.io.File.enableADS` property with a value of `true`
disabling the check.

This property was introduced with the default value of `false`, which prevents logstash
from starting in a Windows environment. While the next release is anticipated to set this
value to `true`, this commit explicitly sets that value to enable Logstash to be able
to start correctly.

Relates: #14042
2022-05-10 10:36:22 -04:00
kaisecheng
41cb3d3680
Hide Shutdown Watcher stall message when PQ draining (#13934)
Hide shutdown stall message when queue is draining
Fixed: #9544

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-05-10 13:46:15 +01:00
Karol Bucek
45b7da638f
Refactor: more logging of PQ behavior (#14065) 2022-05-09 10:34:49 +02:00
Andrea Selva
09aa7a1aac
Adds DLQ drop counter and last error metrics into management API (#14058)
Adds some metrics to the dead_letter_queue part of the monitoring endpoint _node/stats/pipelines/, precisely under the path pipelines.<pipeline name>.dead_letter_queue. The metrics added are:

- dropped_events: count the number of dropped events caused by "queue full condition", when drop_newer storage policy is enabled, happened to this DLQ since the last restart of Logstash process.
- last_error: a string reporting the last error registered for DLQ dropping condition.
- max_queue_size: like for PQ it's the maximum size that the DLQ can reach.


Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-05-06 09:12:33 +02:00
Andrea Selva
229e7ce5ea
Introduce a retry mechanism in pipeline-to-pipeline (#14027)
Updates the `internalReceive` method implementation in Pipeline Input to catch exception error and return the position where the stream was interrupted. Modify the EventBus's batch forwarding logic to handle errors from Pipeline Input and apply retry logic only from last error position in the batch of events.

Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2022-05-05 16:16:28 +02:00
Andrea Selva
954d351d5f
Fix flaky test, the writer head segment is not a tail segment (#14073) 2022-05-05 09:29:01 +02:00
João Duarte
53f23403c0 Revert "update jdk to 11.0.15+10 (#14031)"
This reverts commit 478eb6834a.

AdoptOpenJdk is lagging behind Adoptium and we should move the
downloadJdk gradle task to use Adoptium instead.
Until then, we're reverting this change to use a version available from
AdoptOpenJdk.
2022-05-04 15:01:16 +01:00
João Duarte
478eb6834a
update jdk to 11.0.15+10 (#14031) 2022-05-04 11:33:55 +01:00
João Duarte
2ce081eee8
Update releases file with 8.2.0 2022-05-04 11:12:06 +01:00
Rob Bavey
e02a9e00c7
Fix plugin classloading (#14060)
Prior to this commit, attempting to use a custom java plugin installed from rubygems would
fail as the `files` field used to find jar files in the gem is not populated for such gems

This commit uses the `full_require_path` to find the jar file for a native jar plugin,
which should work regardless of where the gem was installed from, locally or via rubygems

Additionally, this commit will only attempt to locate the jar file inside the gem when it
is required (only when the experimental separate plugin class loader is used)

This commit builds on the work done in #13888

Relates: #13888, #11305

Co-authored-by: twosom <two_somang@icloud.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-05-03 17:49:21 -04:00
Mashhur
d8e08e9f20
Add complex password policy on basic auth (#14045)
* Apply complex password policy on HTTP basic auth.
2022-05-03 09:57:46 -07:00
Mashhur
25796737c3
Prevent Logstash from running as root. (#14046)
* Prevent Logstash from running as root.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-05-02 08:53:35 -07:00
kaisecheng
1c851bb15c
Fix geoip database download does not respect http_proxy setting (#14048)
This commit adds `http_proxy` to geoip database download option to respect proxy setting

Fixed: #14047
2022-04-29 15:25:28 +01:00
Karen Metts
2c5cc00e0b
Doc: Group central mgmt and configuring central mgmt topics (#14050) 2022-04-28 18:33:37 -04:00
Andrea Selva
c1fe7095c3
Implements DLQ storage policy (#13923)
Exposes dead_letter_queue.storage_policy configuration setting to explicitly enable the drop_older behavior in DLQs.

Moving from a drop_newer to a drop_older behavior has impact both on the writer side and to the reader side.
The implementation leverage the fact that a complete DLQ segment can be removed to free up space; on the writer side when the dead_letter_queue.max_bytes limit is reached it has to remove old segments.

On the reader side, the consuming has to be adapted to don't expect a continuous flow of segments, it could face an hole due to removal of tail segments.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-04-28 09:16:03 +02:00
Karol Bucek
33b77f02f5
Chore: try different version of GH action (#14036)
v1 seems to have started failing with: 
```
Run thollander/actions-comment-pull-request@v1
  with:
    message: 📃 **DOCS PREVIEW**  https://logstash_14019.docs-preview.app.elstc.co/diff
  Note: if you get a "404!" please wait until the elasticsearch ci job finishes.
  
    GITHUB_TOKEN: ***
Error: Resource not accessible by integration
```
2022-04-27 15:00:17 +02:00
kaisecheng
e8cd0d3039
Fix stopped pipeline unable to be deleted in registry (#14018)
Prior to the change, pipeline `stop` and `delete` happen in two converge cycles, which
has a gap letting the stopped pipeline compare with the same pipeline definition
in central pipeline management, hence Logstash see the stopped pipeline as graceful finish
and not to delete in registry

This commit creates StopAndDelete action to delete running pipeline in one converge cycle

Fixed: #14017
2022-04-27 09:30:16 +01:00
Rob Bavey
4e77f1b79d
Make AliasRegistry a singleton (#14002)
* Make AliasRegistry a singleton

The current implementation of AliasRegistry will create an instance of the Alias Registry for each
pipeline, which appears to potentially result in situations, such as in #13996, where multiple pipelines
are simultaneously loading an alias registry from a yaml file in the jar file using getResourceAsStream, with
the potential of the first thread closing the jar file underneath subsequent threads, leading to errors when
reading the yaml file as the JarFile has been closed after the initial thread completed accessing.

This commit changes the AliasRegistry to be a singleton, as is the PluginRegistry.

Relates: #13996, #13666

* Update reflections library to 0.9.12 to avoid multi threading bug

Earlier versions of the reflections library used in the plugin registry would
use caches on JarUrlConnection, which when closed would also close the jar file
for other resources using it, such as the AliasRegistry. This, combined with the
fact that the AliasRegistry could be created simultaneously by many threads/pipelines
could cause issues during AliasRegistry creation leading to failure to create a
pipeline.

* Avoid use of URLConnection caching when getting alias yaml resource
* Use idiomatic ruby when accessing Java getInstance method

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-04-26 11:15:30 -04:00
João Duarte
96f7e2949d
ensure puma is at least 5.6.4 (#13944) 2022-04-26 10:02:00 +01:00
Andres Rodriguez
afc0edca18
Fix Bundled JDK docs to reflect JDK 11 (#14021)
Bundle JDK docs mislead users by specifying JDK 17 as the bundled version instead of 11.
2022-04-25 16:20:35 -04:00
Karen Metts
b16c836817
Doc: Restructure source files for pipeline configuration (#13990) 2022-04-21 17:35:03 -04:00
Karen Metts
2c5b039629
Doc: Refine content for generated CA in LS-ES security section (#13834)
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2022-04-21 17:21:49 -04:00
Andrea Selva
776b57f15b
Fix/avoid leak secrects in debug log of ifs (#13997)
Updates the `ConfigVariableExpander.expand` to selectively create `SecretVariable` instances for SecretStore resolved environment variables.
`SecretVariable` instances in if statements are decrypted during `eq` `EventCondition` compilation; bringing the secret value and using in the comparator.
2022-04-21 09:57:14 +02:00
Ry Biesemeyer
0ee3aaa538
doc: add section on breaking changes to contribution guidelines (#11324)
* doc: add section on breaking changes to contribution guidelines

* docs: breaking changes voice fix

Co-Authored-By: João Duarte <jsvd@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-04-20 07:46:38 -07:00
João Duarte
0155a2e279
Update releases file with new 7.17.3 and 8.1.3 versions (#14007) 2022-04-20 13:07:56 +01:00
Andres Rodriguez
5392ad7511
[doc] Add Logstash to Logstash HTTP example configuration.
Documents how to configure Logstash to Logstash with HTTP Input and Output Plugins.
2022-04-14 13:22:45 -04:00
Mashhur
76ca3fefad
A structural change for aliased plugin declarations to support alias doc headers. (#13971)
* A structural change for aliased plugin declarations to support doc header replaces.

* YAML file structure made to be more readable, make AliasPlugin class immutable.

* Do not expose alias doc header replaces since we are not using them. Unit tests failure fix.
2022-04-14 09:40:19 -07:00
Rob Bavey
1291b5edcc
Further improve check on "running pipelines" after SIGHUP (#13995)
As pointed out in this post merge review comment, there is a window
where we could miss a pipeline transitioning from 'loading' to 'running'
in the original fix, as separate calls are made to the pipeline registry.
This commit fixes that by making a single call to the pipeline registry which
allows for also returning pipelines in the `loading` state.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-04-14 10:10:59 -04:00
Rob Bavey
7b2bec2e7a
Fix reload of pipelines via SIGHUP (#13994)
When logstash is run without automatic reloading, it is still possible to reload configurations
by using 'SIGHUP'. This functionality was broken in #12444, which split non-terminated pipelines
into "loading" and "running" states. The call `no_pipelines?` in agent#execute would no longer
find pipelines in a "loading" state, causing the loop to exit, and logstash to shutdown. This
commit tests for pipelines in a "loading" state to restore functionality
2022-04-13 12:48:15 -04:00
Rob Bavey
339a67fe37
Convert Exception during converge to a failed action (#13969)
Certain errors during pipeline converge will emit an IllegalStateException - for example attempting
to reference an environment variable that does not exist. Attempting to add a java exception to the
converge result would result in an uncaught exception in a pipeline thread leading to an unclean
shutdown.

This had the effect of,prior to this commit, Logstash behaviour varying depending on the class of
error that caused a pipeline not to start - an invalid pipeline configuration would still enable
logstash to start other pipelines in a multiple pipeline configuration, or automatic reloading
enabling changes to the configuration to allow the pipeline to start(in multi- and single pipeline
configurations).
However, a missing environment variable would cause Logstash to crash hard no matter what.

This was discovered when updating to jruby-9.3.3.0, when new clean up code joining existing
threads to perform a graceful shutdown was stuck indefinitely, due to the webserver shutdown
code not being called, due to the unclean shutdown.
2022-04-12 10:04:10 -04:00
kaisecheng
5197c85074
Fix window CI for PQ size checking (#13981)
windows platform fails to generate desired file size with #truncate(), hence failing the test
Fixed: #13957
2022-04-12 14:09:26 +01:00
Andrea Selva
1d31816a4b
Correct the class reference to the MetricNotFound exception (#13970)
Fix the class reference `Instrument::MetricStore::MetricNotFound`  to be `LogStash::Instrument::MetricStore::MetricNotFound` and do not raise a constant not found reference when the point "/_node/stats" is queried and no pipelines are defined.
2022-04-04 09:26:53 +02:00
João Duarte
fa7b53b581
Adjust versions.yml to reflect new 7.17.2 and 8.1.2 releases (#13966) 2022-03-31 18:12:08 +01:00
João Duarte
f102b2e871
Make update strict in version bump github workflow (#13961)
Without --strict, Bundler may decide to ignore the major/minor/patch flag, as we can see in https://github.com/elastic/logstash/pull/13960/files#diff-127e1a3a65d315d86dbe640d9578a969da44e5226e5d9bf2de251b075c1d8b7aR481
2022-03-31 14:25:46 +01:00
Andres Rodriguez
cbb3ffd0dd
[doc] Remove references to sysv and upstart scripts when running logstash as a service. (#13953)
Remove any references about the use of sys-v or upstart scripts to run Logstash as a service.
2022-03-30 11:27:48 -04:00
Andres Rodriguez
c5ede67fc3
Removal of sys-v init.d scripts (#13922)
Removes the installation of sys-v init.d scripts from .deb and .rpms.

All supported operating systems use systemd as the init system, as such, it is no longer necessary to continue to ship Sys-v Init.d scripts.
2022-03-30 11:26:56 -04:00
João Duarte
6b930aa00c
Remove conservative flag from version bump workflow (#13952)
The conservative flag is preventing dependences, (both from Elastic and 3rd party) to be updated.
This causes unnecessary lag behind new dependency releases.
2022-03-30 15:44:01 +01:00
João Duarte
d339563ead
bump to 8.3.0 (#13950) 2022-03-30 12:26:25 +01:00
João Duarte
5289d49887 add 8.2 to version bump github workflow 2022-03-30 12:21:10 +01:00
João Duarte
682f07b703
[DOC] precedence between environment variables and yml in docker (#12198)
* [DOC] precedence between environment variables and yml in docker

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-03-29 17:19:55 +01:00
Andrea Selva
d2739a875c
Updates the LogstashService launcher to use the JDK specified (#13946)
Sets the LS_JAVA_HOME environment variable for the environments used to spawn Logstash process in integration tests.
The JDK matrix testing is based on selecting the desired JDK to run the tests, through the BUILD_JAVA_HOME.
However, when the integration tests spawn a Logstash process this setting was missed.
2022-03-29 17:17:36 +02:00
Rob Bavey
00e28b1d91
[Test] Adds explicit unexpected JVM messages test, and simplifies regex in offline_spec (#13892)
* Simplify regex in prepare_offline_spec.rb
* Add test to check for unexpected warnings

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-03-29 09:46:26 -04:00
Rob Bavey
43c6576344
Improve safety of stats retrieval from queue (#13942)
This commit guards against reading a value from a stat that may not be
populated before an attempt is made to retrieve its value, potentially causing
a `undefined method `[]' for nil:NilClass`.
2022-03-28 20:04:53 -04:00
Andrea Selva
916ddf2c8d
Fix/flaky error tests in missed retries to central management (#13941)
This commit is a forward port of #13925.
Covered all calls to ES with retryable when accessing the central management to query the pipelines configurations.
2022-03-28 16:30:31 +02:00
Karol Bucek
b545f55f32
CI: disable testing against 8.1.1 for 8.x (#13938) 2022-03-28 14:03:36 +02:00
Karen Metts
c64ef889d5
Doc: Logstash-to-Logstash communication (#13926)
Adds http-output to http-input as a Logstash-Logstash configuration option
Expands info on considerations for both http-http and lumberjack-beats to help users make the best choice

Co-authored-by: Andres Rodriguez <andreserl@ubuntu.com>
2022-03-25 12:59:18 -04:00
Rob Bavey
b4c54ab681
[Java17] Add --add-export settings to restore JDK17 compatibility (#13825)
* [Java17] Add `--add-export` settings to restore JDK17 compatibility

After #13700 updated google-java-format dependency, it is now required to add a number
of `--add-export` flags in order to run on JDK17. This commit adds these flags to the
jvm options for a running logstash, and to the tests running on gradle to enable tests
to still work

* Move mandatory JVM options out of `jvm.options` and into JvmOptionsParser

Certain values for the JVM are mandatory for Logstash to function correctly. Rather than
leave them in config/jvm.options where they can be updated, and can cause upgrade issues
for users when we add new mandatory options, move them into code where they cannot be
changed
2022-03-24 16:59:15 -04:00
kaisecheng
71772074a7
PQ size check for multiple pipelines (#13877)
Fixed unable to start causing by queue.max_bytes: 0
Added PQ size checking for multiple pipelines in converging

Fixed: #12213
2022-03-24 18:11:32 +00:00
kaisecheng
1a5030bd63
add backoff to checkpoint write (#13902)
This commit changes `queue.checkpoint.retry` to `true` by default allowing retry of checkpoint write failure.
Add exponential backoff retry to checkpoint write to mitigate AccessDeniedExcpetion in Windows.
Fixed: #12345
2022-03-24 09:19:45 +00:00
João Duarte
e45fa8ae2f
Update branch choices in version bump workflow 2022-03-23 17:50:03 +00:00
Andrea Selva
c544ecb380
Update failing policy in Central Management fetcher and license checker if hit ES down node (#13689)
Wraps the calls to the central management Elasticsearch cluster with the utility class Stud::Try to handle the remote host error when the client used to connect hit a not available node.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-03-23 14:37:03 +01:00
Andres Rodriguez
01fd474dc1
Fixes centos-7 package init scripts
Fixes the CentOS package installation to ensure that if both the systemd unit and sys-v init script are installed, the “service” command  a prefers systemd.
2022-03-22 20:07:55 -04:00
Rob Bavey
d64248f628
Bump releases.json (#13921)
8.1.1 has been released, and the latest snapshot on 8.x is now 8.2.0-SNAPSHOT
2022-03-22 10:07:29 -04:00
github-actions[bot]
de062add21
Add plugin uninstall release note (#13867) (#13912)
* Add plugin uninstall release note

Forward port PR #13867 to main branch

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 3749b1fde7)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-03-18 11:11:49 +00:00
github-actions[bot]
2a586b9822
Release notes for 8.1.0 (#13828) (#13911)
* Update release notes for 8.1.0
* Forward ported release notes for 8.0.1 to 8.1

Forward port PR #13828 to main branch

Co-authored-by: andsel <selva.andre@gmail.com>
(cherry picked from commit 31e06c0b1c)

Co-authored-by: Logstash Machine <43502315+logstashmachine@users.noreply.github.com>
2022-03-18 11:09:52 +00:00
João Duarte
1195b38422
fix default argument handling in rake artifact task (#13904)
Ruby allows methods to have default values in arguments if they're not
passed. However if a nil is passed then the default value isn't used.

The artifact:archives tasks were passing nil values to the exclusion
argument, causing all files to be included in the package.

This commit cleans the naming of the path lists and ensures the default
exclusion list is always used.
2022-03-18 10:46:20 +00:00
João Duarte
8de70172a8
Enable content write permission for pr backporter workflow (#13898)
PR backports need to create branches remotely which serve as target branches for the backport pull requests.
2022-03-18 10:39:52 +00:00
Andrea Selva
fbcbb7084f
Print bundled jdk's version in launch scripts when LS_JAVA_HOME is provided (#13880)
Extracts the bundled JDK's version into a one-line text file which could easily read and print from bash/batch scripts.
Updates Logstash's bash/batch launcher scripts to print the bundled JDK version when warn the user about his override.

Updates the rake script used to create Logstash artifacts (rakelib/artifacts.rake) to include JDK related stuff only if packages that requires it.
2022-03-18 08:59:30 +01:00
Andrea Selva
32675c1a88
Update Jackson databind in ingest-converter tool (#13900) 2022-03-16 12:33:27 +01:00
João Duarte
27dc80f7e1
Fix version bumper workflow target repo and user allow listing 2022-03-14 18:00:16 +00:00
João Duarte
85eed0851f
Update and rename main.yml to version_bumps.yml 2022-03-14 17:49:51 +00:00
João Duarte
ef69112b7e
Create main.yml 2022-03-14 17:39:01 +00:00
Andrea Selva
a8bd90c22d
Quotes java executable path in case it contains spaces (#13881)
Updates all Windows batch scripts used as CLI tools to quotes the %JAVACMD% to avoid path problems when the path contains spaces.
2022-03-14 18:17:38 +01:00
Andrea Selva
8c79a0067c
Updates license checker after inclusion of et-orbi, fugit and raabro. (#13891)
These dependencies are Rufus transitive deps, included by JDBC integration plugin v5.2.4
2022-03-14 15:58:48 +01:00
Andres Rodriguez
38fbe5aa0f
Remove pleaserun (via bin/system-install) usage (#12415)
This change removes the usage of 'pleaserun', which
was leveraged create the init.d scripts or systemd units.

Now, we ship init.d scripts and systemd units to make
the maintenance easier and following the lead of the
other Elastic projects.

Fixes: #10519, Fixes: #12439, Fixes: #8253
2022-03-10 12:11:41 -05:00
kaisecheng
d71553e5d7
[Doc] update queue.max_bytes and queue.page_capacity (#13833)
Fixed: #8650, #10718

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-03-09 15:51:18 +00:00
Karen Metts
8edce82170
Doc: Clarify monitoring settings (#13871)
Co-authored by: Dan Roscigno <dan@roscigno.com>

Moves content from #10940 into updated file/file structure
2022-03-08 16:48:16 -05:00
Andrea Selva
a059364183
Update CI versions after 8.1.0 (#13830) 2022-03-08 18:34:10 +01:00
João Duarte
0887d7609d
Update pr backporter workflow (#13807)
1. Explicitly deny content changes in the workflow
2. Move comment body to env var
3. Restrict workflow to created comments
4. Restrict workflow to allow list of users
2022-03-07 18:25:25 +00:00
João Duarte
edfbabf2fc
speed up artifact file listing (#13862)
currently the artifact tasks compute the file listing from a list of
include regexes and exclude regexes. However this is done by hand,
taking each include regex and running it through each exclude regex.

This is quite slow as we add more exclude regexes. This PR changes to
totally relying on Rake::FileList, by feeding it the include and exclude
lists. This speeds up file listing from 150 seconds to 1 second.
2022-03-07 18:18:07 +00:00
Andrea Selva
0084492494
Fix Logstash cli tools to use the selected JDK under Windows (#13839)
Some Logstash tools invokes directly the JRuby intepreter. The interpreter uses the JVM pointed by two environment variables:
- JAVACMD
- JAVA_HOME\bin\java.exe

The setup.bat script exported the selected JVM under the env var named JAVA, which isn't recognized by vendored jruby.
This commit fixes it renaming to JAVACMD.
2022-03-07 15:05:52 +01:00
Karen Metts
68bacedf49
Doc: Improve formatting and readability for pipeline ordering (#13084)
Add pipelines.ordered entry to pipelines.yml

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-03-04 18:18:52 -05:00
Ry Biesemeyer
0369ba208d
artifacts: omit openssl_pkcs8_pure specs from built artifacts (#13715)
* artifacts: omit openssl_pkcs8_pure specs from built artifacts

* Exclude _all_ top-level spec and test directories from built artifacts

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-03-04 10:55:31 -08:00
Ry Biesemeyer
e9455ca81e
pipeline-info: increase safety of transforming stats (#13345)
When a pipeline isn't fully initialized, we run the risk of attempting to
format pipeline info that isn't yet fully-shaped. By using safe-fallback
methods like `Hash#dig` and conditional-chaining, we can avoid the spurious
`NoMethodError` caused by sending `[]` to nil.
2022-03-04 10:49:52 -08:00
Karen Metts
4e226927fa
Doc: Correct name for java_home env variable (#13827) 2022-03-04 12:06:33 -05:00
Ry Biesemeyer
f10059ec7b
tools: allow version bump to use local lockfile as baseline (#13686) 2022-03-04 08:44:26 -08:00
Ry Biesemeyer
a6c0e75b53
api: avoid 5xx when stats/events not yet populated (#13424)
* api: avoid 5xx when stats/events not yet populated

* Add catching of metrics exception also for retrieve of :queue metrics. No pipelines means no queues created

* Added empty result when no pipelines is present and query for node info API

Co-authored-by: andsel <selva.andre@gmail.com>
2022-03-04 08:42:28 -08:00
Ry Biesemeyer
8bec0e658a
i18n: alias logstash.runner.configuration.* under logstash.agent.configuration (#13244)
A number of plugins reach into Logstash's i18n translations to "helpfully"
communicate certain configuration errors, but rely on translations that were
moved in 00a99c19e5 from logstash.agent to
logstash.runner. Since then, it is possible to hit obtuse error messages about
failing to load a translation instead of the intended helpful message:

~~~
translation missing: en.logstash.agent.configuration.invalid_plugin_register
~~~

By moving the `logstash.agent` definition to _after_ the `logstash.runner`
definition, we can use YAML tooling to name the `logstash.runner.configuration`
node and then merge its contents into `logstash.agent.configuration`. This
effectively allows us to keep a single definition of those translations while
making them available at both addresses.

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-03-04 08:39:03 -08:00
Ry Biesemeyer
022072c437
geoip-db: support http_proxy environment variable (#13410) 2022-03-04 08:32:17 -08:00
Karol Bucek
11f64f92fb
CI: update 8.x resolution after 8.0.1 release (#13831) 2022-03-02 12:35:29 +01:00
Karol Bucek
c3d2f5750f
Build: avoid doing a redundant bundle install (#13820) 2022-03-01 15:52:26 +01:00
Andrea Selva
75f72ee789
Remove CI definition file. (#13822)
The file contained the JDK axis definition but since the axis switched from dynamic to static's CI definition it's useless.
2022-03-01 15:06:06 +01:00
kaisecheng
21de1c1da9
expose shutdown request state of pipeline (#13811)
This commit exposes the pipeline shutdown request state to output plugin

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-02-28 23:37:27 +00:00
kaisecheng
47efdebf3b
update ci release file 7.17.1 (#13818) 2022-02-28 17:19:33 +00:00
Ry Biesemeyer
44fce40916
action: add docs preview link when docs change. (#13752)
* action: add docs preview link when docs change.

When a pull-request is opened, or when the HEAD of an existing pull-request is changed, and the changeset modifies the docs, add a comment to the PR with a link to our docs preview.

* Apply suggestions from code review

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-02-24 13:18:26 -08:00
Karol Bucek
5f43d16dfb
Refactor: drop useless rubygems patch (#13790)
there's no longer an api_endpoint method in Rubygems at least since 3.1 
(JRuby 9.2 includes RGs 3.1.6)
2022-02-23 13:47:04 +01:00
Karol Bucek
67fd99b5b6
Feat: conservative plugin (dependency) updates by default (#13794) 2022-02-21 13:01:42 +01:00
João Duarte
5cee5ab451
Fix backport pr workflow conditional trigger 2022-02-17 22:42:20 +00:00
Karen Metts
c07568d81c
Doc: Set up redirects for deleted pages (#13772) 2022-02-17 13:43:18 -05:00
João Duarte
ac455ca131
Set git identity in PR backport action 2022-02-17 17:01:07 +00:00
João Duarte
db93181379
Ensure pr backport actions fetches all git history 2022-02-17 16:43:21 +00:00
João Duarte
75a343e7d1
Fix backport PR action trigger condition 2022-02-17 16:27:49 +00:00
João Duarte
b92ab7bf6a
Add workflow to create backport PRs based off of PR comments 2022-02-17 15:27:09 +00:00
João Duarte
eec3f22bb2
bump jdk to 11.0.14.1+1 (#13687) 2022-02-17 13:42:06 +00:00
Karol Bucek
4f32c4fd48
Refactor: revisit logstash bootstraping bits (#13791)
* Refactor: logstash boot to know what to do
* Refactor: reduce LOAD_PATH - load jars directly
* Refactor: unused requires in runner
* Refactor: boot - require libs when to be used
2022-02-17 13:59:38 +01:00
Rob Bavey
f1b17be5d1
Add reference to java 17 to README.md (#13765) 2022-02-16 13:40:14 -05:00
Karol Bucek
fbeb63179e
Chore: fetch merge commit automatically with backport dev tool (#13485) 2022-02-16 16:32:48 +01:00
Karol Bucek
07068ae048
Deps: pin sinatra due (2.2.0) incompatibilities (#13784) 2022-02-16 15:42:01 +01:00
Karen Metts
90a85e1cd4
Doc:Update qa readme with BUILD_JAVA_HOME setting info (#11985)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-02-15 18:44:58 -05:00
kaisecheng
b4e213b318
fix pqrepair log4j setting (#13726)
added logger for pqrepair to print log in console
Fixed: #13725
2022-02-14 11:16:32 +00:00
Rob Bavey
aceb682f18
Unpin bundler, fix gem installer tests (#13762)
Fix gem installer tests to enable unpinning the version of bundler

This commit removes changes the gem installer to use real gems, rather than
use `allow_instance_of` during testing, which appears to be problematic with the
latest version of bundler
2022-02-11 09:13:11 -05:00
kaisecheng
e38b25ced3
handle fully acked 0 byte PQ pages (#13692)
This commit deleted the corrupted zero byte PQ file and recreated the head checkpoint file to get rid of page file size is too small exception

Fixed: #10855
2022-02-10 17:00:50 +00:00
Andrea Selva
21adc90dd5
Update ci/logstash_releases.json after 8.0.0 release (#13758) 2022-02-10 17:29:26 +01:00
Karen Metts
6313da2900
Doc Forwardport 8.0 release notes to main (#13750)
Co-authored-by: Logstash Machine <43502315+logstashmachine@users.noreply.github.com>
2022-02-10 08:46:26 +01:00
Rob Bavey
a15c9771c7
Pin bundler to 2.3.6 to fix builder (#13753)
Build has been failing since the release of 2.3.7, this commit pins
bundler to 2.3.6 to get the build green again while the cause can be
investigated
2022-02-09 20:07:53 -08:00
Ry Biesemeyer
e9e7838d88
Docs remove homebrew (#13747)
* docs: avoid promoting homebrew installation

As of Stack 8.0, Elastic is no longer maintaining a separate homebrew cask
with Elastic-licensed artifacts for the MacOS package manager homebrew, due to
low usage, difficulty in maintaining multiple versions, lack of team expertise,
and an existing Apache-licensed formula.

As such, we are removing instructions about setting up and running Logstash
from these formulae that are no longer available.

* docs: fix typo in installation instructions
2022-02-09 11:40:55 -08:00
Karen Metts
04d99b938f
Doc: Update upgrade info for 8.0 in main (#13705) 2022-02-09 11:46:22 -05:00
Rob Bavey
330b28eb92
[Test] Fix acceptance tests to deal with Java 8 removal (#13728)
The acceptance tests are used to test a variety of scenarios installing, running and updating
logstash on a variety of Linux distributions.

The vagrant distributions we test on are old, and use java8 by default. This commit removes
the java8 tests and changes the tests to only test the jdk included distribution.
2022-02-09 09:56:42 -05:00
Andrea Selva
30b9ad8848
Update the Upgrading Using a Direct Download guide section. (#13684)
During the time Logstash switched from a set of Ruby files plus one fat jar to multiple jars, with configuration files
and shell scripts that also needs to be updated. It's not anymore sufficient to suggest to unpack a new distribution
over an existing one. This is problematic when we add jars from version to version because drive to the pollution
of the classpath.

This commit redefines to steps to do this, in a safer way, backing up data and config folders.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com
2022-02-09 15:48:19 +01:00
Karen Metts
999b6750d5
Doc: Remove links to beats 7.x content (#13736) 2022-02-08 19:05:28 -05:00
Karen Metts
81dcdc6def
Doc: Replace short link with full link (#13735)
Replaces anchor-only link with full link to work across guides.
Adds note to future authors to call out this requirement.
2022-02-08 18:31:38 -05:00
Andrea Selva
d8f4784d69
Publish CPU percentage also non Unix systems (#13727)
Use same technique for Unix system to extract the CPU percentage and publish to Logstash's metrics collector.
It doesn't retrieve the full set of metric of a Unix system, but the ones that are available from internal JDK class com.sun.management.OperatingSystemMXBean
2022-02-08 17:03:57 +01:00
kaisecheng
7748182a9c
pqcheck pqrepair handle .tmp checkpoint (#13721)
* pqcheck skip checking checkpoint.*.tmp
* pqrepair delete checkpoint.*.tmp

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-02-07 17:37:35 +00:00
João Duarte
60af28a0fe
update google java format dependency (#13700) 2022-02-07 13:57:52 +00:00
Andrea Selva
11e5094016
Update logstash-releases.json after 8.0.0-rc2 (#13722) 2022-02-04 11:12:46 +01:00
Karen Metts
3edef1e487
Doc: Expand breaking changes (#13693)
* Doc: Expand breaking changes

* Add restructured files

* Apply suggestions from code review

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Update docs/static/breaking-changes-80.asciidoc

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Clarify progression of field ref parser behavior

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-02-03 17:25:53 -08:00
Andres Rodriguez
df0aee71eb
bump version to 8.2.0 (#13720) 2022-02-03 17:01:11 -05:00
Andres Rodriguez
7e582e3dbc
Update add_to_projects_beta.yml 2022-02-03 12:23:52 -05:00
Andres Rodriguez
6ab6c18ae4
Update add_to_projects_beta.yml 2022-02-03 12:23:05 -05:00
Andres Rodriguez
33419c672a
Update add_to_projects_beta.yml 2022-02-03 12:15:45 -05:00
Andres Rodriguez
775c353ec3
Update add_to_projects_beta.yml 2022-02-03 12:12:09 -05:00
Andres Rodriguez
259bf4837b
Update add_to_projects_beta.yml 2022-02-03 12:03:36 -05:00
Andres Rodriguez
dfa3a3c7e2
Update add_to_projects_beta.yml 2022-02-03 12:01:06 -05:00
Andres Rodriguez
ed28915296
Update add_to_projects_beta.yml 2022-02-03 11:58:51 -05:00
Andres Rodriguez
22f6e0e286
Update add_to_projects_beta.yml 2022-02-03 11:26:26 -05:00
Andres Rodriguez
714db7641f
Update add_to_projects_beta.yml 2022-02-03 11:22:27 -05:00
Andres Rodriguez
a501da6cff
Update add_to_projects_beta.yml 2022-02-03 11:17:49 -05:00
Andres Rodriguez
08b9525e2d
Update add_to_projects_beta.yml 2022-02-03 11:11:56 -05:00
Andres Rodriguez
05b8ec8cd8
Create add_to_projects_beta.yml 2022-02-03 11:11:27 -05:00
Karol Bucek
3637a30e8f
Refactor: drop redundant (jruby-complete.jar) dependency (#13159)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-02-02 06:55:26 +01:00
Andrea Selva
2ae5a665b6
Update CI versions after release 7.17.0 (#13697) 2022-02-01 16:55:24 +01:00
Karen Metts
82f7bd9e6f
Doc: Fix formatting for bulleted list (#13694) 2022-01-31 20:18:44 -05:00
Karen Metts
ef024d8801
Doc: Add topic and content for es security on by default (#13597)
Co-authored-by: Alexander Marquardt <alexander.marquardt@elastic.co>
2022-01-31 15:02:44 -05:00
kaisecheng
1feeb7ec66
Revert "[DOC] Clarify the scope of environment variable expansion (#13299)" (#13679)
This reverts commit 096eb7ac48.
2022-01-26 13:00:57 +00:00
kaisecheng
057c24ab30
Support env variable in condition (#13608)
This PR substitutes ${VAR} in Expression, except RegexValueExpression, with the value in secret store, env.
The substitution happens after syntax parsing and before graph execution.

Fixed: #5115
2022-01-25 22:46:13 +00:00
kaisecheng
6a28ac10ee
add compatibility for plugins not in support matrix (#12534)
Fixed: #11236
2022-01-25 08:28:42 -08:00
Andrea Selva
7bb56e46dd
Test fix, switch to plugin with less dependencies (#13672)
Fixes an integration test that verifies the capabilities of CLI tool to install a not bundled plugin.
Move away from logstash-input-google_cloud_storage which depends indirectly to OS's package named shared-mime-info, which is not always available.
2022-01-25 14:38:15 +01:00
Mat Schaffer
3dbeea4034
Remove java 8 from setup readme (#13667)
Attempting to `rake bootstrap` on java 8 just throws "The minimum required Java version is 11" for me.
2022-01-25 08:56:52 +09:00
Rob Bavey
c5a1cc784e
Regenerate NOTICE file, add new license for elastic enterprise search (#13670) 2022-01-24 14:26:37 -05:00
Andrea Selva
3fdc4c3aa7
Fix unit test under Windows (#13656)
Use the System.lineSeparator instead of "\n" to make the test portable across platforms
2022-01-20 11:14:18 -08:00
Ry Biesemeyer
2a5e54cd21
logging: move init into environment's settings post-processor (#13221)
* logging: move init into environment's settings post-processor

Ensures that the non-runner command line utilities like `bin/logstash-keystore`
correctly initialize the logger as-configured.

* fixup: ensure we get ruby stdlib URI & File
2022-01-20 10:45:33 -08:00
Ry Biesemeyer
4b430a5f69
stats api: startup resilience when stats are partially formed (#13645) 2022-01-20 08:44:46 -08:00
Rob Bavey
0927da6422
Remove separate JavaVersionChecker executable (#13648)
* Remove separate JavaVersionChecker executable

The JavaVersionChecker is unnecessary as we already run the JvmOptionsParser before logstash,
providing a convenient location to test the Jvm version before running logstash

* Remove JavaVersionChecker class
* Check exit code from java options parser
2022-01-20 11:22:37 -05:00
Rob Bavey
57c16e1300
Add integration test for Elasticsearch using defaults (#13353)
* Add integration test for Elasticsearch using defaults

Currently, the elasticsearch integration test turns off `data_streams`
and `ecs_compatibility`, hiding the out of the box experience for
ingesting into elasticsearch

* Removed debugging statement
2022-01-20 11:19:08 -05:00
Ry Biesemeyer
ca501acdcf
field-reference: cap RUBY_CACHE to 10k entries (#13642)
* field-reference: cap RUBY_CACHE to 10k entries

Reduces the scope of a memory leak that can be caused by using UUIDs or other
high-cardinality field names by preventing the ruby string _keys_ from being
held by the cache indefinitely.

Note: this may not solve the problem entirely, but certainly limits its impact.
      Because ConvertedMap requires individual field names to be interned into
      the global String intern pool, their eligibility for GC is JVM-specific
      and high-cardinality field names should still be avoided.

* noop: field-reference test refactor to consolodate reflection
2022-01-20 07:46:37 -08:00
Luca Belluccini
e16a9d144c
[DOC] Clarify scope of queue settings (#12955)
Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-01-20 10:09:28 -05:00
Karol Bucek
e1da2d651d
Build: update .lock.release with rake version:set (#13477) 2022-01-20 06:49:06 +01:00
Karen Metts
ec51536f5e
Doc: Remove hard-coded edit_url links where possible (#13636) 2022-01-19 19:01:25 -05:00
Andrea Selva
640ba8489f
Fix/gems not found in integration test after plugin install (#13641)
Cleanly teardown an integration test that made fall other integration tests.
In some cases the CI integration tests fails because the launched Logstash can't find a gem named `mimemagic`. This gem is installed during a CLI plugin test (install of  `logstash-input-google_cloud_storage` plugins kicks in that `mimemagic`).
2022-01-19 18:45:17 +01:00
Rob Bavey
4f96a94713
Replace generated cleaner code with concrete implementation (#13430)
* Replace generated cleaner code with concrete implementation

No need to to perform codegen to create JDK specific compatible classes to
call the ByteBuffer cleaner, as we are dropping support for Java 8.

* Remove dead/redundant java 8 code from LogstashJavaCompat

Removes setupByteBuffer, specific test for Java9 and above and updates memory monitor
unit test to only test for values relevant to Java>1.8

* Renamed version utility class to reflect use after removal of methods

Also fixed some dead imports
2022-01-19 09:43:49 -05:00
Andrea Selva
93f37b9609
Fix Ruby port check execution in kafka_setup.sh (#13631)
When the Bash script executes the vendored Ruby it has to use proper `GEM_HOME` to avoid the overwrite that happens inside the logstash.lib.sh
3064f7d0c3/bin/logstash.lib.sh (L161-L165)
2022-01-19 14:06:39 +01:00
Toby Sutor
e11d0364d4
[Docs] Add pipeline.ecs_compatibility to the list (#13612)
* Add pipeline.ecs_compatibility to the list

* Update docs/static/running-logstash-command-line.asciidoc

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-01-18 16:37:03 -08:00
Ry Biesemeyer
2a248b2ea0
fix: respect LS_JAVA_OPTS environment even when optionsfile missing (#13525)
* fix: respect LS_JAVA_OPTS environment even when optionsfile missing

* Fixed integration tests

* Added unit test to cover the fix

* Wipe commented code

* Removed redundant log in a path that could never be reached

* Moved jvm.options checks into only one place

* javaopts: provide injection point for environment string

Co-authored-by: andsel <selva.andre@gmail.com>
2022-01-18 08:02:08 -08:00
Andrea Selva
d4bdcc936d
Add info log of JVM flags used to configure Logstash (#13531)
Logs the JVM flags and options used to launch Logstash.
2022-01-18 14:07:37 +01:00
João Duarte
49303c3fc1
don't retrieve the secret before purging (#13614)
we've seen in the wild a situation where a keystore had a single invalid secret that couldn't be removed since that action did a retrieve before purging. The retrieve would fail causing the purge to never happen.
This commit skips the retrieval but checks if the secret exists to preserve the scenario of reporting an error when removing a secret that doesn't exist.
2022-01-18 11:06:16 +00:00
Rob Bavey
3064f7d0c3
Fix 2 failing tests on Windows (#13604)
This commit fixes 2 tests
- Set queue.drain to true in pipeline pq test
  - Under certain conditions the pipeline_pq_file_spec test would fail as the pipeline would exit once the generator had generated all of its events, but before the events were processed, leading to the test hanging. This commit adds `queue.drain:true` to the settings to ensure that all of the events are processed before the pipeline is shut down
- Increase the flush delay in dead letter quest testFlushAfterDelay test
  - Under certain conditions, the flush delay of 1 second was insufficient, and invalidated a pre-condition assertion that no events had been flushed before the expiry of that delay.
2022-01-14 16:55:22 -05:00
Andrea Selva
b6da829f4f
Avoid to increment event.out conter for dropped events (#13593)
Fixes the issue #8752 in event.out counter. When a pipeline contains a drop filter the total out events counter should count only the events that reached the out stage.

This PR changes CompiledExecution.compute() interface to return the number of events that effectively reached the end of the pipeline. This change is used in WorkerLoop to update correctly the event.out metric, instead of relying on the batch's size.
2022-01-14 15:52:06 +01:00
Ry Biesemeyer
2892964ba1
Product origin headers to Logstash-controlled Elasticsearch clients (#13563)
* add product origin header to license checks

* add origin header to Central Management config fetcher

* add origin header to ES output for Monitoring pipeline
2022-01-14 06:31:42 -08:00
Rob Bavey
8fc4ea5585
Bump releases json after 6.8.23, 7.16.3 and 8.0.0-rc1 (#13618) 2022-01-13 17:20:22 -05:00
Andrea Selva
e27fdeb252
Avoid to itereate with each_index (#13603)
Sometime the deep_replace could be invoked by plugins, using the LogStash::Config::Mixin#validate.
This method receives a Ruby hash which could contains Java ArrayList instead of Ruby Array.
The iteration method `each_index` is not available for ArrayList, so resort to some form of "plain old way".
The reason why an ArrayList is recognized as a Ruby Array is due to the override classes, like RubyJavaIntegration.JavaCollectionOverride that monkey patches Ruby Array, so that a Java Collection could be seen as a RubyArray but it doesn't implement all the abstractions, like `each_index`.

Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-01-12 17:09:50 +01:00
Karol Bucek
94d04f8044
CI: update releases and test against 7.17 SNAPSHOT (#13607) 2022-01-12 12:00:38 +01:00
Rob Bavey
45f2de36c5
Forward port of #13598. Release notes for 8.0.0-rc1 (#13605)
Forward port of #13598 to main branch. Original message:

* Update release notes for 8.0.0

* Updated release notes for 8.0.0-rc1

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Logstash Machine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-01-11 17:52:10 -05:00
kaisecheng
7d5c5f09d3
Fix unknown type warning of geoip metrics (#13382)
This commit changes the value of the geoip metric from Symbol to String to remove warning and refactors metrics part

Fixed: #13197
2022-01-11 11:16:43 +00:00
Andrea Selva
bc760c5c07
Adds license definitions for faraday-multipart and faraday-retry (#13592) 2022-01-10 10:42:20 +01:00
Ry Biesemeyer
ef40bb0643
docs: sprintf vs UTC nature of @timestamp field (#13576)
Add notes to the Event sprintf docs about timestamp formatting to call out the
UTC nature of the Timestamp object.

Resolves: elastic/logstash#13112
Closes: elastic/logstash#13571
2022-01-06 14:56:26 -08:00
kaisecheng
b0c08b809a
Fix logstash-plugin install command to install non default plugin (#13405)
After the fix of unlocking ecs_compatibility_support version in plugin update (#13218), `logstash-plugin install` has a problem of installing non default plugin.
This commit removes `Bundler.setup` in install path to avoid Gemfile froze by bundler
Fixed: #13404

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-01-06 09:41:14 +00:00
Karen Metts
eeb4025b21
Doc: Restructure source files for security docs (#13570) 2022-01-04 15:23:09 -05:00
Rob Bavey
55d6f21f31
Add JavaVersionChecker to check Java version for compatibility before running (#13533)
Provides a "friendly" error message when running Logstash with an incompatible
version of Java

Readded from #13356, incorporated with use of Comparable from #13358
2022-01-04 09:57:39 -05:00
Andrea Selva
d882a71de0
Remove CI related files not used (#12538) 2022-01-04 11:56:36 +01:00
Ry Biesemeyer
105a9fcdac
Bump log4j dependency to 2.17.1 (#13564) 2021-12-29 11:52:27 +00:00
João Duarte
2cf6675f53
Bump log4j dependency to 2.17.0 2021-12-18 12:32:16 -05:00
Karen Metts
99f8b37c7a
Doc: Add anchor to bundled jdk info (#13535) 2021-12-17 18:17:02 -05:00
Toby McLaughlin
9b32b441f1
Doc: remove PQ on input for Output Isolator (#13537)
The Output Isolator Pattern doesn't need a persisted queue on the input
pipeline to work. It just needs one on every output pipeline.
2021-12-17 17:49:52 -05:00
Karol Bucek
0c2645c9c6
CI: update releases after 7.16.0 & 7.16.1 (#13482) 2021-12-15 13:24:39 +01:00
thex12
bf0b122b37
Bump log4j version to 2.16.0 per CVE-2021-45046 (#13518)
To err on the side of caution it'd be preferable to use log4j 2.16.0 due to CVE-2021-45046
2021-12-14 19:38:33 -08:00
João Duarte
c12d2f5419
bump log4j version to 2.15.0 (#13494) 2021-12-10 11:14:33 -05:00
João Duarte
60ffc10ba7
bump gradle to 7.3.1 (#13489) 2021-12-09 17:28:15 +00:00
Rob Bavey
11cf6a1974
Update logstash docker to use ubuntu 20.04 base image (#13442)
* Update logstash docker to use ubuntu 20.04 base image
* Correctly set locale for ubuntu docker image
* tiny typo fix: ubunto -> ubuntu

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-12-09 09:38:56 -05:00
Karol Bucek
32b8739f6f
Fix: delegating from deprecated setting (#13481) 2021-12-08 13:21:24 +01:00
Rob Bavey
0cba1e5671
Use $BUILD_JAVA_HOME to control JVMs used with acceptance tests (#13471)
* Use $BUILD_JAVA_HOME to control JVM builds on acceptance tests and docker acceptance tests
2021-12-06 11:24:43 -05:00
João Duarte
8d3127e8f5
bump jruby to 9.2.20.1 (#13468) 2021-12-02 11:20:33 +00:00
Karen Metts
fbee01c5b0
Doc: Fix link in attribute (#13462) 2021-11-30 17:46:41 -05:00
Karen Metts
180767c0ac
Add template for creating documentation issues (#13456) 2021-11-30 11:52:25 -05:00
Ry Biesemeyer
5992e5713f
artifacts: exclude unused rubyzip test files from distributions (#13431) 2021-11-29 08:41:32 -08:00
Karol Bucek
32690cb96f
Fix: patch Puma around a JRuby ARM64 bug (#13447)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-11-25 16:59:13 +01:00
Rob Bavey
2788e87a8c
Docker integration tests stability improvements (#13014)
* Docker integration tests stability improvements

This commit contains numerous fixes to improve the stability of the docker integration tests

* Patch Excon::UnixSocket

Socket.new running on arm64 on Ubuntu 18.04, causes an immediate SIGSEGV error and crash on
that OS, and, as far as I can tell, only that OS. `TCPSocket.new`,`UDPSocket.new` and
`UNIXSocket.new` do not. This commit patches the UnixSocket of the Excon library to
do the absolute simplest thing possible to avoid this error.

* Ensure that container is deleted even if #kill fails

* Add extra waits to handle the incremental way the payload returned by the monitoring
API increases as logstash starts up and pipelines load.

* Use pyenv to ensure the same version of python is used across different jenkins workers

* Add container logs to help diagnose failed test.

* Update the pipeline definition on multi-pipeline integration test

This was causing a pipeline to halt after startup causing intermittent test failures.

* Remove `;` to ensure failures are propagated appropriately

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-11-23 23:17:42 -05:00
Rob Bavey
3aa5741e68
Update logstash-releases.json (#13418)
This update incorporates:
  * Latest logstash release on `7.15` branch
  * Release of 8.0.0-beta1
  * Update of 8.x snapshot to 8.1.0-SNAPSHOT

This follows the precedence of #10627 to update snapshot release of 8.x to 8.1 following pre-GA releases
of major branch.
2021-11-23 09:00:32 -05:00
João Duarte
a921f96be4
Update bundled JDK to 11.0.13+8 (#13437) 2021-11-23 13:29:15 +00:00
Karen Metts
d2ca040e27
Doc: Update attribute for ECS messaging wrt default (LSR) (#13427)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-11-19 17:20:15 -05:00
Karen Metts
63ed2da5ec
Doc: Expand PQ content for pipeline-pipeline (#13319) 2021-11-18 20:07:24 -05:00
Ry Biesemeyer
c3e498a24b
ECS on by default for Logstash 8, again (#13391)
* ecs: report pipeline's ECS-compatibility with INFO at startup

Because the pipeline-level setting `pipeline.ecs_compatibility` affects the
default behaviour of nearly every plugin in the pipeline, an INFO-level log
message will provide useful hints, especially to our users who upgrade to
Logstash 8 without first reading the breaking changes docs.

For example, when we have two pipelines `old` and `new` whose `pipeline.ecs_compatibility` is `disabled` and `v8` respectively, we would get the following log messages:

> ~~~
> [2021-11-04T18:43:21,810][INFO ][logstash.javapipeline    ] Pipeline `old` is configured with `pipeline.ecs_compatibility: disabled` setting. All plugins in this pipeline will default to `ecs_compatibility => disabled` unless explicitly configured otherwise.
> [2021-11-04T18:43:21,817][INFO ][logstash.javapipeline    ] Pipeline `new` is configured with `pipeline.ecs_compatibility: v8` setting. All plugins in this pipeline will default to `ecs_compatibility => v8` unless explicitly configured otherwise.
> ~~~

* ecs: make v8 the default for 8.0

* ecs: `pipeline.ecs_compatibility` defaults to `v8`

Related: elastic/logstash#11623

* doc: temporarily remove deep link from breaking changes doc to fix build
2021-11-17 13:17:23 -08:00
Karen Metts
65e163fc5b
Doc: Add breaking changes (#13376)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-11-16 18:31:49 -05:00
Karol Bucek
c11514d044
Refactor: avoid futile attempt to remove String from memory (#13403)
which causes a redundant Full GC while Logstash is starting
2021-11-15 18:28:32 +01:00
Karol Bucek
64800cd3a9
Feat: use Java thread name in thread info (#13156) 2021-11-15 18:28:00 +01:00
Andrea Selva
88c80ebb19
Fixes a usage of deprecated 'http.enabled' to the new 'api.enabled' (#13380)
With #13308 configuration namespace that started with `http.` was renamed to `api.`, this commit fix a usage left behind.
Use the new `api.enabled` setting in one place instead of the deprecated `http.enable`.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-11-15 09:49:15 +01:00
João Duarte
09fbf5acb8
Relax fpm version constraint after bug fix fpm#1856 (#13402) 2021-11-11 12:01:27 +00:00
Karol Bucek
eb92c1d04e
Build: lock fpm to 1.13.x to avoid dep packaging issues using 1.14.0 (#13400) 2021-11-10 15:40:01 +01:00
João Duarte
47666a7b73
[DOC] replace references to master branch with main (#13302) 2021-11-08 10:24:18 +00:00
João Duarte
4919286e42
rename references of master branch to main branch (#13301) 2021-11-08 10:23:46 +00:00
Karol Bucek
55e7a26416
Deps: update JRuby to 9.2.20.0 (#13387) 2021-11-03 17:27:10 +01:00
Rob Bavey
35522acbc6
Add java version parameterization to Logstash builds (#13369)
Add ability to pull the version used to build java from the logstash repo, rather
than rely on system Java. Previously, builds would use JAVA_HOME, now this setting
is ignored in Logstash (and by extension, parts of the Logstash build), which was causing
variations in the version of Java used to build Logstash, including the use of Java 8,
which the Logstash team would like to remove support for.

Relates: https://github.com/elastic/infra/pull/32818
2021-11-03 10:31:29 -04:00
Karen Metts
853323290f
Doc: Update central management license info (#13368) 2021-11-01 12:17:56 -04:00
João Duarte
f8e796c0b5
bump version to 8.1.0 (#13366) 2021-10-27 10:27:51 +01:00
Rob Bavey
462191ebbf
Forwardport #13358 to master: Add deprecation warnings for JAVA_HOME/… (#13365)
* Forwardport #13358 to master: Add warnings for JAVA_HOME/older versions of Java

Forwardport PR #13358 to master branch. Original message:

* Add deprecation warnings for JAVA_HOME/older versions of Java

Logstash 8.0 will remove support for java versions before java 11, this commit
adds entries to the deprecation log warning against this.
Also adds use of `JAVA_HOME` to the deprecation log.

* Change deprecation log entries to warnings to indicate imminent issue
2021-10-26 21:48:13 -04:00
Rob Bavey
e619b7ade1
Revert "Add JavaVersionChecker to check Java version for compatibility before… (#13356)" (#13364)
This reverts commit 620a654779.
2021-10-26 19:55:05 -04:00
Rob Bavey
620a654779
Add JavaVersionChecker to check Java version for compatibility before… (#13356)
* Add JavaVersionChecker to check Java version for compatibility before running

Provides a "friendly" error message when running Logstash with an incompatible
version of Java

* Add version check to Windows
* Improvements

Improve readability of `JavaVersion`
Fix logstash bash script to exit on JavaVersionChecker error
2021-10-26 18:50:42 -04:00
Rob Bavey
a6e3914d6b
Fix bundler handling of 'without' (#13351)
* Fix bundler handling of 'without'

Prior to this change, the values set in `set_local` are ignored when invoking
bundler via the command line, as is used with `invoke!`. This commit sets those
values in `ENV` variables instead, fixing the functionality to not install
development gems.
* Update bundler spec to check ENV variable
* Added test to ensure kramdown gem not vendored
* Re-add set_local setting to play nice with `expand_logstash_mixin_dependencies`
* logstash service needs to be installed
* gem_vendored? needs to use full path to vendor files
* use `stdout` from `cat` command to generate spec temporary file
* Removed unnecessary support for supplying a block from #gem_vendored?

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2021-10-26 17:48:03 -04:00
Rob Bavey
15be7a98c0
Update documentation around JVM usage to reflect changes (#13350)
* Update documentation around JVM usage to reflect changes

For Logstash `8.0`, java 8 will no longer be supported, and the documentation should
reflect that.

Update troubleshooting documentation - changes made in #13349 should remove the warnings
at startup for fresh installs of Logstash, but upgrading may still have the same issues.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-10-26 14:56:19 -04:00
João Duarte
dd2245c447
only use --add-opens flags on java 11+ (#13360) 2021-10-26 15:50:40 +01:00
Rob Bavey
057b022063
Remove jdk8 from ci matrix (#13344)
Also remove unused platform specific ci config files
2021-10-26 09:39:22 -04:00
Karol Bucek
e92bae0e30
Deps: upgrade jruby-openssl to 0.11.0 (#13355)
to properly support alt-chain certificate verification in plugins (S3, RSS)
2021-10-26 12:57:13 +02:00
Rob Bavey
4188bacb69
Update jvm.options to remove JDK 8 only settings (#13349)
This includes removing invalid GC logging options, instead using the same parameters
as Elasticsearch.
This also sets the `add-opens` to remove warnings for Java 11 and 17
2021-10-25 13:20:27 -04:00
Ry Biesemeyer
15930ccd3e
Secure API (#13308)
* settings: add "deprecated alias" support

A deprecated alias provides a path for renaming a setting.

 - When a deprecated alias is set on its own, a deprecation notice is emitted
   but fetching the canonical setting value will reflect the value set with the
   deprecated alias.
 - When both the canonical setting (new name) and the deprecated alias (old
   name) are specified, it is an error condition.
 - When the value of the deprecated alias is queried, a warning is emitted to
   the logger and only the value explicitly set to the deprecated alias is
   returned.

Additionally, some relevant cleanup is also included:

 - Starting Logstash with invalid settings no longer results in the obtuse "An
   unexpected error occurred" with backtrace and exception data obscuring the
   issue. Instead, a simple message is emitted indicating that the settings are
   invalid along with the originating exception's message.
 - The various settings implementations share a common logger, instead of each
   implementation class providing its own. This is aimed to reduce noise from
   the logs and to ensure specs validating logging do not need to tie so
   closely to implementation details.

* settings: add password-wrapped setting

* settings: make any setting type capable of being nullable

* settings: add `Settings#names` to power programatic iteration

* cli: route CLI-flag deprecations in to deprecation logger

* settings: group API-related settings under `api.*`

retains deprecated aliases, and is fully backward-compatible.

* webserver: cleanup orphaned attr accessors for never-set ivars

* api: pull settings extraction down from agent

This net-no-change refactor introduces a new method `WebServer#from_settings`
that bridges the gap between Logstash settings and Puma-related options, so
that future additions to the API settings don't add complexity to the Agent.

It also has the benefit of initializing the API Rack App and just ONCE, instead
of once per attempted HTTP port.

* api: add optional TLS/SSL

* docs: reference API security settings

* api: when configured securely, bind to all available interfaces by default

* cleanup: remove unused cert artifacts

* tests: generate fresh webserver certificates

* certs: actually add the binary keystores 🤦
2021-10-19 14:13:20 -07:00
Rob Bavey
9354d41369
Temporarily pin racc to 1.5.2 to fix build (#13339)
Pin `racc` to `1.5.2` as racc-1.6.0 doesn't have JAVA counterpart (yet)
SEE: https://github.com/ruby/racc/issues/172
2021-10-19 11:14:09 -04:00
Karol Bucek
258b8b555c
Chore: update tested (ci) releases for 7.x / 6.x (#13335) 2021-10-19 09:36:19 +02:00
Andrea Selva
7395641a43
Fixes to build and run Logstah on JDK 17 (#13306)
This commit applies all the changes needed to run Logstash on JDK 17:
- opens access to module java.base for packages sun.nio.ch and java.io to run the application and to execute the tests
- removes SecurityManager classes used during Logstash startup
- fix exception type catched in JavaKeyStore tampering test

Related to meta issue #13306
2021-10-18 11:13:26 +02:00
Karen Metts
e5c8e6e3e6
Doc: Add link to pq info from troubleshooting topic (#13320)
Fixes: #13158
Related: #13173
2021-10-15 14:44:35 -04:00
Karen Metts
fc35cba884
Doc: Fix templating error in integration plugin header (#13324) 2021-10-15 13:32:01 -04:00
Rob Bavey
7178890f41
Fix Elasticsearch integration test to use specified JDK (#13316)
Sets `LS_JAVA_HOME` of the spawned logstash to use the same `java.home`
that the test is running under, rather than default to the system JDK, which
would result in the spawned logstash running under a different JDK to that
intended in the test
2021-10-15 08:48:00 -04:00
Karen Metts
904d257cf8
Doc: Expand content for memqueue (#13317)
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2021-10-14 19:30:48 -04:00
João Duarte
096eb7ac48
[DOC] Clarify the scope of environment variable expansion (#13299)
Environment variable expansion only works in plugin parameters, not in conditionals.
For more on this limitation see https://github.com/elastic/logstash/issues/5115
2021-10-13 11:17:49 +01:00
João Duarte
f70350ba12
don't require mutate filter on remove_spec (#13292) 2021-10-13 11:08:20 +01:00
Andrea Selva
949b4a0cef
Update JDK matrix to include JDK17: OpenJDK, AdoptiumJDK and Zulu (#13307) 2021-10-12 15:58:46 +02:00
Ry Biesemeyer
82081d80d7
Add support for Nanosecond-precision timetamps (#12797)
* add nanoseconds support

Migrates internals of `org.logstash.Timestamp` from legacy `org.joda.time.*`
which is limited to millisecond-precision to modern `java.time.Instant`,
allowing us to retain nanosecond granularity of `@timestamp` values.

Timestamps that are generated by Logstash (such as when creating an event that
does _not_ have a `@timestamp` field) will be generated at the highest precision
available to the JVM and/or platform (in many cases, this is microseconds).

Timestamps that are _parsed_ from user input will capture the entire provided
precision, up to and including nanosecond granularity.

Throughout the flow in the pipeline, including serialization to PQ, DLQ, and
JSON, will retain all available precision.

BREAKING: This produces an effectively-breaking change to the serialization
          format of both the persistent queue (PQ) and dead-letter queue (DLQ),
          as the serialized format this changeset contains a higher granularity
          of timestamp than previous releases of Logstash were capable of
          parsing without error.
          As such, it _MUST NOT_ be back-ported to the 7.x series.
2021-10-11 09:22:33 -07:00
Andres Rodriguez
9f45087d80
Add pipeline.ordered setting for docker image (#13300)
Adds the pipeline.ordered setting to env2yml.go for the docker image.

Closes: #13293
2021-10-07 16:42:29 -04:00
Karen Metts
8a01cf6d19
Doc: Fix list formatting (#13294) 2021-10-07 09:36:31 -04:00
kaisecheng
aa6afa5a9b
fix plugin installation script (#13289)
This commit requires `set`, as bundler #expand_logstash_mixin_dependencies call `to_set`
2021-10-07 13:14:32 +02:00
Karen Metts
3314f2fbdf
Doc: Rework PQ content (#13173)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-10-06 18:46:27 -04:00
Karen Metts
1299f336d9
Doc: Remove outdated info and folder (#13259) 2021-10-06 11:56:50 -04:00
kaisecheng
6b9d2169d1
Replace Faraday to Manticore to get rid of jruby-openssl verification error of Let's Encrypt cross-signed DST Root CA X3 (#13273)
Fixed: #13278
2021-10-06 10:09:49 +02:00
Karen Metts
44ea102a7e
Doc: Add topic and expand info for in-memory queue (#13246)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-10-05 18:12:02 -04:00
kaisecheng
50834d0f2c
Fix plugin manager test that fail to fetch dependency (#13270)
remove broken endpoint
Fixed: #13218
2021-10-05 10:34:48 +02:00
kaisecheng
4187d80bf0
unlock ecs_compatibility_support version in plugin update (#13218)
This commit fixes the `logstash-plugin update` command which fail to update plugin
that depends on a new version of logstash-mixin-ecs_compatibility_support.
It resolves logstash-* dependencies and puts them in bundler update command.
Fixed: #13181
2021-10-04 12:12:32 +02:00
Karen Metts
2d8abc4597
Doc: Add shared attribute for messaging ecs default info (#13083)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-10-01 13:15:44 -04:00
kaisecheng
1913de1bf7
update golang image to 1.17.1(#13260)
update golang image to 1.17.1 to get rid of expired DST Root CA X3
disable download manager test cases to silent Faraday::SSLError

Fixed: #13261

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-10-01 18:51:09 +02:00
kaisecheng
0f433a0814
avoid duplication of heading and index entry in release notes (#13192) 2021-09-29 10:42:20 +02:00
kaisecheng
8c83282bae
geoip integrate air-gapped bootstrap script (#13104)
This PR integrates Elasticsearch bootstrap script to help users keep Logstah geoip plugin run without online update check.
Add `xpack.geoip.download.endpoint` option to config geoip database service endpoint.
Users can point to `http://localhost:8080/overview.json` when using the script to bootstrap nginx docker
2021-09-27 18:56:22 +02:00
Rob Bavey
aa1aa8e37c
Fix kafka download link for integration tests (#13248) 2021-09-27 10:40:03 -04:00
kaisecheng
a876f6479e
update ci releases to 7.15.0 (#13245) 2021-09-27 11:26:54 +02:00
Karen Metts
37e1db0c12
Doc: Add note and example for date math in conditionals (#13199)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-09-21 15:09:15 -04:00
Andrea Selva
d535247a62
Update CI to run on AdoptOpenJDK16 (#13202)
Update CI to run on AdoptOpenJDK/Open/Zulu 16, 11 and Java8
2021-09-21 18:07:28 +02:00
Andrea Selva
5e9207f6bb
Update Logstash releases with latest 6.8.19 (#13241) 2021-09-21 16:16:15 +02:00
Andrea Selva
643fee7c8a
Update Logstash releases with latest 7.14.2 (#13240) 2021-09-21 14:52:00 +02:00
Rob Bavey
642875d705
[Docs] Remove outdated roadmap content (#13233) 2021-09-16 13:00:11 -04:00
Logstash Machine
0ce03de17f
Release notes for 8.0.0-alpha2 (#13228)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-09-15 20:52:16 -04:00
kaisecheng
827bbd9270
fix geoip external DB shutdown nil exception (#13224)
Fixed: #13208
2021-09-15 14:42:28 +01:00
Andrea Selva
d51afe54d5
Removed JAVA_HOME using only LS_JAVA_HOME (#13214)
Removes the usage of JAVA_HOME completely which is not anymore used for JDK path resolution.

Updated all the Logstash launching scripts to use only LS_JAVA_HOME as environment variable to
determine the JDK to use to launch Logstash. JAVA_HOME is abandoned for this job.
2021-09-15 09:29:07 +02:00
Andrea Selva
3ffdb99119
Deprecate JAVA_HOME preferring LS_JAVA_HOME (#13207)
Adds print of deprecation notices on stdout when Logstash is starting with JAVA_HOME instead of LS_JAVA_HOME
2021-09-08 11:06:53 +02:00
Andrea Selva
728289e862
Switched to Gradle 7 (#13184)
This commit:
- Updates the Gradle wrapper to version 7.2
- Remove the deprecated jcenter and where it was used to retrieve Gradle's plugins it switches to gradlePluginPortal
- Insert an explicit dependency from test task to the log4j.properties manipulation task ("copyProductionLog4jConfiguration") used in integration
2021-09-08 10:42:13 +02:00
Andrea Selva
6ed2eea890
Added rexml notice to license list (#13209) 2021-09-07 11:07:49 +02:00
Andrea Selva
979ea21c5e
Introduce LS_JAVA_HOME environment variable (#13204)
This commit modifies the launch scripts to take care of the LS_JAVA_HOME giving precedence over the JAVA_HOME, which is still used it the first is not found.
2021-09-06 10:22:51 +02:00
Mat Schaffer
8073b0c35e
Add beta tag to pipeline viewer docs (#13167) 2021-09-06 10:31:31 +09:00
Karol Bucek
fe9f16e948
Deps: drop old and unused gem dependencies (#13157)
* Deps: drop (unused) atomic gem
not used in LS or any of the plugins

* Deps: drop unused (XML) builder gem
2021-09-02 11:13:14 +02:00
Andrea Selva
c0c2473f15
Update logstash_releases.json with 7.14.1 (#13193) 2021-09-02 09:56:52 +02:00
Andrea Selva
9fd3b61188
Introduce explicit dependencies (#13183)
Gradle 7 introduced a check for implicit task dependencies.
This PR moves to a fine grained copyAlias tasks to tighten output dependencies and to make those explicit.
2021-09-02 09:41:37 +02:00
Andrea Selva
d2237578d5
Feature/remove gradle license report plugin (#13182)
Remove usage of plugin Gradle-License-Report to generate CSV report of used dependencies.
This commit replaces the removed plugin with the custom `ListProjectDependencies` task that inspects Gradle's project dependencies and produces a CSV file containing the list.
2021-09-01 15:28:57 +02:00
Andrea Selva
ebb9e04d14
Update bundled JDK to 11.0.12+7 (#13185) 2021-08-31 17:00:06 +02:00
kaisecheng
85abb95d9a
add the missing logstash config supported by env2yaml for docker (#13178)
Fixed: #13138
2021-08-30 17:39:24 +01:00
Karol Bucek
51fad3f56b
Test: improve monitoring api logging asserts (#13164) 2021-08-25 17:16:52 +02:00
Karol Bucek
a4712291d5
Refactor: avoid global mutex on ecs_compatibility (#13036) 2021-08-24 11:24:32 +02:00
Andrea Selva
7d8a716cf0
Update releases list (#13149)
Update releases list, aligning with 7.14.0 and 6.8.18. With ES 7.14.0 and security on by default, this PR alsoswithed off security on ES in integration tests
2021-08-20 08:24:58 +02:00
Rob Bavey
4707cbd94c
Bundler: freeze lockfile on run, and "normalize" platform on plugin changes (#13015)
This PR enables the upgrade of bundler to the latest version.

Prior to this PR, the ability to do so was blocked by bundler.setup in versions of bundler > `2.23` making runtime changes to `Gemfile.lock` (unless the lock file was `frozen`) based on the specific platform the application was being run on, overriding any platforms (including generic `java` platform) set during build time. This was in conflict with changes made in #12782, which prevented the logstash user writing to files in `/usr/share/logstash`.

This PR will freeze the lockfile when logstash is run, and unfreeze it when manipulating plugins (install, update, remove, install from offline pack) to allow new plugins to be added. While unfrozen, changes are also made to ensure that the platform list remains as the generic `java` platform, and not changed to the specific platform for the runtime JVM.

This PR also introduces a new runtime flag, `--enable-local-plugin-development`. This flag is intended for use by Logstash developers only, and enables a mode of operation where a Gemfile can be manipulated, eg

```
gem "logstash-integration-kafka", :path => '/users/developer/code/plugins/logstash-integration-kafka'
```

to facilitate quick and simple plugin testing.

This PR also sets the `silence_root_warning` flag to avoid bundler printing out alarming looking warning messages when `sudo` is used. This warning message was concerning for users - it would be printed out during normal operation of `bin/logstash-plugin install/update/remove` when run under `sudo`, which is the expected mode of operation when logstash is installed to run as a service via rpm/deb packages. 

This PR also updates the vagrant based integration tests to ensure that Logstash still runs after plugin update/install/remove operations, fixes up some regular expressions that would cause test failures, and removes some dead code from tests.

## Release notes

* Updated Bundler to latest version
* Ensured that `Gemfile.lock` are appropriately frozen
* Added new developer-only flag to facilitate local plugin development to allow unfrozen lockfile in a development environment
2021-08-17 09:35:30 -04:00
Karen Metts
771844c070
Doc: Move shared region tags for breaking changes to 8.0.0 content (#13131) 2021-08-16 19:14:22 -04:00
Andrea Selva
a7f6c01a3a
Update Snakeyaml version to 1.29 (#13129)
Snakeyaml is used only in the build chain, and it's not packaged with Logstash
2021-08-16 10:33:47 +02:00
Karen Metts
b7416cad37
Doc: Add breaking changes to breaking changes page (#13130)
Adds breaking changes noted in 8.0.0-alpha1 release notes to breaking changes page
Updates [float] tags to [discrete]
2021-08-13 11:02:18 -04:00
Andrea Selva
542dce81a7
Added faraday-* and ruby2_keywords notices to licences list (#13126) 2021-08-13 13:25:47 +02:00
Logstash Machine
c679de1542
Release notes draft for 8.0.0-alpha1 (#13098)
Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-fedora-32-1626957762752525520.c.elastic-ci-prod.internal>
Co-authored-by: andsel <selva.andre@gmail.com>
Co-authored-by: Karen Metts <karen.metts@elastic.co>
2021-08-03 13:46:32 -04:00
André Letterer
e249b5d6b4
valid variable expansion for the batch files (#12912) 2021-07-31 01:25:12 +02:00
Karen Metts
f0504588df
Doc: Enhance and expand DLQ docs (#12959)
Fixes: #12923
Related: #10493
2021-07-22 16:13:23 -04:00
Andrea Selva
87697fd113
Update releases list with 7.13.4 (#13088) 2021-07-21 09:43:05 +02:00
Karen Metts
426e883f11
Doc:Fix typo and adjust keystore text (#12779) 2021-07-20 18:14:12 -04:00
Ry Biesemeyer
4056cb1b9a
doc: add pipeline.ecs_compatibility docs (#12421) 2021-07-20 14:59:34 -07:00
Ry Biesemeyer
68f3cf3d90
ecs_compatibility: revert breaking change; keep disabled as default for 8.0.0 (#13080)
As we close in on the availability of 8.0.0 alphas, we are reassessing which
breaking changes are _necessary_, and which are merely _desired_. And while
we would love to be in a world where ECS was on by default, and have put
substantial effort into designing an upgrade path that would be as simple as
possible, we have determined that the time may not be right to change the
default value out of under our users.

This change restores the default value for `pipeline.ecs_compatibility` to
`disabled`, ensuring pipelines will continue running in Logstash 8 as they have
in Logstash 7 without modification. We will still encourage our users to be
explicit about which behaviour they desire, and will revisit making ECS on by
default at a later date.
2021-07-20 14:45:36 -07:00
Karen Metts
3f38e2b83a
Doc: Add kafka schema registry setting to troubleshooting (#13073) 2021-07-14 12:40:09 -04:00
Rob Bavey
4545671b4e
[Test] Fix Unix acceptance tests (#13071)
This PR contains commits attempting to fix the broken acceptance tests:

* Fix the set of test platforms used to run unix acceptance tests

Modernizes the list of OS's used in acceptance tests, to the most modern OS's available at https://app.vagrantup.com/elastic,. This removes the centos-6 platform from the build, which is past end-of-life and fails vagrant bootstrapping, causing the build to fail.

This is more of band-aid than anything - in the longer term, we should remove these vagrant based tests completely, and rely
on the build infrastructure to perform OS-based acceptance tests. 

* Fix regexes for plugin list tests. …

Fixes tests to support the plugin alias feature. This introduced a new format for
entries emitted by `bin/logstash-plugin list`:

eg
```
└── logstash-input-elastic_agent (alias)
```

This commit fixes the test to account for this change, and whitespace variances.
2021-07-14 09:15:07 -04:00
Andrea Selva
cef339ce57
Move retrieval of Stack version from Gradle's configuration to execution (#13042)
The Gradle's configuration of task should be as fast as possible and don't break the build.
This commit moves retrieval of Elastic Stack version from the remote registry to the execution phase of the tasks.
Also the tasks that depends on this has received the same change (downloadEs and check EsSHA), moving from configuration to execution phase.

Close #13030
2021-07-12 09:08:07 +02:00
João Duarte
5aec68b08a
Update releases list with 6.8.17 and 7.13.3 (#13041) 2021-07-07 20:04:31 +01:00
Karol Bucek
09c3bf744e
Docs: keep elastic_app_search output meta-data (#13048) 2021-07-07 07:05:00 +02:00
Andrea Selva
b722360ebd
Fix LS benchmarking tool to work with releases >= 7.10.0 (#13052)
Starting with version 7.10.0 the name of LS packages changed, adding os and CPU architecture in the name. This change broke the downloading of those from the benchmarking tool. This commit fixes it, composing correctly the name, based on the version it has to download.
2021-07-06 16:04:29 +02:00
Andrea Selva
b7efcf4a58
Revert "Change Gradle's :logstash-integration-tests:integrationTests task to depends on copyES (#12847)" (#13045)
This reverts commit 149ee41a8b.

The Gradle "runIntegrationTests" has to download the necessary ES and Fielbeats and then launch the task :logstash-integration-tests:integrationTests.
:logstash-integration-tests:integrationTests is not intented to be launched directly
2021-07-05 11:05:11 +02:00
Karol Bucek
b1ec341b6d
Test: resolve integration failure due ECS mode (#13044)
otherwise this caused a LogStash::ConfigurationError:
GeoIP Filter in ECS-Compatiblity mode requires a `target` when `source` is not an `ip` sub-field, eg. [client][ip]
2021-07-01 15:26:21 +02:00
Karol Bucek
68c753439d
Feat: event factory support (#13017)
Introduce a `new_event` (factory) interface for the Ruby plugin API.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

+ Refactor: keep (useful) causes mapping to Ruby errors

+ Refactor: avoid trim-ing (large) json strings

+ Feat: a synchronize(object) {} helper for Ruby

+ Feat: a (thread-safe) lazy_init_attr {} helper
2021-06-28 10:53:56 +02:00
Karen Metts
a31a7a4736
Doc: Add geoip database API to node stats (#13019) 2021-06-24 08:37:56 -04:00
kaisecheng
5a209ba830
Add geoip database metrics to /node/stats API (#13004)
This PR adds geoip database status, last update timestamp, download stats counter to Node Stats API
2021-06-23 17:35:15 +02:00
Ry Biesemeyer
1a4be956c4
ecs: on-by-default plus docs (#12830)
* noop: avoid declaring default value in config file

* docs: ecs compatibility from 7.x perspective

Co-authored-by: Karen Metts <karen.metts@elastic.co>

* ecs: on by default

We know that ECS version 8 will release along-side Logstash 8.0, but its scope
is still coming into focus. In this changeset, we change the default value
of `pipeline.ecs_compatibility` from `disabled` to `v1`, which is a
significantly closer approximation to what will eventually ship in Logstash
8.0.0.

* docs: ecs from 8.x perspective

Co-authored-by: Karen Metts <karen.metts@elastic.co>

Co-authored-by: Karen Metts <karen.metts@elastic.co>
2021-06-21 11:00:08 -07:00
Ry Biesemeyer
6032e5ff64
ispec: fix cross-spec leak from fatal error integration specs (#13002)
Because the "Fatal Error" specs specifically inject fatal errors during
execution, and do so by reacting to a "poison" event, the fatal error prevents
the poison event from being ACK'd in the underlying queue.

By specifying a one-off temporary data directory in these specs and cleaning up
after ourselves, we ensure that a PQ containing un-ACK'd events isn't leaked to
the next spec to run.
2021-06-21 08:14:25 -07:00
Julien Mailleret
6ae2146a75
Fix UBI source URL (#13008)
This commit fix the source URL for UBI image to ensure that it stays
consistent with the URL generated in
https://artifacts.elastic.co/reports/dependencies/dependencies-current.html
2021-06-21 16:06:10 +02:00
João Duarte
7390b64a93
update fpm to allow pkg creation on jdk11+jruby 9.2 (#13005)
* fpm to 1.13.0 which allows building packages with java 11 + jruby 9.2
* childprocess to 4.x + remove monkey patches
* clamp to 1.x to unlock fpm 1.13.0
2021-06-21 14:39:27 +01:00
Andrea Selva
a5f3153a8f
Add unit test to grant that production aliases correspond to a published RubyGem (#12993)
Loads the production plugin_aliases.yml definition file and check that every alias has
a properly published gem on RubyGems.

Adds clean up of plugin_aliases.yml files
Fixed task dependency for copyPluginAlias
2021-06-21 14:17:14 +02:00
Dion Williams
1f9ef97836
Fix logstash.bat not setting exit code (#12948)
This PR makes the Windows logstash.bat exit with the last %ERRORLEVEL% at the end, so that any error in running Logstash will get propagated back to the command line.

Before this change, logstash.bat would always exit with code 0 - success (when doing cmd.exe /C logstash.bat), even if the java.exe process exited with a non-zero code (e.g. due to Logstash throwing an error at runtime).
2021-06-21 10:32:53 +02:00
Andrea Selva
d2c68fc0f9
Use the OS separator to invoke gradlew from Rake script (#13000)
Uses the OS defined path separator in Rake script to invoke the gradlew command. Without this the sh('./gradlew assemble') results in error when running .\gradlew clean installDefaultGems.
2021-06-21 10:23:11 +02:00
Ry Biesemeyer
49e6b0e010
Allow per-pipeline config of ECS Compatibility mode via Central Management (#12861)
* spec: noop refactor of xpack central management

* spec: validate central management settings loading

* central management: allow pipeline.ordered and pipeline.ecs_compatibility settings
2021-06-17 13:59:53 -07:00
Rob Bavey
35d07fffa2
Update jinja2 dependency in docker build (#12994) 2021-06-17 09:12:09 -04:00
kaisecheng
42c4bbab9f
fix database manager with multiple pipelines (#12862)
This PR adds support to geoip multiple pipelines which have a single instance
to manage database download to avoid individual download per pipeline
2021-06-17 00:19:24 +02:00
Andrea Selva
a6e9a6bcfd
Fix Reflections stack traces when process yml files in classpath and debug is enabled (#12991)
Adds a filter to Reflections library initialization so that when it scan "org.logstash.plugins" it includes only .class files and avoid to load and process AliasRegistry.yml and plugin_aliases.yml

Fixes #12992
2021-06-16 12:15:02 +02:00
Andrea Selva
1d6a3e4bb3
Fix/log4j routing to avoid create spurious file (#12965)
Avoid the creation of log4j routing appender for log events without the `pipeline.id` fishtag. 
In this way no spurious log file named "pipeline_${ctx:pipeline.id}.log" and logs are not duplicated with main Logstash log file.
2021-06-16 09:41:30 +02:00
Karol Bucek
fe387f4ef5
Deps: update JRuby to 9.2.19.0 (#12989) 2021-06-16 09:34:49 +02:00
Karen Metts
328fc9e7e6
Doc: Add tip for checking for existing field (#12899)
Co-authored-by: Sebastian <gentunian@users.noreply.github.com>
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2021-06-15 13:33:09 -04:00
Andrea Selva
cafbf03158
Added test to cover the installation of aliased plugins (#12967)
Added test to cover the installation of aliased plugins when exists a gem with same name but that's not a Logstash plugin.
In this case the alias is resolved to the original, skipping the gem retrieved from RubyGems.
2021-06-15 14:14:41 +02:00
Karol Bucek
18314d1ccb
CI: Update logstash_release.json after 7.3.12 (#12986) 2021-06-15 13:14:46 +02:00
Andrea Selva
a0774c4e76
Explicitate the type of log format in appender's names (#12964)
Remove an useful dynamic creation of appender's log file which leverages the `log.format` property 
also when it's explicit by the appender itself.

Log4j configuration leverages the placeholder `${sys:ls.log.format}` to compose the name of the log file.
This generates some not evident conflicts in log4j internals, these conflicts became evident when enabling the `pipeline.separate_logs` feature is enabled and the log4j appender definitions contains both json and plain format.
The problem is that under those circumstances the rollover of the log file doesn't happen.

This commit also add a test against the production log4j configuration, to avoid future regressions.
2021-06-15 11:25:08 +02:00
Andrea Selva
3eaff3612d
Fix acceptance test when run artifact:all (#12975)
This commit avoid to check for existence of jar files to decide if run or not Gradle assemble,
basically because the outputs of assemble task are not only jars but also others files, for example plugin-aliases.yml.
In this way the decision to execute or not is left the Gradle logic.
2021-06-10 10:31:39 +02:00
Karen Metts
f481386039
Doc: Remove unused tagged regions (#12976) 2021-06-09 19:51:07 -04:00
Karol Bucek
ee6038afec
Deps: update JRuby to 9.2.18.0 (#12791)
+ Fix: a missing require in bootstrap
2021-06-09 11:21:41 +02:00
João Duarte
0b08838d2a
bump devutils dependency to 2.x (#12857)
* update filter_spec to not use insist
* fix ruby tests adding rspec/wait require
2021-06-08 12:31:55 +01:00
Andrea Selva
8e62e8a01c
Fix dependency on plugin_alias.yml during rake artifacts:all (#12962)
The module LogStash::PluginManager requires the file `lib/pluginmanager/plugin_aliases.yml` is created,
which happend during the Gradle's 'copyPluginAlias' executed as part of Rake's 'bootstrap'.
2021-06-04 12:37:56 +02:00
Andrea Selva
aa8305f1d4
Refactoring of JavaKeyStore.getKeyStorePassword method to simplify if conditions (#12952)
Streamline the flow of logic avoiding nesting of if-s to make evident the good path vs the error conditions.
2021-06-03 12:36:28 +02:00
Andrea Selva
446dc7d906
Avoid hard-coded plugin alias definitions (#12841)
Remove hard coded alias definitions in favor of yaml descriptor file.

Introduce a single point of aliases definition (logstash-core/src/main/resources/org/logstash/plugins/AliasRegistry.yml),  checksum and copy it around to be used by Logstash and by Logstash's plugin management tool.

The descriptor yml file contains a checksum to verify it's not changed accidentally in a deployment of Logstash, if the verification phase fail Logstash avoid to start and plugin management tool avoid to operate.
The signing and copying around is managed by a specific Gradle task invoked during the build.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

Fixes #12831
2021-06-03 12:24:18 +02:00
Andres Rodriguez
51b359b011
Add a template on how to create an issue when requesting to list a plugin in docs (#12944)
In the List a Plugin docs, we suggest users to create an issue to request we list community plugins. This commit improves that page by adding a template to create an issue.
2021-06-01 09:10:09 -04:00
Andrea Selva
fa9adb4b86
Use the JVM specified in the CI matrix environment also to run spawned proccesses (#12945)
logstash-keystore integration tests spawn a Java process, which by default uses the system JDK generally exposed with JAVA_HOME environment variable. It could be that this JDK is not the one selected with the build system variable BUILD_JAVA_HOME.
This commit uses the JDK defined in BUILD_JAVA_HOME if present.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-06-01 12:32:47 +02:00
Karen Metts
2e413c6e92
Internal: Update messaging in release notes script (#12949) 2021-05-28 10:41:37 -04:00
João Duarte
1f670e62b2
turn off data streams in internal monitoring collection (#12941)
Since we default to data streams in 8.0.0, the internal collection for monitoring stops working due to the ES output trying to send data to the logs- data stream instead of the monitoring endpoint.
2021-05-27 16:24:48 +01:00
Karen Metts
da3157c013
Doc: Expand definition and fix typo (#12936) 2021-05-26 15:03:22 -04:00
Rob Bavey
a935261eeb
Add logstash-integration-elastic_enterprise_search to plugins-metadata.json (#12925)
* Add logstash-integration-elastic_enterprise_search to plugins-metadata.json
* Remove old elastic_app_search plugin and set integration as default
* Add license information for workplace search gem
2021-05-25 17:37:39 -04:00
Andrea Selva
5e1ab721ae
Update logstash_release.json after 6.8.16 and 7.13.0 (#12929) 2021-05-25 15:25:16 +02:00
kaisecheng
e60340ad08
Geoip disable database manager (#12905) 2021-05-12 19:47:22 +02:00
João Duarte
d1b12ded1d
fix ubi8 docker image creation by skipping yum clean metadata (#12902)
ubi8 image uses microdnf as a package manager, and microdnf does
not support the "yum clean metadata" command. This commit adds
the logic to skip this command if the image_flavor is ubi8
2021-05-12 15:05:48 +01:00
Rob Bavey
d0e79553b5
[Build] On aarch64 docker build, install noarch version of bind-license first (#12891)
On aarch64, yum does not pick the correct 'bind-license' package,
this commit installs a specific noarch RPM

This commit also adds retry to the yum installs and updates.
2021-05-11 22:40:43 -04:00
kaisecheng
03fb24bd54
Geoip use cc indefinitely (#12888)
This PR allows using CC database indefinitely if Logstash hasn't used EULA database ever
Fixed: #12859
2021-05-11 17:30:18 +02:00
Karen Metts
3885b751cb
Doc: Update contributing steps and guidelines (#12879) 2021-05-10 19:09:22 -04:00
Andrea Selva
4f63701d6d
Update bundled JDK to 11.0.11+9 (#12881) 2021-05-10 18:20:05 +02:00
João Duarte
3e0c61a4fc
fix DLQ integration tests (#12871)
* do not rely on default index and template in dlq integration test
* ensure ES is started in single node mode
2021-05-06 13:56:35 +01:00
Andrea Selva
90a4f55a10
Fix ES HOW integration tests on master (#12872)
Disable datastreams and provide explicit index name to avoid automatically creation of datastreams in ES > 8.0.
Same as in PR #12871
2021-05-06 14:23:39 +02:00
João Duarte
3c6a476bb6
Update logstash_releases.json 2021-05-06 11:26:00 +01:00
Erwin Dondorp
d19d8c679b
Support for UTF-16 and other multi-byte-character logfiles (#9702)
* Added support for UTF-16 and other multi-byte-character logfiles

* added testcase for usage of \0
2021-05-05 10:22:02 -07:00
kaisecheng
76bff0aa91
change download path for geoip plugin (#12863)
The database was downloaded in plugin/vendor
This PR changes the working directory to `path.data`
2021-05-04 11:03:31 +02:00
Andrea Selva
149ee41a8b
Change Gradle's :logstash-integration-tests:integrationTests task to depends on copyES (#12847)
The integrationTests start instances of Elasticsearch so they need it to be present and unpacked in build/ folder before start.
2021-05-03 11:51:17 +02:00
Karen Metts
ec6b05d65d
Doc: Keystore must be accessible to logstash user (#12775)
Updates docs to propagate change to other branches. The original was a direct commit to the 7.10 branch.
2021-04-30 17:41:58 -04:00
João Duarte
bac5e89dd6
Remove json ~>1 pinning (#12851)
This pinning made sense when logstash-mixin-aws would depend on aws-sdk-v1 which forced json ~> 1.
The aws mixin v5.0.0 only depends on v2 now, so we can remove this.
2021-04-28 11:51:38 +01:00
Andrea Selva
1e08341e1e
Adapted install/uninstall/list PluginManager's command to respect the alised plugins (#12821)
Adapted install/uninstall/list PluginManager's CLI commands to respect the alised plugins
- adapt install plugin to resolve an alias giving precedence on a real plugin
- changed list to mark alised plugins
- uninstall avoid to remove the alias and ask the user to remove the original plugin
- update update the original plugin in case of alias, else fallback on usual behavior

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2021-04-20 22:57:02 +02:00
Andrea Selva
5e7759767a
Load a plugin by alias name. (#12796)
Introcuce the concept of alias for a plugin.

Creates an AliasRegistry to map plugin aliases to original plugins.
If a real plugin with same name of the an alias is present in the system, then the real plugin take precedence during the
instantiation of the pipeline.

Simplified the error handling in class lookup

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2021-04-20 22:21:33 +02:00
kaisecheng
08f758c028
GeoIP database copy all files from .tgz alongside database (#12824)
This PR changes the behavior of copying license files from .tgz
Originally, only two files, MaxMind LICENSE.txt and COPYRIGHT.txt, are required
Now more files, README.txt and Elastic ToC, are potentially required
Instead of targeting the files, this change copies all content in .tgz
2021-04-15 14:35:18 +02:00
Andres Rodriguez
7b360aaac3
Add new issue templates based on Elasticsearch's (#12814)
Adds GitHub issue templates to help users file issues, enhancement/feature requests, test failures, etc.
2021-04-14 18:44:38 -04:00
Karol Bucek
19afb54841
Docs: note on quoted field references (#12801)
see GH-5591

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-04-14 10:41:38 +02:00
Andres Rodriguez
2caea13672
[doc] Add example to cross-plugin-concepts (#12672)
Adds an example showing users how to use the environment variable to define multiple whitespace-delimited URIs
2021-04-13 10:34:18 -04:00
Andrea Selva
bb0074f676
Removed static part from PluginRegistry to avoid static initializer (#12799)
Removed static part from PluginRegistry to avoid static initializer, transforming it into a singleton. Reflections library is not thread safe in jar archives scan, so there must be only one instance of PluginRegistry
2021-04-13 15:50:05 +02:00
Andrea Selva
6f55066b17
Fix Date class clash when used in pipelines with Date filter and GeoIP and pin open-ssl to 0.10.5 (#12811)
This commit contains two fixes
* Fix Date class clash when used in pipelines with Date filter and GeoIP
* Pinned jruby-openssl version 0.10.5 to avoid SSL errors
2021-04-13 14:19:54 +02:00
Karol Bucek
c698aa224b
Test: let's do the cleanup for every test (#12805) 2021-04-08 18:03:55 +02:00
kaisecheng
efa12c048b
Allow plugin manager uninstall plugin regardless of working directory (#12786)
Fixed: #10781
2021-04-08 17:59:06 +02:00
kaisecheng
4eeaa4af92
Fix integration test to allow wildcard deletion in elasticsearch (#12806) 2021-04-08 17:12:03 +02:00
Karol Bucek
e8e393bdc7
Fix: logstash-keystore failing with an error (#12784)
* Fix: missing password dependency require

which causes `bin/logstash-keystore` to fail with an error:
```
ERROR: Failed to load settings file from "path.settings". Aborting...
path.setting=/logstash-7.12.0/config, exception=NameError,
message=>uninitialized constant LogStash::Util::Password

```

* Fix: review all LS parts depending on Password

* Test: bin/logstash-keystore create/list
2021-04-08 08:10:36 +02:00
Andres Rodriguez
c4cb8f4f12
Set correct permissions for /usr/share/logstash on pkg installs (#12782)
This PR sets correct ownership of /usr/share/logstash on DEB & RPM installs, following FHS guidelines.

Closes: #12771
2021-03-31 12:21:48 -04:00
IvoGoman
7b855820ed
Adds option to pass custom data to the benchmark CLI (#12437) 2021-03-25 15:00:57 -04:00
kaisecheng
ca76c0c484
GeoIP database add license files (#12756)
GeoIP database service provides LICENSE.txt and COPYRIGHT.txt 
along with the database in .tgz

Fixed: #12560
2021-03-25 19:34:19 +01:00
Karol Bucek
cc615da80c
Build: avoid leaking memory from generate_plugins_version (#12763) 2021-03-24 17:58:14 +01:00
Karen Metts
c588c42dcf
Internal: Add release notes section to pr template (#12662) 2021-03-18 13:47:45 -04:00
Roshan Poudel
5dcfea5308
Update logstash.asciidoc (#12730)
Change protocol from HTTP to HTTPS
2021-03-16 15:08:51 -04:00
Ry Biesemeyer
d5becc0082
internal-monitoring: use configured ssl verification mode (#12749)
Upstream `ElasticsearchOptions#es_options_from_settings` already uses the
setting `elasticsearch.ssl.verification_mode` to produce an appropriate
boolean-valued `ssl_certificate_verification` in our `es_settings` hash, so
we can rely on it instead of re-checking equality with a string.
2021-03-16 10:02:05 -07:00
Rob Bavey
ea92b9d529
Update logstash_releases.json (#12745) 2021-03-11 10:31:31 -05:00
Karol Bucek
c32d1a2b6d
Deps: update log4j2 to latest and ship log4j 1.2 bridge (#12724)
* Deps: ship log4j 1.2 logging bridge with LS
* Deps: update log4j to 1.7.0 + ship 1.2 bridge
2021-03-11 09:16:27 +01:00
Andrea Selva
9edd64e3f2
Removes the "Snapshot builds" section from README.md for master branch like #12682 done for 7.x (#12740) 2021-03-11 08:51:01 +01:00
Rob Bavey
72e26f9957
Fix Benchmarking tool (#12736)
Since the introduction of this block:

```
 "pipeline" : {
    "workers" : 16,
    "batch_size" : 125,
    "batch_delay" : 50
  },
```

to the node stats API, the benchmarking tool has been broken. This commit fixes the
tool, and updates the payload in the tests to reflect the current payload.
2021-03-10 11:19:15 -05:00
kaisecheng
ba6513e85a
change domain and endpoint of GeoIP database service (#12727)
Fixed: #12560
2021-03-09 10:39:28 +01:00
Karen Metts
ddda11ba71
Doc: Add unix command for running basic pipeline (#12714)
Adds framework for showing both windows and unix examples.
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-03-05 13:49:31 -05:00
Karen Metts
26a154b3df
Docs: Replace relative paths with docs-root attributes (#12719) 2021-03-05 11:42:51 -05:00
Rob Bavey
edd9b33f9b
[Build] Fix version script when VERSION_QUALIFIER is empty string (#12728)
Prior to this release a VERSION_QUALIFER env set to an empty string
would create versions looking like `8.0.0--SNAPSHOT` instead of
`8.0.0-SNAPSHOT`, causing the release manager builds to fail.
2021-03-05 09:34:28 -05:00
Karol Bucek
dbc7bbe179
backport: always prefix the version number (#12722)
Ensure we always prefix the version number with 'v', so it is added to both, the original and the backport PR.

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2021-03-04 17:11:31 +01:00
Karol Bucek
59458bb8e8
Deps: update slf4j to latest 1.7.30 (#12720) 2021-03-04 12:04:31 +01:00
João Duarte
9643a33b99
update jruby to 9.2.16.0 (#12699)
fix define_method+super calls due to jruby/jruby#6571
2021-03-04 09:32:50 +00:00
Andrea Selva
bca169f348
Temporarly silenced an x-pack monitoring test, waiting to be fixed the root cause (#12712)
The fail cause is documented  in issue #12711
2021-03-03 17:53:11 +01:00
kaisecheng
fce949a1eb
fix broken test case of term of service (#12715)
Fixed: #12560
2021-03-03 14:00:07 +01:00
Megan Humphreys
af641a1662
Update getting-started-with-logstash.asciidoc (#12706)
Single quotations cause errors, should be double quotes for Windows
2021-03-02 15:20:58 -05:00
kaisecheng
e332842cb3
GeoIP clean up database after new download (#12689)
This commit adds a clean-up step to remove .gz and .mmdb 
which is not in the metadata after pointing to the new GeoIP database

Fixed: #12560
2021-03-02 14:30:44 +01:00
João Duarte
f0c18e89d0
cleanup bundler exclusions during jruby unpacking (#12692)
JRuby had a few releases where it shipped with bundler,
creating some difficulty in working with newer versions.
This no longer happens so we can remove these exclusions
from the jruby unzipping task.
2021-02-25 17:49:23 +00:00
João Duarte
ac2f5ef903
update jdk to 11.0.10+9 (#12693) 2021-02-25 17:45:21 +00:00
Rob Bavey
0873ed6649
Fix Elasticsearch/DLQ integration test flakiness (#12685)
This commit fixes up some IT flakiness which has been presenting mostly
in recent DLQ test failures, it includes the following improvements:

 * A recent change to Elasticsearch has required the cluster setting
`action.destructive_requires_name` to be set to `false` to enable the use
of destruction actions with wildcards. This commit sets this before
tests on Elasticsearch and DLQ tests
 * Adds some extra safety to the `have_hits` rspec matcher
2021-02-22 10:44:59 -05:00
kaisecheng
54b370ea48
Geoip database service (#12675)
geoip database service in xpack
dependency update and license note

Fixed: #12560
2021-02-18 14:18:28 +01:00
andsel
042d0d466b Make integration test fail if 'offline' tool can't be compiled 2021-02-18 01:36:18 -08:00
João Duarte
a51ba426b7
List 7.11.1 in the logstash_releases.json file (#12679) 2021-02-17 19:16:12 +00:00
andsel
0d6666b1da Removed OpenJDK15 in CI matrix testing
Add AdoptOpenJDK15 and Zulu15 to CI matrix
2021-02-17 00:12:07 -08:00
andsel
91996cf2a2 Fix Logstash pipelines management in case of slow loading pipelines or disabled webserver (#12571)
This commit avoid an error in gathering monitoring information when webserver is disabled or is not yet started;
which could happen with slow loading pipelines or no pipelines defined from the central management UI.
2021-02-16 05:54:12 -08:00
andsel
79d8f47437 Separate "not terminated" pipeline state into "running" and "loading".
This change fix the behavior of considering as "running" also pipelines that are still in "loading", both "loading" and "running" is considered as "not terminated".
Fixed a flakyness in tests due to different ways to looks at the same thing: pipeline status.
The pipeline status is determined by both `pipeline.running?` and by `agent.pipelines_running`.
The first checks for an atomic boolean in pipeline object, the second check for the status in PipelineRegistry.

Fixes #12190
2021-02-15 07:23:21 -08:00
João Duarte
0c762fe888
Update Logstash versions in logstash_releases.json (#12654) 2021-02-10 15:26:59 +00:00
Inbar Shimshon
35c0f06943
Update keystore.asciidoc 2021-02-04 11:59:53 +02:00
andsel
dd9f2b7a0a Fix the run of copyEs and downloadEs gradle task. (#12586)
Avoid the deletion of downaloaded ES artifact during copyEs task and download a new version only if the SHA512 of the local copy differs from the what is retrived from remote repository.
This avoid unusefull download of the same ES artifact when run integrationTests task multiple times.
2021-02-03 07:40:45 -08:00
Rob Bavey
872546ec19
Update dockerfile template to allow selection of architecture by env (#12636)
This commit updates the dockerfile template to support environment
variables being used to retrieve the architecture appropriate logstash
build, in the same way as is currently done for the Elasticsearch docker build.
This is required to support the official dockerhub builds of Logstash.

Relates #12578
2021-02-03 09:25:49 -05:00
kaisecheng
bdb9453293
Fix showing deprecation warning of command line flags (#12592)
Fix missing deprecation warning. Store the deprecation message in memory and remove them once it shows to users

Fixed: #12587
2021-02-03 13:14:29 +01:00
kaisecheng
4f6d81ded7
remove CMS from jvm options in java 14 (#12638) 2021-02-03 12:16:28 +01:00
Rob Bavey
0bcb95c6b2
Update docker container tests to handle jvm option parser (#12633)
Docker container integration tests relating to the java process were
failing due to the introduction of the new JVM option parser. This
commit waits for logstash to start before testing that the logstash
java process is being run as expected
2021-02-02 12:00:16 -05:00
andsel
8bdd601c1b Reintroduce the work done in PR #12614 erroneusly removed by PR #12582 2021-02-02 01:03:17 -08:00
andsel
fd446c9b70 [Doc] added instruction on how to update and when an existing LS installation is update to LS 7.12+ and use JDK15
co-authored-by: karenzone@users.noreply.github.com
2021-02-02 00:12:31 -08:00
Ry Biesemeyer
2f97602379
Create SECURITY.md (#12573)
reiterate security policy currently found in our pull-request template
2021-02-01 10:30:41 +00:00
João Duarte
7c4bd8f875
use correct headers api for redirects in plugin manager http client (#12626)
* fix plugin installation QA test
2021-02-01 10:24:12 +00:00
João Duarte
0337835f67
fix url for kafka and bump to 2.7.0 (#12617)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-01-29 17:34:18 +00:00
João Duarte
023e11a8e2
replace with_clean_env with with_unbundled_env (#12615) 2021-01-29 17:31:35 +00:00
kaisecheng
3fb12747f5
enable agent to stop pipeline by pipeline_id (#12582)
* This PR allows the agent to stop pipeline by pipeline_id instead of fetching the full set of pipelines from elasticsearch and compute the pipeline actions internally

Fixed: #12560
2021-01-29 14:29:56 +01:00
Karen Metts
49131d826d
Doc: Clarify minimum privileges for logstash_writer role (#12613)
Fixes: #12612
2021-01-28 12:19:48 -05:00
andsel
8c3ff551ed Update CI to run on OpenJDK15 2021-01-28 08:27:32 -08:00
Rob Bavey
aef3a99920
Fix sub second config.reload.interval (#12589)
* Fix sub second `config.reload.interval`

Due to a change in #11803, using `to_seconds` to normalize values of `config.reload.interval`
would resolve to a value of 0 causing issues in tests where short reload intervals were desired.
This commit uses the `to_nanos` method to preserve the previous functionality.


Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-01-27 14:52:38 -05:00
João Duarte
57b81b2625
bump jrjackson to 0.4.14 and jackson-databind to 2.9.10.8 (#12603) 2021-01-27 11:23:35 +00:00
João Duarte
128e992c57
[windows] fix launch of logstash.bat when folder contains spaces (#12585) 2021-01-26 09:57:57 +00:00
andsel
7ba8c75458 Introduction of conditional in jvm.options file (#12530)
- moved parsing of jvm.options file into Java code
- chnaged the parsing code to consider conditional notation to bind the applicability of certain JVM flags to specific JVM versions
- changed the launch scripts (.sh and .bat) to use the options string composition
- binded CMS flags to JVM specifications 8-14
2021-01-25 05:16:18 -08:00
andsel
99679870c6 Implements scripted log4j filters and appenders to Java, avoid usage of deprecated Javascript Nashorn (#12512)
- replaces all scripted filters with custom Java implementation
- implemented routing appender per pipeline in Java
- adapted log4j configuration shipped with Logstash
- exit the Logstash process if it detects an scripted log4j configuration
2021-01-25 02:25:09 -08:00
João Duarte
2f890abab1
Update versions file with new 7.10.2 release (#12575) 2021-01-15 12:27:36 +00:00
Ry Biesemeyer
622c5107ce pq: eliminate corruption by forcing version byte to be persisted
When the PQ creates a new page and allocates a memory-mapped buffer, the
underlying file is zero'd out to full page capacity and the version byte is
written to the buffer.

If Logstash crashes or is shut down before any elements have been pushed into
the queue page, we have no guarantees that the version marker has been
persisted to the storage device. A subsequent attempt to load an all-zeros
queue page will result in an obscure error message and failure to load:

~~~
AbstractPipelineExt - Logstash failed to create queue.
org.logstash.ackedqueue.io.MmapPageIOV2$PageIOInvalidVersionException: Expected page version=2 but found version=0
~~~

By sending `MappedByteBuffer#force()` immediately after the version has been
added to the buffer, we can shrink the window in which a crash can leave the
queue on disk in a corrupt state.
2021-01-11 10:35:18 -08:00
Karol Bucek
3faa83f5b3
Fix: make sure LS exits when running into fatal errors (#12470)
Currently, LS does not respect fatal errors such as java.lang.OutOfMemoryError and continues executing.

This is dangerous since JVM errors are a legitimate reason to halt the process and not continue processing.

Additionally:

-   make sure we log the full stack-trace on fatal errors
-   halt the JVM wout executing finalizers/hook (scissors on how ES handles uncaught exceptions)
-   also, we should now be aware of a potentially unexpectedly dying thread
2021-01-11 10:14:58 +01:00
Karen Metts
3e8a3c58e1
Doc: Add info on contributor program (#12543) 2021-01-04 15:12:28 -05:00
Rob Bavey
0d0c958b56
Update license dependency information (#12542)
This commit updates the license information for the license dependency report.
Specifically, this adds a notice for `racc`, a different version of which is now
pulled in by nokogiri from the version included with jruby.
2021-01-04 14:33:29 -05:00
andsel
9a63ec2705 Add some javadocs comments to the classes
Removes never used class org.logstash.execution.queue.LegacyMemoryQueueWriter
2020-12-22 07:06:14 -08:00
andsel
aa3576d74d Moved ingest-converter tool from Javascript to Java, preserving the same behaviour (#12524) 2020-12-18 07:24:15 -08:00
andsel
d176e608bd Enable javadoc lint only for files that contains javadoc comments, avoid warning for missing javadoc comments on everything else 2020-12-17 03:39:11 -08:00
kaisecheng
4bc9dad69c
Remove ruby execution engine (#12517)
* remove Logstash::Pipeline
* remove logstash/event, Logstash::SignalEvent
* remove Engine.Ruby on java side
* remove config pipeline.java_execution
Fixed: #11236
2020-12-15 10:41:27 +01:00
Ry Biesemeyer
0ff682040d
plugin: adds :validate => :field_reference (#12459)
* plugin: adds `:validate => :field_reference`

Provide plugins a way of validating that an input is a literal field-reference.

This is useful for input plugins that implement a `target` or other
non-interpolated directive, and allows these plugins to reject invalid
configuration before start-up instead of at run-time.

Plugins should not use this named validator directly, as doing so would cause
validation to fail with "Unknown validator" when the plugin is run on older
releases of Logstash. Instead, plugins should use the `validator_support`
adapter mixin that provides back-ports when necessary.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2020-12-14 22:05:34 -08:00
andsel
7144a3f7cf Fix error due to missing variable when listitng tasks and no architecture is externally specified with -Pos_arch= 2020-12-10 05:22:48 -08:00
andsel
f9061ff6d5 Updated releses to 7.10.1 for 7.x 2020-12-09 03:29:03 -08:00
Rob Bavey
81a9857944
Add UBI8 image specific labels back to the docker image (#12498)
these labels are required for redhat openshift certification.

These commit reintroduces the labels for the ubi8 image only, and adds
acceptance tests to ensure these labels are correct and not inherited
2020-12-04 14:17:42 -05:00
Andres Rodriguez
6d9ff9c880
Change text to use Elastic Cloud (#12404)
Make use of the term 'Elastic Cloud' as this is the term being used to refer to the service we provide.
2020-11-30 15:55:35 -05:00
andsel
1a62dc79e0 Moved LogStash::Util::TimeValue to Java 2020-11-30 05:01:56 -08:00
andsel
fa3891953d Moved ModulesSettingArray from Ruby to Java.
The ModulesSettingArray is responsible to obfuscate password in arrays of settings.
The test are still in Ruby to proove the interoperability with Ruby code that used the previous version.

Added method to mimic .first and .last methods of Ruby Array
2020-11-30 01:27:44 -08:00
kaisecheng
7cccf7ddc8
[Doc] Remove field reference parser (#12478)
Fixed: #12355
2020-11-26 14:16:07 +01:00
andsel
7db4692044 [Doc] expanded the description of how to obtain the logger's names form Java and Ruby class names 2020-11-25 03:12:59 -08:00
andsel
09f995776e Fix an API break, a Ruby's ArgumentError should be raised.
Reestablished Ruby specs to test moved code.
2020-11-25 01:13:06 -08:00
andsel
14570d5d86 Fix an API break in CloudSettingsAuth, a Ruby's ArgumentError should be raised.
Bring back Ruby specs to double check the change also in Ruby context.
2020-11-25 00:39:22 -08:00
kaisecheng
69451e5017
clean up field-reference-parser (#12466)
remove field-reference-parser for version 8
Fixed: #12355
2020-11-24 17:58:10 +01:00
Colin Surprenant
f4bfbd3cc7 remove evaluation dir from JRuby bundled did_you_mean gem 2020-11-23 11:22:28 -08:00
andsel
ca81a8f4a3 Drop Password Ruby class to use only the Java version
There is two Password classes that almost does the same thing. One in Ruby (LogStash::Util::Password) and one in Java (co.elastic.logstash.api.Password).
This commit drop the the Ruby implementation to import the Java version in the LogStash::Util so that existing Ruby code haven't to be changed, works as it is.
2020-11-19 07:12:53 -08:00
Rob Bavey
934e44da13
Add additional description label (#12452)
Removing the freeform description labels left the container metadata
without a description label. This commit adds a description under the
"org.opencontainers.image.description" label
2020-11-18 14:03:42 -05:00
Rob Bavey
5ee83e8cc7
Fix docker image metadata (#12447)
This commit fixes two issues with the docker metadata:

Removes non-OCI compliant freeform metadata labels
Uses a consistent build date for all the docker images and dockerfiles

Additionally, this commit adds a `build_docker_ubi8` rake task to enable
`ci/docker_acceptance_tests.sh` to run with no options to build all
docker images for the architecture.
2020-11-18 12:29:37 -05:00
andsel
b0920eb6ff Move code of CloudSettingAuth to Java
- moved the class's code
- moved spec tests to JUnit tests
2020-11-18 08:14:56 -08:00
Rob Bavey
eed7a1538c
Update releases file (#12445)
Update latest release `7.x` version to `7.10.0`
Update latest snapshot `7.x` version to `7.11.0-SNAPSHOT`
2020-11-17 09:03:20 -05:00
andsel
2545fa45ba Moved CloudSettingId class and tests to Java 2020-11-12 09:14:56 -08:00
andsel
0449722635 Update logstash_releases.json for 7.10.1 cycle 2020-11-11 07:33:20 -08:00
andsel
690bade81f Added console prints in ingest-converter for not recognized processor definitions.
Adds console output for
- 'if' condition in 'set' processor
- unrecognized processor, like join
2020-11-10 07:52:51 -08:00
Rob Bavey
b2a396bccb
Add more information to UnexpectedTypeException (#12426)
Where available, this commit addS information from getSourceWithMetadata to the
error message of UnexpectedTypeException, dropping down to `toString`
if not, giving more context to find where the issue is caused in the configuration.
2020-11-10 09:46:58 -05:00
kaisecheng
606cfe5dfb
hash function of pipeline config with metadata (#12389)
add metadata in the hash function

Fixed #12387
2020-11-09 14:11:45 +01:00
kaisecheng
244a9f4024
delete pipeline in registry (#12414)
deletes the pipeline in the pipelines_registry if it is terminated and is removed in the source

Fixed: #12414
2020-11-06 22:43:33 +01:00
Karen Metts
6bb2bd6044
Doc: Add bundled JDK info (#12369)
Document options and impacts of bundled JDK
2020-11-05 12:24:11 -05:00
kaisecheng
1723dc547c
Doc: wildcards in xpack.management.pipeline.id (#12396)
document wildcard support in pipeline IDs
#12370
2020-11-05 17:19:50 +01:00
Rob Bavey
baca4ca8bf
Add addresses to p2pipeline input and output plugin metrics (#12394)
This commit adds context to the pipeline to pipeline input and output
plugins by adding a string containing the `address` field to the input
plugin, and an array containing the `send_to` field to the output plugin.
This helps gain a picture of how pipeline to pipeline enabled configurations
are communicating with each other, without having to refer back to the pipeline
definition
2020-11-04 15:26:50 -05:00
kaisecheng
0f55de9c9e
add wildcard support in xpack pipeline id (#12370)
add wildcard support in xpack pipeline id
do the pattern matching with glob
add warning msg to wildcard with legacy api
check invalid pipeline in bootstrap
test cases for invalid checking
2020-11-03 11:02:07 +01:00
João Duarte
c7c0cb3ea7
Improve error message for non-existing settings (#12395) 2020-11-03 09:46:15 +00:00
Karen Metts
4b163a9e91
Doc:Restructure troubleshooting docs and add plugin tracing (#12270)
Restructures troubleshooting docs in preparation for expanding content.
Adds info for plugin tracing to help users track down plugins that might be causing problems.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Fixes: #12228
2020-11-02 15:48:39 -05:00
Karen Metts
d7a9dcd887
[Doc]Relocate logstash-to-cloud topic for increased visibility (#11884)
Moves Cloud info to Configuration section to make it more obvious and easier to find
Expands content for using cloud id and cloud auth outside of modules
Moves module-specific info into modules section
2020-10-30 13:49:56 -04:00
kaisecheng
55637c8aaf
document system indices api privilege (#12391)
* update privilege requirement
2020-10-28 17:15:04 +01:00
kaisecheng
c0bbc94b26
document system indices api privilege (#12388)
* update privilege requirement
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2020-10-28 10:30:15 +01:00
Rob Bavey
00a2bc13b0
Update jrjackons and databind versions (#12385) 2020-10-26 13:46:31 -04:00
andsel
b5a3754f30 Updates releases file after 7.9.3 and 6.8.13 2020-10-26 02:33:15 -07:00
andsel
a6fbc6c260 In QA test, when Logstash package with bundled JDK is installed on RedHat it has to check also the architecture 2020-10-21 07:15:29 -07:00
Andres Rodriguez
5c4dd3c259
[doc] Add clarifying note to Logstash repo install
Add a note to the documentation to clarify that Logstash needs to be run as a service when installing from a package repository or a deb or rpm.
2020-10-19 17:52:59 -04:00
Karol Bucek
4649a55a84
Build: properly isolate integration (test) env setup (#12361)
to avoid gems being resolved from the usual LS GEM_HOME

this is problematic for gems such as jruby-openssl which are loaded
during boot (by RGs/Bundler) and thus activated in Bundler from a
different GEM_HOME. if such gem is updated it won't end up being
install-ed in the --path location as it's found on the GEM_HOME!

+ Fix: gem conflict 1.3.6 required by core
this is due now isolating GEM_HOME on `bundle install --path`

+ Refactor: we do not need LS_GEM_HOME/PATH

+ avoid pinning jruby-openssl to 0.10.4

resolves GH-12299 (reverting GH-12300)
2020-10-19 17:32:01 +02:00
Rob Bavey
002de11fe6
Add optional sourceURL to license report CSV (#12346)
* Add optional sourceURL to license report CSV

This commit adds an extra optional column 'sourceURL' to the license report. This
column contains a pointer to the source code, which is optional for most dependencies,
but a requirement for some, such as the Red Hat Universal Base Image.

This commit also populates the 'copyright' field, which previously was an used
column in the CSV definition

Relates #12297
2020-10-19 11:03:29 -04:00
Colin Surprenant
20f5512103
stop inputs upon a worker error before terminating the pipeline (#12307)
This addresses an incomplete fix in #12019 starting in 7.8.1 where upon catching a worker exception (to avoid crashing the whole logstash per #12306) the input plugin(s) are not terminated prior to closing the pipeline leading to the input plugin(s) continuing execution and failing with IllegalStateException & Tried to write to a closed queue since closing the pipeline also correctly closes the queue.
2020-10-13 15:55:53 -04:00
Karen Metts
96328aec34
Doc: Clarify use of queue max bytes setting (#12340)
Queue max bytes only applies to persistent queues
Forwardports: #12334 to master

Co-authored-by: rsdrakh <33121848+rsdrakh@users.noreply.github.com>
2020-10-13 15:37:33 -04:00
Rob Bavey
6e5ea14c0b
Handle Windows delete pending files (#12335)
When deleting temporary files created by the DLQ writer to store data before moving to their
final location, Windows may leave these files in a "delete pending" state, where the files
are somewhat in a state of limbo, where they result of `Files.exist(filename)` is `false`,
but the result of `filename.toFile().exists()` is true. When files are in this state, a new
file with the same name cannot be created, which causes the DLQ test used to ensure that
closing and reopening the DLQ (in such events as a pipeline restart) to fail.

This commit moves the temporary file to an alternative location before deletion, ensuring that
the "pending delete" status does not interrupt with the DLQ startup
2020-10-13 10:23:44 -04:00
Andres Rodriguez
ecbad2a230
Add devtools to ease auto-creation of new PRs and Backport PRs (#12290)
Add devtools: backport and create_pr

Adds two scripts to help developers automatically create a PR:
 * backport: Allows back porting commits to any other branch. It uses cherry-pick.
 * create_pr: Automatically creates a PR from your local branch.
2020-10-08 11:54:11 -04:00
Rob Bavey
0613ac3cf8
Fix env2yaml syntax error (#12320)
`pipeline.ecs_compatibility` setting was missing a comma after its definition
2020-10-07 14:10:36 -04:00
Rob Bavey
06af15030a
Write DLQ entries to temp file first (#12304)
* Write DLQ entries to temp file first

This commit changes the DLQ writer to write to a temporary file
 which will be renamed on "completion", to avoid the possibility
 of the DLQ reader reading an incomplete DLQ segment. The temp file
 will be renamed and made available, either when the capacity of this
 segment is reached, or if a configurable 'flush interval' has elapsed
 since the last event reached the dead letter queue.

This commit fixes #8022, #10275, #10967
This commit replaces #11127
2020-10-07 11:46:17 -04:00
Rob Bavey
80091b16ec
Remove redundant shouldRunAfter (#12314)
The `shouldRunAfter` specified in the main script body was causing the runIntegrationTests
task to be evaluated even when it should not have been, causing unnecessary failures
when artifacts required only for integration tests are unavailable.
This can be removed, because the `shouldRunAfter` relationship for the `runIntegrationTests`
task is already defined in the task body.
2020-10-07 11:05:04 -04:00
kaisecheng
999601cd90
replace direct access of hidden indices with system indices api (#12279)
* replace direct hidden indices access with system indices api

* fulfill backward compatibility

* fix log msg, rename class, simplify response handling

* modularise fetcher
2020-10-06 21:19:36 +02:00
Ry Biesemeyer
08d1ef0b49
ECS Compatibility (#12305)
Implements a plugin `ecs_compatibility` option, whose default value is powered
by the pipeline-level setting `pipeline.ecs_compatibility`, in line with the
proposal in elastic/logstash#11623:

In order to increase the confidence a user has when upgrading Logstash, this
implementation uses the deprecation logger to warn when `ecs_compatibility` is
used without an explicit directive.

For now, as we continue to add ECS Compatibility Modes, an opting into a
specific ECS Compatibility mode at a pipeline level is considered a BETA
feature. All plugins using the [ECS Compatibility Support][] adapter will
use the setting correctly, but pipelines configured in this way do not
guarantee consistent behaviour across minor versions of Logstash or the
plugins it bundles (e.g., upgraded plugins that have newly-implemented an ECS
Compatibility mode will use the pipeline-level setting as a default, causing
them to potentially behave differently after the upgrade).

This change-set also includes a significant amount of work within the
`PluginFactory`, which allows us to ensure that pipeline-level settings are
available to a Logstash plugin _before_ its `initialize` is executed,
including the maintaining of context for codecs that are routinely cloned.

* JEE: instantiate codecs only once
* PluginFactory: use passed FilterDelegator class
* PluginFactory: require engine name in init
* NOOP: remove useless secondary plugin factory interface
* PluginFactory: simplify, compute java args only when necessary
* PluginFactory: accept explicit id when vertex unavailable
* PluginFactory: make source optional, args required
* PluginFactory: threadsafe refactor of id duplicate tracking
* PluginFactory: make id extraction/geration more abstract/understandable
* PluginFactory: extract or generate ID when source not available
* PluginFactory: inject ExecutionContext before initializing plugins
* Codec: propagate execution_context and metric to clones
* Plugin: intercept string-specified codecs and propagate execution_context
* Plugin: implement `ecs_compatibility` for all plugins
* Plugin: deprecate use of `Config::Mixin::DSL::validate_value(String, :codec)`
2020-10-06 06:45:46 -07:00
Rob Bavey
15e2fdca40
Docker Build: Add ability to detect/set build architecture (#12302)
This commit adds the ability for the docker build to build artifacts for multiple architectures.
By default, the target architecture is inferred from the architecture of the machine the build is being
run from - running the build from an aarch64 machine will build an aarch64 docker image, while building
from an x86_64 machine will build an x86_64 docker image.

This can be overridden by setting the environment variable DOCKER_ARCHITECTURE to either `x86_64` or
`aarch64`.

This commit also updates the integration tests to test against the architecture from the machine the test
is being run on, and includes the target architecture in the test description.
2020-10-05 09:55:23 -04:00
kaisecheng
e8c3572053
fix dependency issue, jruby-openssl, of integration test (#12300)
* fix dependency issue, jruby-openssl, of integration test
2020-10-02 20:28:37 +02:00
Rob Bavey
c266470c2e
Add RedHat Univeral Base Image license information (#12287) 2020-09-30 11:13:50 -04:00
Rob Bavey
9fbfa578c0
Update license information (#12286)
Update the NOTICE.txt file with the latest versions of the gems included with
Logstash
2020-09-30 10:36:19 -04:00
andsel
c9309675a9 Bundle JDK (AdoptOpenJDK 11) in Logstash artifacts (ARM64)
Changed Linux creation artifacts (tar.gz/deb/rpm) to include the ARM JDK.
Extracted common parts of artifact.rake into functions to be shared between ARM and Intel bundling tasks
2020-09-30 00:24:13 -07:00
Karen Metts
e8ec60882d
Doc:Increase visibility of offline plugin support (#12283)
Elevates visibility of Offline Plugin Management section so that air gapped users 
don't have to struggle through instructions that require an internet connection.

Related: #12280
2020-09-29 17:00:30 -04:00
Rob Bavey
0aac7eb6d1
Update releases json after 7.9.2 release (#12281) 2020-09-29 10:39:56 -04:00
Karen Metts
26de2cee46
Doc:Clarify how Bulk API interacts with DLQ (#12209)
Documents both HTTP success and HTTP failure scenarios.  

Co-authored-by: Author: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2020-09-23 13:18:18 -04:00
Rob Bavey
5c7d5ac8c0 Bundle JDK (AdoptOpenJDK 11) in Logstash artifacts (x86_64)
Create new artifacts with bundled JDK for the supported platforms on x86_64. Download JDK packages from AdoptOpenJDK site, the selected version is loaded from `versions.yml`.
Changed also the launch scripts to give precedence to JAVA_HOME, then fallback on bundled JDK if present, as last resource go to the system Java.

New artifacts produced with bundled JDK are:
- tar.gz with JDK for Linux and Darwin
- zip file for Windows
- dep and rpm
- Docker image

All artifacts without JDK are now postfixed with '-no-jdk' while the ones with JDK included has the architecture extension.

Covered with tests the touched parts

Co-authored-by: Rob Bavey <robbavey@users.noreply.github.com>
2020-09-23 08:18:31 -07:00
Andres Rodriguez
60c80e0d51
Create PULL_REQUEST_TEMPLATE.md (#12182)
Adds pull request template to provide better information when creating a PR.
2020-09-22 16:26:22 -04:00
Rob Bavey
6a22b2b348
Update ubi8-minimal to pull from elastic docker registry (#12253) 2020-09-21 14:14:39 -04:00
andsel
153b69fd6c Added elastic-app-search and jwt license definition and notices 2020-09-17 02:39:10 -07:00
Rob Bavey
517b6ca114
Fix docker image certification (#12242)
This commit includes the required changes to pass RedHat docker image certification.
This includes:
 Moving license files to /licenses folder
 Adding required base labels for name, description, vendor and summary

Relates: https://github.com/elastic/dev/issues/1287
2020-09-15 16:21:31 -04:00
Luca Belluccini
b7a0d9f9a1
[DOC] Logging settings can affect performances (#12246)
Logging settings can affect performances
2020-09-15 16:03:54 -04:00
Rob Bavey
ab1ef2da2f
Fix keystore thread safety (#12233)
* Fix keystore thread safety

This commit is intended to fix thread safety issues with the  JavaKeystore implementation of the secret store.
From reading the code, it appears that thread safety for the keystore was intended to be provided by
a ReentrantReadWriteLock, a read lock for accessing secrets from the keystore, and a write lock for updating
secrets in the keystore.

In practice, this was insufficient, the act of accessing a secret from the keystore involved the mutation of
a shared keyStore object - the keyStore is `load`ed every time a secret is retrieved from the store.

Previous to https://github.com/elastic/logstash/pull/10794, this did not matter, each pipeline held its
own instance of the secret store, effectively meaning that only a single thread would ever access a key
store at any one time. This PR moved to using a shared keystore instance for substitution variables,
exposing the lack of thread safety in the JavaKeystore class.

This commit is intended to be the simplest change to fix the underlying issue, and does not address whether
we *need* to reload the secrets every time they are read.

Relates #12229
2020-09-10 15:26:12 -04:00
andsel
164a763d7e Fix to implement the blank? method that doesn't exists for String, is added by Rails framework 2020-09-04 07:29:04 -07:00
João Duarte
82739597d9
Update releases file since 7.9.1 is out (#12222) 2020-09-03 16:21:21 +01:00
Karen Metts
297a017ef7
Doc:Add redirect from multiline filter to multiline codec (#12208)
Add filebeat module use case

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2020-09-02 10:36:55 -04:00
kaisecheng
278c3c0872
Update README
add necessary environment variables in the setup instruction
2020-09-02 08:31:48 +02:00
Colin Surprenant
726061d5c5 fix flushing upon empty batches with ordered execution
when running a pipeline with ordered execution, flushes on the pipeline
were no longer being called when compute is called with an empty batch, causing
issues with the aggregate filter, for example, not being able to push events on
timeout.
2020-08-26 12:07:01 -07:00
Rob Bavey
b6b85e1a1e Add test for ordered pipeline flushing fix 2020-08-26 12:07:01 -07:00
Julien Mailleret
07ace8d0b9 fix ubi8 docker build context
This commit fixes a typo in the name of the docker build context for ubi8 images.
2020-08-26 08:16:50 -07:00
Andres Rodriguez
0d82bc064c
Docker: Expose xpack.management.elasticsearch.proxy (#12201)
Expose the proxy xpack management proxy setting in docker (xpack.management.elasticsearch.proxy).
Also surface the same proxy setting in the sample config.
2020-08-25 16:07:29 -04:00
Colin Surprenant
e8d1073bdd ensure input plugin close is called upon termination or pipeline reload 2020-08-21 08:08:21 -07:00
Drew Boswell
b47cdc33ec add ssl verification_mode to env2yaml 2020-08-21 07:28:12 -07:00
Karen Metts
616b573d3d Doc:Add note that stdin input doesn't allow config reloading 2020-08-20 15:15:33 -07:00
Rob Bavey
dd4ab61454 Limit locale changes to ubi8 container 2020-08-20 07:35:49 -07:00
Rob Bavey
ec2514d814 Minor fixes to acceptance and docker test scripts 2020-08-20 07:35:49 -07:00
Rob Bavey
1c675aa74b Add UBI8 docker image to artifacts
This commit adds the rake docker_ubi8 rake task, and associated
changes to the docker template and makefiles.

This commit also refactors the acceptance tests to extract xpack tests
into a helper class to allow the same tests to be used in both 'full'
and 'ubi8' docker image tests
2020-08-20 07:35:49 -07:00
João Duarte
363101bc8c
Updated new releases: 6.8.12 and 7.9.1 (#12187) 2020-08-18 15:41:37 +01:00
Ry Biesemeyer
5c36bc02f8 lir: inject newline delimiter only when necessary
Our internal representation of the composite config file needs only to inject
newline delimiters if they are missing, and to avoid doing so if they are
present. This allows `PipelineConfig#sourceReferences()`, used to map back from
the composite line/column to source file/column, to correctly track an offset
using the source fragments `SourceWithMetadata#getLinesCount()`.

Fixes: #12155
2020-08-06 11:11:47 -07:00
Ry Biesemeyer
e8d6ae5e4c test: no-op refactor to avoid repeating implementation in test 2020-08-06 11:11:47 -07:00
Ry Biesemeyer
95e386e415 perf: fix memoization of PipelineConfig#configString() 2020-08-06 11:11:47 -07:00
Joao Duarte
e6ec926f82 allow skipping pr creation in version bump script 2020-08-06 08:15:09 -07:00
Karen Metts
8a3a732061 Doc:Adjust link for integration plugin header file 2020-08-06 07:16:01 -07:00
Joao Duarte
b56a3d397b bump jruby to 9.2.13.0 2020-08-05 07:49:22 -07:00
Ry Biesemeyer
bba5e5dcc2 specs: don't start ES connection pool when only validating config
Accidentally succeeding at connecting to an HTTP resource that is not a real,
live Elasticsearch (such as an Elastic Cloud instance that has been shut down
and reaped) can cause client initialization to fail.
2020-08-04 02:24:59 -07:00
Karen Metts
7c6fca8425 Doc:Fix name of monitoring settings 2020-08-03 17:21:19 -07:00
Ry Biesemeyer
cc1f0242ed
Update releases metadata to point to current snapshots/releases (#12159)
Prevents build errors in plugins that rely on Elasticsearch snapshot packages
for integration tests.
2020-08-03 17:17:18 -07:00
Karen Metts
517923c15a Doc:Add monitoring and management to API key security content 2020-07-31 15:21:43 -07:00
Rob Bavey
2d1e6d968f
Introduce integration tests for docker images (#12135)
* Introduce integration tests for docker

This commit adds integration tests for the Logstash docker images. Previous
integration tests were removed in https://github.com/elastic/logstash/pull/10693,
due to the tests being non functional.

The commit adds image and container tests. The image tests check the contents and the
metadata of the image; the container tests check the logstash process, and includes tests
ensuring that logstash runs, and is configurable.

This test also adds a ci script to allow the tests to be run on jenkins, and to split the
running of these tests up based on the image type and includes updates to the rake tasks to
support this.
2020-07-31 14:34:40 -04:00
andsel
a73a4787a7 Remove settings that was intended to direct ship monitoring data to ES monitoring cluster
During the development of PR #11541 to direct ship monitoring data to an monitoring ES cluster without hopping through a production ES cluster, the settings for elasticsearch ouput was cloned into a version without the `xpack` prefix.
Since that feature has been removed the settings should also be removed from the Docker image
2020-07-30 02:22:28 -07:00
andsel
4a5b49830f Expose xpack.monitoring.elasticsearch.proxy setting as Docker env variable
In PR #11799 we missed to add the exposure of proxy also as docker env variable so that uses can connect the dockerzied Logstash to a proxed monitoring cluster
2020-07-30 02:21:39 -07:00
Karen Metts
c07deffacb Doc:Fix link to monitoring docs and tag optional features 2020-07-29 16:31:52 -07:00
Ry Biesemeyer
1c3d3b88fd reword bin/system_install help text to be less confusing.
Present OPTIONSFILE search in a way that reads first-match-wins, since that is
what actually happens.

Resolves: #12145
2020-07-27 14:21:56 -07:00
Rob Bavey
ef4ae8147e Fix docker image labels
Prior to this commit, the value of `org.label-schema.license` and
the values in `org.opencontainers.image.*` were not set, and therefore
would be inherited from the base OS image.
2020-07-23 12:48:59 -07:00
Joao Duarte
72cff96ce3 initial introduction of .fossa.yml
Although fossa has a fossa init tool to auto discover dependencies,
it doesn't work well for Logstash.

The mix of JRuby and Java allows for correct gradle detection but for
Ruby we tell FOSSA to look at the lockfile, which we generate using
ci/bootstrap_dependencies.sh

This is a work in progress and covers 99% of our dependencies.
As we get comfortable we'll have to uncomment a few ruby subprojects
contained in the logstash source tree.
2020-07-23 01:38:07 -07:00
João Duarte
25b7d84ff8 Document use of keystore values in pipelines.yml 2020-07-22 13:43:56 -07:00
Karen Metts
d9953c6d1d Doc:Create a new header for integration plugins
Integration plugins need a different header. For example, the plugin docs should
to point to the integration repo rather than the input, output, filter, or codec
repo. The new header also includes boilerplate text to indicate that the individual
plugin is part of an integration rather than stand-alone. This work implements needed
changes.
2020-07-20 12:23:34 -07:00
Joao Duarte
1d80d3aa5a add ci script setup dependencies
This script can be useful for preparing the environment for
services like code scanners.
2020-07-16 02:09:54 -07:00
Joao Duarte
e670cbf2d1 don't call runIntegrationTests from check gradle task
This is a temporary fix.
Currently the check task depends on the integrationt tests task,
which means all dependant tasks will be resolved even if they're just
registered instead of created.
This resolution is a problem because the downloadES task will fail
if, for the version we're building, Elasticsearch doesn't yet have a
build we can download.

So for now we'll remove this to unblock builds, but finding a way
to compartimentalize failures is needed going forward
2020-07-15 03:13:38 -07:00
Colin Surprenant
87df15d236 ignore default username when no password is set
fixes a regression introduced with the api_key support for xpack monitoring and management in #11864 which disabled the possibility to not use any authentication by relying on the default options and only enabling monitoring for example. It now ignores the default username option when no password is explicitly set.
2020-07-13 14:54:10 -07:00
Colin Surprenant
2afe60dbfc fix PipelineRegistry to avoid re-creating a pipeline in the process of being created
A pipeline in the process of being created was not marked as such in the pipeline registry resulting in a situation where a slow to initialize pipeline could be recreated on state convergence resulting in a PQ LockException because that pipeline was already existing and held the PQ lock. Replace native Java concurency with Ruby Mutex for simpler and straighforward implementation.
2020-07-13 14:48:44 -07:00
Colin Surprenant
62519acdef monitor worker threads exceptions to not crash logstash, just the failed pipeline
The worker threads were not correctly monitored for a worker loop exception resulting in a complete logstash crash upon any exception even when multiple pipelines are running. Now only the failed pipeline is terminated. If pipeline reloading is enabled, it is possible to edit the config and have that failed pipeline reloaded.
2020-07-13 14:48:44 -07:00
Rob Bavey
d706e50b27 [build] Ensure more gradle tasks using task avoidance API
Release Manager builds were failing as `downloadEs` task was being
needlessly run during `rake artifact:all` task. When run with
`RELEASE=1`. this was causing build failures due to the non-availability
of Elasticsearch release artifacts. This commit aims to avoid running
the `downloadES` task when it is not needed, continuing the work done
in #11914

This commit also removes code that was repeated in different parts of
the build script.
2020-07-13 13:39:00 -07:00
Karen Metts
f27b45d60c Doc:Add info on reserved fields in events
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Fixes: 11946
2020-07-13 12:25:34 -07:00
Rob Bavey
1c864b9974 Fix kafka setup scripts
This commit updates the kafka setup scripts to ensure that the kafka setup is clean between builds, by
setting an explicit zookeeper data directory to be cleaned each time, and correctly overriding `log.dirs`
instead of `log.dir` to ensure that the kafka logs are written and wiped in a consistent place each time,
which helps when using the non-immutable images used in arm64 tests.
2020-07-13 10:49:23 -07:00
Rob Bavey
0f5cdaee00 [build] Fix gradle typo
Inadvertent extra character causes aarch64 builds to fail.
2020-07-13 06:31:53 -07:00
Karen Metts
001cefcf86 Doc:Replace outdated pipeline viewer screenshot 2020-07-09 07:31:32 -07:00
Joao Duarte
616e600eb4 add dependency notice for amazing_print 2020-07-09 02:33:03 -07:00
DeDe Morton
f40d1faf73 [DOCS] Change links to refactored Beats getting started docs 2020-07-08 10:28:18 -07:00
Rob Bavey
61edaaffd6 [Build] Clear JAVA_HOME to use bundled JDK for Elasticsearch
This commit clears the `JAVA_HOME` variable when starting Elasticsearch
to force it to use the bundled version of the JDK, rather than the
default `JAVA_HOME` from the machine Logstash integration tests are being
run on, and removes the likelihood of tests failing to run due to `JAVA_HOME`
being set to a non-compliant JDK.
2020-07-08 06:01:42 -07:00
Joao Duarte
67eb27428c update jruby to 9.2.12.0
Also tweak the documentation since most of the add-opens are no longer needed, except:

java.io due to colinsurprenant/jruby-stdin-channel#1
java.security due to jruby-openssl
java.nio.channels, sun.nio.ch, sun.management and java.io from jruby: https://github.com/jruby/jruby/blob/9.2.12.0/bin/.jruby.module_opts

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2020-07-08 04:57:39 -07:00
Joao Duarte
23efb8dde4 ensure 'starting logstash' log entry happens first 2020-07-06 07:02:13 -07:00
Joao Duarte
b81b54d60d bump gradle to 6.5.1 2020-07-06 02:20:58 -07:00
Joao Duarte
fd0959e4cb update benchmark-cli dependencies
Updated elasticsearch only to 5.6.16 as 6.x introduced a deprecation in
the performRequest method and needs further refactor
2020-07-03 06:42:31 -07:00
Joao Duarte
6ff20ad502 make PQ and DLQ tests use less disk space
Many DLQ and PQ tests were run with default settings for their size,
or otherwise set to values such as 1GB.
This meant that the container/machine the test ran on needed a lot of disk space
(i.e. 1GB for the test + 1GB for OS and Logstash + some more free space).

This commit drops the disk space requirement overall by a factor of 10 (e.g. 1GB to 100MB)
2020-07-02 09:43:01 -07:00
Joao Duarte
0e033f9aa8 fix pipeline spec that didn't wait for pipeline to terminate
this test only called "pipeline.start" and expected an output to receive
the "do_close" method call. Therefore it relies on a race condition that
the pipeline shuts down quickly enough, which could fail.
This change ensures the pipeline fully terminated before making the
assertion

This commit also removes an unused let from the time when logstash
output plugins had workers.
2020-07-02 03:13:57 -07:00
Joao Duarte
5e1a08bbfc ensure pipeline terminates execution before doing assertion
This test relies on the generator input sending 10 events and observing
the output. Calling shutdown immediately after start can cause the
plugin to abort earily.
This change waits for the execution to finish before performing the
test assertions.
2020-07-02 03:11:31 -07:00
Joao Duarte
fd98f2e226 remove need for extra ShutdownWatcher thread
The creation of a Ruby thread from Java seems to be a trigger
for jruby/jruby#6207.

Pipeline#shutdown now blocks on the ShutdownWatcher#start, which will wait for
pipeline.finished_execution? to be true.
This removes the need for the pattern:
  `pipeline.shutdown { block } && pipeline.thread.join`
And can be replaced with just `pipeline.shutdown`

To avoid having `shutdown` blocked waiting for ready? when pipeline crashes too quickly,
this method returns immediately if finished_execution? is true.

Most uses of pipeline#run have also been replaced by pipeline#start
since the latter will block until the pipeline is ready, again avoiding
the pattern:
  `pipeline.run && sleep 0.1 until pipeline.ready?`

Pipeline tests have been changed according to these two changes.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2020-07-01 13:16:50 -07:00
Joao Duarte
c5a76a1ebe test improved cache reuse during generation 2020-07-01 01:58:08 -07:00
Joao Duarte
f44a3f85aa fix tests related to compiler cache due to reduced class generation 2020-07-01 01:58:08 -07:00
Joao Duarte
4c96422fff reduce Compiler Cache size to 100
The reduction from 500 to 100 is based on observations where 06d7f01fd
reduced the number of generated classes by about an order of magnitude
especially on very large pipelines (e.g. from ~600 to ~30).
2020-07-01 01:58:08 -07:00
Ry Biesemeyer
afd313b6b5 JEE: nix global compiler lock by normalizing to Dataset interface
Generated implementations of `Dataset` often have fields referencing
other specifically-generated `Dataset`, despite only using public methods
(`compute` and `clear`) defined on the `Dataset` interface.

By allowing the code generation to reference the interface instead of
the specific implementation, we eliminate the need for the compiler to chain
parent class loaders indefinitely, thereby eliminating the need for a global
mutual exclusion when compiling.

This change moves the locking semantics from the compiler to the non-evicting
cache itself, relying on tried-and-true `ConcurrentHashMap#computeIfAbsent`
to minimize synchronization and cache-priming stampedes.

This also vastly reduces the scope of `Dataset` implementations that we need
to generate, because datasets will no longer need to reference the specific
implementation details of all "downstream" datasets and will therefore be more
likely to match an implementation that has already been compiled and cached.
2020-07-01 01:58:08 -07:00
Rob Bavey
5fc70e31f2 Add wait functionality to stop_es integration test helper function
Integration tests may fail during elasticsearch teardown, as currently
the stop_es function sends a `SIGTERM` to Elasticsearch, but does not
wait for the process to exit. That can lead to issues when deleting
data directories from a still running process. This commit adds
wait functionality to `stop_es` to wait for a short period of time,
sending a `SIGKILL` if Elasticsearch does not terminate in time.
2020-06-30 14:07:01 -07:00
Colin Surprenant
454a856df8 do not call agent.converge_state_and_update before agent.execute 2020-06-30 11:14:26 -07:00
Colin Surprenant
12e7ab9d81 release queue dir lock upon exceptions while opening queue 2020-06-30 10:42:49 -07:00
Karen Metts
587ff6921f Doc:Add deprecation notice to legacy collection
Resolves: #11979
2020-06-26 15:52:40 -07:00
Ry Biesemeyer
c70da3fb5c
plugin config: support space-deliminated URIs on list-type params (#12051)
* plugin config: support space-deliminated URIs on list-type params

Since whitespace is illegal in URIs, we can safely use it as a delimiter when
validating `list`-type `URI` params, enabling the expansion of an arbitrary
list of URIs from a single Environment- or Keystore-variable.

Resolves: https://github.com/elastic/logstash/issues/8157
Resolves: https://github.com/elastic/logstash/issues/6366

* Doc: Create section for cross-plugin functionality and add space delimiters

Co-authored-by: Karen Metts <karen.metts@elastic.co>
2020-06-26 14:44:46 -07:00
Joao Duarte
a0ea282277 improve test for cache difference 2020-06-26 09:50:36 -07:00
Karen Metts
7637a29887 Doc:Add info on using api keys for access
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2020-06-26 08:24:51 -07:00
vijairaj
b0bf1f13d6
Ensure line codec can be found in example ruby filter (#12042)
Fixes elastic/logstash#12041

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2020-06-26 14:12:57 +01:00
Colin Surprenant
ffac2dfbdc Changed the assignment of plugin.id to load the value dynamically istead of hardcode
Changed ComputeStepSyntaxElement to generate Java code to retrieve the plugin's id by a method instead of hardcoding the value in the generated code.
This permit to share more compiled classes, that differs only by plugin.id and speed up the pipeline compilation.

The change has been secured by future regression with unit test that track pipeline compilations times.

Co-authored-by: Andrea Selva <andsel@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Fixes: #12031
2020-06-25 06:09:34 -07:00
Karol Bucek
5eb25dc40b Feat: ship log4j2 commons-logging bridge with LS
Having the jar around would allow us to fine tune logging for libraries
such as manticore's http-client (4.5) using LS's `log4j2.properties`
e.g.

```
logger.apache_http_headers.name = org.apache.http.headers
logger.apache_http_headers.level = DEBUG
```
... to log http headers for each request

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2020-06-23 02:39:29 -07:00
Lisa Cawley
ac6624923d
[DOCS] Fixes Stack Overview links (#12025) 2020-06-16 17:52:48 -07:00
Rob Bavey
5529998a85 Tests: Add support for alternative architectures
Enable filebeat and elasticsearch downloads to pull different
architectures, Filebeat and Elasticsearch use different suffixes
to denote their aarch64 architectures, with beats using arm64 and
elasticsearch aarch64
2020-06-16 08:12:00 -07:00
Rob Bavey
8df9d2c045 Use branch appropriate version of Elasticsearch
Carrying on from the work done in #11958, update the gradle build to download
the same version of Elasticsearch as is specified in the logstash version.yml file.
This commit updates the standard integration tests to use the same version of
Elasticsearch that is already downloaded for x-pack integration tests, and also
fixes integration tests to allow for the different responses around hits generated
by different versions of Elasticsearch.
2020-06-16 06:32:16 -07:00
Karen Metts
78c7204552 Doc:Add link to JVM section of support matrix
Add link to support matrix as official word on supported versions.
2020-06-12 08:00:16 -07:00
Joao Duarte
34f7151411 remove uses of JSON.load in favor or JSON.parse
JSON.load allows the creation of complex objects, and should not
be given untrusted input. This commit changes the only three uses
of JSON.load in the codebase, which aren't user facing or present
in bundled product, so not really an attact vector.
2020-06-12 07:48:05 -07:00
João Duarte
7df8a660ef
Drop dependency:bundler task (#12017)
This is already accomplished by the gradle task "installBundler".

Also make bundler 2 install more generic to not be stuck with 2.1.4
2020-06-12 14:25:15 +01:00
Joao Duarte
253acde71d retry on failed gradlew wrapper command in Dockerfile 2020-06-12 02:18:11 -07:00
João Duarte
d8b50deff3
update bundler to 2.x (#11994) 2020-06-12 10:17:02 +01:00
Colin Surprenant
757bf6b2ce
fix Settings equality test which broke the PipelineConfig equality (#12009) 2020-06-11 19:42:49 -04:00
Rob Bavey
2b0ae1aac9
Retrieve branch version of Filebeat via gradle (#11958)
This commit changes the download to pull the version of beats based on the version pulled from the branch rather than from an environment variable, or 6.5.4.
This commit also moves the download logic of Filebeat fromfilebeat_setup.sh to build.gradle in order to use the artifacts API in the same way as the downloadEs task, and does some refactoring to DRY up the artifact download tasks.
This commit also fixes the beats integration test to replace the use of a removed setting.
This commit also sets retries to 3 for the download tasks, using 'retries' functionality from gradle download task plugin
2020-06-11 11:27:10 -04:00
Colin Surprenant
0fe5305e79 add commented out options for api_key in logstash.yml 2020-06-10 13:49:42 -07:00
Karen Metts
9a7cca17f7 Doc:Add section and update JVM settings
This work breaks out the JVM setting info into a new section, and
expands and updates the content. It adds new subheadings to make
scanning the content easier.
2020-06-10 13:18:14 -07:00
Karen Metts
34ee17b0bf
Doc:Add section for conceptual info (#11715)
The LS reference needs a place to put conceptual info that transcends details for individual settings. This work creates and links the section, and adds content for pipeline ordering and Java pipeline initialization time.
2020-06-09 17:16:06 -04:00
Rob Bavey
891895b687 Add java8 to test matrix 2020-06-09 12:03:07 -07:00
Joao Duarte
11e61b1abf Revert "upgrade google-java-format to 1.8"
This reverts commit 2229468f11.

google-java-format 1.8 is Java 11 only, so we can't use it
as Logstash is supported on Java 8.
2020-06-09 11:00:33 -07:00
Joao Duarte
124e1e6abc remove explicit return from Mutex#synchronize in Plugin Registry
ruby produces a LocalJumpError: unexpected return
error if there's a return in a block so this changes just uses
the value of the last expression as the value of the block
2020-06-09 09:59:10 -07:00
Joao Duarte
2229468f11 upgrade google-java-format to 1.8 2020-06-09 09:58:36 -07:00
Joao Duarte
a7ae0d55e6 update log4j script routes definition
fixes the change introduced with https://issues.apache.org/jira/browse/LOG4J2-2647
2020-06-09 06:26:31 -07:00
Joao Duarte
c2659c3cfa update log4j dependency to 2.13.3 2020-06-09 06:26:31 -07:00
Joao Duarte
1ebf1b2b13 update commons-codec to 1.14 2020-06-09 06:26:31 -07:00
Rob Bavey
6712be9a58 Give more options for testing with ruby while waiting for port
Try system ruby, then LS_HOME/bin/ruby, then relative path from
script to LS_HOME/bin/ruby. Use LS_RUBY_HOME variable to avoid
testing again on subsequent attempts to wait for port.
2020-06-08 07:36:31 -07:00
Karen Metts
f3cb73f9eb Doc:Add section to security docs for API keys 2020-06-05 11:17:06 -07:00
Andres Rodriguez
7131313fc6
Adds matrix-runtime-javas.yml (#11973)
This adds the .ci/matrix-runtime-javas.yml file that defines all
the JDKs logstash could be tested against. This is meant to be
used for the Matrix Combinations Jenkins plugin to be able to
select which JDK to test against dynamically.
2020-06-05 11:46:04 -04:00
andsel
9ce1934d7b [Doc] better specification of the behaviour of in operator in various contexts 2020-06-05 08:18:19 -07:00
andsel
9005ea82ec [Doc] added description of xpack.monitoring.elasticsearch.proxy
After the merge of PR #11799 to expose the ES proxy configuration the doc should be aligned
2020-06-05 07:49:51 -07:00
Rob Bavey
680ca4519b
Add openjdk14 to windows build matrix (#11971)
openjdk14 appears to be the only version of java14 installed on jenkins windows
worker nodes, so use this instead of zulu14 and adoptopenjdk14
2020-06-04 13:50:57 -04:00
Rob Bavey
7b935bc7a1 Use BUILD_JAVA_HOME FOR JAVA_HOME in xpack integration tests 2020-06-04 07:33:52 -07:00
Andrea Selva
48eaec7622
Pass FEATURE_FLAG as Docker environment variable (#11922)
Some QA tests reads the FEATURE_FLAG environment variable, for example to test PQ functionality.
This PR passthrough the environement variable inside the Docker instance.
2020-06-04 15:55:02 +02:00
Andrea Selva
1bba3adecf
Exposed again the pipelines queue.data and queue.capacity subdocuments for _node/stats (#11923)
Avoid to reassing the subdocument for queue metrics preferring a merge
With PR #10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.
2020-06-04 15:21:51 +02:00
Colin Surprenant
f4ce80d956
add support for api_key authentication in xpack management and monitoring. (#11864) 2020-06-03 10:56:47 -04:00
Andres Rodriguez
d023734b54
Drop unnecessary os files from .ci (#11959)
This commit drops unnecessary .ci config files defining distros,
as it is not used. This also temporarily enables adoptopenjdk11
testing on Windows.
2020-06-03 10:05:39 -04:00
Rob Bavey
3bd95b11ff Disable flaky multiReceiveRecordsDurationInMillis test
Relates #11956
2020-06-02 14:00:44 -07:00
Colin Surprenant
0c38004bf3 display Java pipeline initialization time
Fixes #11749
2020-06-01 20:23:04 +00:00
Rob Bavey
e47426de3e
[Test] Set beats permission checking to strict=false (#11949)
When running filebeats integration tests on centos-7, the tests
fail due to permsisions checks on the temporary configuration file
created for the test. This commit sets strict permissions checks
to false in order for the tests to be able to succeed.
2020-06-01 14:40:18 -04:00
Rob Bavey
71a6a36b18
[Test] Fix service script execution when path includes && (#11944)
A previous commit attempted to fix this issue by adding Shellwords.escape to setup_script and teardown_script locations, but File.exists? returns false when called against a filename escaped by Shellwords.escape. This commit localizes the escaping to where the
file is executed.

This commit also adds Shellwords.escape to teardown script runner and the method used to execute logstash to retrieve version. This is to enable tests to run correctly when Jenkins creates execution environments with folders named with &&, eg centos-7&&immutable
2020-06-01 09:27:35 -04:00
Rob Bavey
81faf8e1dd
[Test] Enable fallback to sleep if nc not installed (#11942)
Fixture test scripts use `nc` to wait for the port to determine
whether a test fixture is up and running. This commit adds a fall
back option to use ruby if `nc` is not available - it is not installed
on Jenkins centos worker nodes.
2020-05-29 12:46:24 -04:00
Joao Duarte
d449fcf25a emit deprecation entry for netflow and azure modules
point users towards the beats modules instead
2020-05-29 15:26:23 +01:00
Rob Bavey
ac95667c11
Use task avoidance API in gradle scripts (#11914)
* Use task avoidance API in gradle scripts

This commit uses the task avoidance api (tasks.register vs task.create/
task DSL), as recommended since Gradle 5.1

This should reduce the execution of unnecessary tasks in build jobs, and
hopefully improve build resiliency and execution time.
2020-05-29 10:25:52 -04:00
Andrea Selva
678a78c705 merge 2020-05-27 16:24:48 +00:00
andsel
74b2153ccd Renamed os axis to label 2020-05-27 18:22:21 +02:00
Andrea Selva
78eb3b81f3 merge 2020-05-27 15:57:51 +00:00
Andrea Selva
9f56b468f2 merge 2020-05-27 15:28:33 +00:00
Rob Bavey
728251a43c
Fix prepare_offline_spec.rb test (#11933)
The 'prepare_offline_spec.rb' is failing due to a change in the warning message
from JDK11 to JDK14, and JAVA_TOOL_OPTIONS being passed in as an environment
variable by Jenkins, which was not happening before due to the dockerized
environment.
2020-05-27 10:53:10 -04:00
Rob Bavey
cdd37bfa83
Escape test fixture service scripts (#11931)
Escape test fixture service scripts to avoid test failures when run in
Jenkins using multiple yaml configuration files, which causes directories
to be constructed like `centos-7&&immutable` which cause issues with
the service runners cutting off directory locations before '&&'
2020-05-27 10:52:55 -04:00
Robert Bavey
cde02aaad0 merge 2020-05-26 17:28:17 +00:00
andsel
821f85e73f Fix integration tests related to logs when persistent_queue FEATURE_FLAG is enabled
Updated log4j definitions used when FEATURE_FLAG=persistent_queue is used.

Closes #11924
2020-05-26 18:40:32 +02:00
Rob Bavey
50816c6f1d [Tests] Ignore flaky testTimeCallable test
Flaky test issue #11925
2020-05-26 11:07:56 -04:00
andsel
5cfd3943c7 Added OSes definitions files to be used in compatibility test phases
To be unlinked from infra and made the selection of OSes that Logstash is tested against, the list is moved .ci specific yaml files.
By now the OSes are distinguished by Windows platform and by Linux distributions.

Separated selection of OSes in CI for compatibility and normal tests
2020-05-26 16:43:49 +02:00
Rob Bavey
c75260d5b5 Quieten down kafka teardown script
Kafka teardown script can exit with failure, typically when trying to
stop the broker. This commit logs the error code if the scripts fail
rather than crash out causing build failure.

Fixes #11905
2020-05-19 09:48:31 -04:00
Karen Metts
c86dafad5d merge 2020-05-19 00:28:45 +00:00
Karen Metts
12db1e8754 Doc:Replace cloud trial notice with attribute
Replaces free text with an attribute that pulls in shared content to
keep content up-to-date and consistent across documents.
2020-05-18 20:24:17 -04:00
Karen Metts
c4d1624ad9 merge 2020-05-18 22:39:42 +00:00
Rob Bavey
4ac8ae799f
Update logstash-releases.json (#11903)
6.8.9 and 7.7.0 have been released, update the list of releases
2020-05-16 08:38:00 +01:00
Andrea Selva
087f5357be
Zulu is Windows's preferred JDK, removed Zulu from Unix JDK matrix (#11898) 2020-05-14 16:21:02 +02:00
Karen Metts
b9082b91ba Doc:Add deprecation notice for azure module 2020-05-13 16:36:28 -04:00
Andrea Selva
7a66b08e17
Add: Zulu 14 for JDK testing under Windows OS (#11888)
Updated the list of JDK Logstash is tested against to include Zulu 14 under Windows OS
2020-05-11 16:27:31 +02:00
andsel
386c263a71 Fix: rounded to 1 second in nanos to avoid random NaN error
Conversion to seconds of values under 1_000_000_000 nanoseconds translates to value 0, and this led to NaN when used as denominator in a division.
A value of 996_920_400 nanoseconds once converted to seconds is not rounded to 1 second by to 0, this manifest on Windows OS
2020-05-11 14:23:52 +02:00
Joao Duarte
e2d48b4e61 download kafka from another mirror
the current mirror now refuses connections for the past 36 hours

Fixes #11887
2020-05-11 08:15:37 +00:00
Karol Bucek
196ec20f6d Fix: avoid gsub (frame dependent) usage from Java
`RubyString#gsub` requires a (Ruby) frame to be present.
The method attempts to set a backref for the current caller's frame.
When the frame stack is empty there isn't really a place to set $~.

This can happen when a LogStash::Util::Loggable#logger is retrieved,
from the input worker thread while not being nested in any block.

Fixes #11874
2020-05-07 18:00:23 +00:00
Andrea Selva
6a727ca168
Fix: chaining of GRADLE_OPTS (#11878)
Added test to avoid inserting and empty space in GRADLE_OPTS, and moved echo command outside of if to make it effective
2020-05-07 16:36:02 +02:00
Karol Bucek
413a7fe55e Performance: improve event.clone memory usage
for Strings with copy-on-write semantics when deep cloning.

motivated by "big" events reaching plugins such as split,
which might produce several new events out of a single one.

Fixes #11794
2020-05-07 14:10:28 +00:00
Andrea Selva
fb8108e63b
Fix: missed 'set' to assign environment variable and log it (#11869)
In batch shell to assign a variable we need set, else the shell interpreter log an error and continue

Close #11869
2020-05-07 09:12:27 +02:00
Karen Metts
d11b0491c7
Doc:Expand and clarify guidance for jvm settings (#11867)
Change fixed heap size recommendation to a percentage.
Note that large configs may require more stack space

Fixes: #11605 #11842
2020-05-06 17:41:08 -04:00
Rob Bavey
62454c6671
Remove obsolete setting from Elasticsearch integration test (#11873)
https://github.com/elastic/elasticsearch/pull/56211 removed the ability
to turn off certain features in Elasticsearch. This commit removes
the setting of `xpack.monitoring.enabled`, as this is now
obsolete.
2020-05-06 11:40:12 -04:00
Karen Metts
a839868b18 Doc:Rename internal collection to legacy collection
Fixes #11858
2020-05-05 17:42:24 +00:00
Andrea Selva
fa2fb6cfa9
Fix: condition to check environment variable was inverted (#11865)
To run unit tests with specific JDKs under Windows OS we have to check for the existence of BUILD_JAVA_HOME. The test logic was inverted

Close: #11865
2020-05-05 17:47:49 +02:00
Joao Duarte
2ea7bd43ec RUNNER: print RUBY_DESCRIPTION at startup to facilitate debugging
Often when browsing logstash logs for debugging purposes we miss the
information about the Java version and platform being used.

Printing the global RUBY_PLATFORM gives us all of this information
plus the JRuby version as well.

Fixes #11852
2020-05-05 15:32:24 +00:00
Rob Bavey
d35677aefa
Fail fast when integration test fixtures cannot be setup. (#11855)
* Fail fast when integration test fixtures cannot be setup.

Currently when integration test fixture setup fails, the tests proceed as usual,
resulting in noisy logs where the source of the error is not easy to discover.
This commit will raise an exception and log the exit status if the script fails to
setup or teardown.
2020-05-04 12:15:52 -04:00
Andrea Selva
d9f3d8b7db
Fix: missed 'equal' part in time comparison test (#11862)
In time comparison of LocalDateTime the isBefore is strict, so in case two instants has the same millisecond, it fails in test (happens in Windows tests)

Close: 11862
2020-05-04 17:19:09 +02:00
Edu González de la Herrán
0856f7ddc9
[doc] missing role for config management integration (#10341)
logstash_admin role is not enough.
As the ls-security page mentions correctly:
"The user you specify here must have the built-in logstash_admin role as well as the logstash_writer role that you created earlier"

Updates static settings for extra role needed

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2020-04-30 13:43:53 -04:00
Rob Bavey
6fab36c9d7 Update JrJackson and Jackson Databind versions
Update the versions of JrJackson and jackson databind to the
latest available versions

Fixes #11844
2020-04-29 18:10:09 +00:00
Andrea Selva
832d597278
Refactor: move PipelineConfig from Ruby to Java (#11824)
Reimplement the Ruby class PipelinceConfig in Java trying to keep the method signatures to limit the changes in client code, this is a step of other that intend to move all the configuration code in Java language.
Having all that code in Java unlock some reasoning about how to better implement it and probably an improvement in performance during process startup.
Moved also the spec into a JUnit and fixed here and there the failing tests

Closes: #11824
2020-04-29 18:16:49 +02:00
Rob Bavey
170f84d2a5
Rework monitoring to avoid using deprecated getSystemCpuLoad method… (#11786)
* Avoid using deprecated `getSystemCpuLoad` method with JDK14

JDK14 prefers the use of `getCpuLoad` over `getSystemCpuLoad`. This commit
reworks the call to use reflection to use the appropriate method call
depending on the version of the JDK being used.

* Added warning message if OperatingSystemMXBean not available
* Also corrected spacing after code review comments.
2020-04-24 10:39:27 -04:00
Andrea Selva
7273b00627
Added JDK 11 and 14 to Unix testing matrix (#11801)
- OpenJDK14 AdoptOpenJDK11 Zulu11
- OpenJDK14 AdoptOpenJDK14 Zulu14

Close #11801
2020-04-24 10:06:50 +02:00
Colin Surprenant
1dc88cc586 depend on the elasticsearch output plugin >= 10.4.2
Fixes #11830
2020-04-23 17:59:11 +00:00
Colin Surprenant
eed526e8ce remove plugin internal validation call
Fixes #11818
2020-04-23 17:44:19 +00:00
Karen Metts
6126e29043
[Doc]Remove new internal collection (#11823)
* [Doc]Remove new internal collection
2020-04-22 16:52:10 -04:00
João Duarte
0d127737aa
reinstate x-pack.monitoring settings in logstash.yml (#11822) 2020-04-22 15:28:47 +01:00
Ry Biesemeyer
de5888ba18 API: avoid starting webserver when http.enabled=false
In some workflows such as simple file manipulation, starting a webserver is
unnecessary overhead, and we should be able to avoid it.

Here we introduce a new parameter `http.enabled`, which defaults to `true` to
maintain the existing functionality.

Resolves: elastic/logstash#9408
Closes: elastic/logstash#11525

Co-authored-by: Benoit Dupont <benoit.dupont@gmail.com>

Fixes #11533
2020-04-21 20:08:46 +00:00
Joao Duarte
3481b38228 dont use qualifier or snapshot in logstash core version
Fixes #11813
2020-04-21 16:50:58 +00:00
André Letterer
bcb789d803 Update benchmark.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
4149f7eebd Update pqrepair.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
03c1ab94ff Update pqcheck.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
eccb59903f Update benchmark.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
902931cb85 tools convert to batch files (#11753)
Fixes #11754
2020-04-21 16:36:26 +00:00
Ry Biesemeyer
f1e301e0d7 settings: deprecate unit-less TimeValue values
We have "required" units for a variety of `TimeValue` settings when they are
provided as a `String`, but unquoted values in YAML have been passed through as
Integers, where we long assumed nanosecond units. This frequently leads to
surprise (e.g., when `config.reload.interval` is set to `60`, we consume 100%
of CPU in a tight loop trying to reload and re-parse the configs every 60
nanoseconds).

By making the setting retain the TimeValue object for the entirety of its
lifecycle, we can issue a deprecation notice the first time an Integer value is
encountered. As a secondary benefit, our usage of the setting value in code
becomes more clear since we are empowered to ask `TimeValue` for a numeric
value in a specific scale.

Fixes #11803
2020-04-20 16:15:49 +00:00
Laurent Huet
83f0ac4cd7 add proxy support (central management & monitoring)
Fixes #11799
2020-04-20 13:35:36 +00:00
Rob Bavey
df92df0237 Update kafka version for integration tests.
Fixes #11806
2020-04-17 21:00:07 +00:00
Karen Metts
832310690d
[Doc]Doc updates for internal collectors (#11789)
* Doc updates for internal collectors

* Incorporate review comments

* More review comments
2020-04-16 17:06:28 -04:00
Karol Bucek
afce87a67e Fix: cloud_id not propagating from monitoring config
Fixes #11800
2020-04-16 18:52:42 +00:00
Joao Duarte
6cc4de77e3 update guava and httpclient dependencies
Fixes #11791
2020-04-15 13:49:54 +00:00
Karen Metts
cda5f5d17e
Add redirects page (#11790) 2020-04-15 09:45:26 -04:00
Andrea Selva
6a74872d50
Moved code out of LogStash::Compiler to org.logstash.config.ir.ConfigCompiler 2020-04-15 12:21:39 +02:00
Karen Metts
0b58ca641b
Fix typo in pipeline ordered description (#11763) 2020-04-14 17:40:02 -04:00
Karen Metts
081ec78168
[Doc]Restructure monitoring docs to support new and legacy internal collectors (#11714)
* [Doc] added description of xpack.monitoring.collection.write_direct.enabled setting

* Added page to mark as deprecated the legacy internal collector and fixed all the `xpack.monitoring.*` references

* Included legacy collector file into monitoring overview

* Restructure monitoring docs

* Incorporate review comments

Co-authored-by: andsel <selva.andre@gmail.com>
2020-04-14 15:47:56 -04:00
Ry Biesemeyer
0b22b00893
support Environment and Keystore substitutions in password-type plugin options (#11774)
Resolves: https://github.com/elastic/logstash/pull/10583
Co-authored-by: Tyler Gregory <td.g@icloud.com>
2020-04-13 17:28:18 -07:00
Rob Bavey
2899c9f379 Handle Boolean Edges
Fixes #11779
2020-04-13 20:09:27 +00:00
Rob Bavey
830b6ce64e Remove separator vertices and associated edges from serialized output
The separator vertices are an implementation detail of the serialized
output of the LIR, and are not meaningful to the pipeline viewer.

This commit removes the separator vertices, and reworks the edges to
account for this.

Fixes #11779
2020-04-13 20:09:27 +00:00
Andres Rodriguez
2677de65d8 [doc] Change plugin name from java_sink to sink
In the docs templating, the plugin name is used to autogenerate a code example of how
to configure specific plugin. As such, if a plugin name is different from how you
configure it, this results in an example of how to configure this plugin with an
incorrect name.

This changes the java_sink plugin name to sink to correctly autogenerate the example.

Fixes: #11675, Fixes: #11214
2020-04-13 15:31:27 -04:00
Karen Metts
13ae7bb03a
[Doc]Note that unit qualifier is required for config.reload.interval (#11771)
* Note that unit qualifier is required for config.reload.interval

* Update description in logstash.yml
2020-04-13 14:48:03 -04:00
Rob Bavey
5e6065f414 Incorporate review comments
Fixes #11777
2020-04-13 14:11:07 +00:00
Rob Bavey
54c451f48d Fix hard coded constraint on pipeline name for metrics
Fixes #11777
2020-04-13 14:11:07 +00:00
João Duarte
3a84beda3d
remove :cluster_uuids gauge (#11628) 2020-04-13 09:36:11 +01:00
Ry Biesemeyer
70f4c3294f performance: share a single secret store
Loading a Java Keystore can take anywhere from ~0.3s to upwards of 3s, so the
pattern of loading one per variable we need to replace adds a significant
amount of overhead on pipelines that use these variables, whether or not they
are provided by the keystore.

By providing a private, constant, lazy singleton, we ensure that we don't
incur the cost of repeatedly building the keystore.

Fixes #10794
2020-04-10 15:41:17 +00:00
Andrew Pan
8793fb3c49
Update local.rb for pipe file (#11109)
Load pipe file for process communication

Co-authored-by: Andrew Pan <px2557@foxmail.com>
2020-04-10 09:52:12 +02:00
Andrea Selva
1971e9e8ee
Defined the versions of JDK to use in test build separated by OS (#11768) 2020-04-09 18:58:24 +02:00
Joao Duarte
de0b22f9cb release notes script add version in plugin entries
Fixes #11769
2020-04-09 12:55:57 +00:00
João Duarte
128bee592b
update benchmark cli dependencies (#11766)
also use jackson version in benchmark-cli from versions.yml
2020-04-08 14:55:17 +01:00
Rob Bavey
58314a7f0e
Update gradle version to 6.3 (#11742)
* Update gradle version to 6.3

Gradle versions prior to 6.3 cannot run under JDK14.
This commit upgrades the version of Gradle to 6.3, and removes all deprecation warnings that can currently be removed.

Changes include:
* Increase gradle memory to 2g
* Increase gradle memory in the license check job to 2g
* Replace use of `testCompile`
* Replace `runtime` with `runtimeOnly`
* Remove`compile` depedencies from gradle files
* Replace deprecated archive methods
* Fix dependencies report build
* Make jruby dependencies 'api', fix archiveVersion
* Set `duplicatesStrategy` for all tasks of type Copy
* Use `configureEach` for global 'withType' calls
** Use the recommended Tasks API calls
(https://blog.gradle.org/preview-avoiding-task-configuration-time)
* Run `./gradlew wrapper` earlier to improve caching
* Use copy with chown for resources that need to be run during `./gradlew wrapper`
2020-04-07 12:49:36 -04:00
Karen Metts
290daa45f3 Incorporate review comments
Fixes #11716
2020-04-03 17:02:23 +00:00
Karen Metts
284989f542 Add guidelines for setting jvm heap size
Fixes #11716
2020-04-03 17:02:23 +00:00
Colin Surprenant
5a25c6f8e9 simplify batch classes, do not compute JE empty batches, refactor RE worker loop (#11737)
cleanup RubyArray "rawtypes"
remove all LinkedHashSet from batch and queue classes
avoid processing empty batches in Java worker loop
cleanup AckedReadBatch and MemoryReadBatch
refactor Ruby worker loop similar to Java Execution to not use batch merge
remove QueueBatch merge and replace LinkedHashSet with ArrayList
2020-04-02 16:26:54 -04:00
Luca Belluccini
5de9b237e3 Better wording thanks to Andrea Selva
Fixes #11685
2020-04-01 13:09:13 +00:00
Luca Belluccini
b2332cb015 Clarify behavior in case of PQ full & isolator pattern
Fixes #11685
2020-04-01 13:09:13 +00:00
Karol Bucek
24d3348776 Refactor: avoid array in case of single event
while also making the array case cleaner & effective

(JRuby uses specialized array holder for 1 / 2 values)

+ Refactor: minor - use true/false constants directly
+ Refactor: do not allocate empty array

Fixes #11732
2020-04-01 07:37:02 +00:00
andsel
b2d1b880a6 Introduced JDK environment variable to explicitly pass the JAVA_HOME to use, expanded Xmx usable by Gradle
Fixes #11708
2020-03-30 10:53:18 +00:00
Colin Surprenant
dbca0b36a1
separate filter & output execution, rebatch after filter when ordered (#11710) 2020-03-27 15:36:23 -04:00
Karol Bucek
aa931661c6 Updated: JRuby to 9.2.11.1
Fixes #11723
2020-03-26 11:35:02 +00:00
João Duarte
d522a7cb30
bring back unicode trimmer for LogStash::Util (#11712)
this is used by the SNS output:
5b796a0095/lib/logstash/outputs/sns.rb (L98)
2020-03-23 15:11:54 +00:00
andsel
70da647f54 Simplified if..else if in PluginFactory for Java plugins part, moved to template method pattern
Fixes #11457
2020-03-20 09:43:43 +00:00
Karen Metts
8f665de926 Expand section on force reloading config
Fixes #11699
2020-03-18 13:12:33 +00:00
Colin Surprenant
9126fdb7e0
support quoted plugin option key (#11688) 2020-03-16 16:58:01 -04:00
andsel
86a3ab994c minor, used the correct placeholder
Fixes #11691
2020-03-16 16:35:04 +00:00
Mark Ramotowski
6486624ee7 Fixed typo in guage metric of unknown type log.
Fixes #11689
2020-03-16 09:19:28 +00:00
j-yama
c740b23375 Add sudo into the rpm import of GPG-KEY
Fixes #11684
2020-03-16 06:54:02 +00:00
andsel
4e4a3c6dad Added clarification that configuration force reload doesn't work on WinOS
Fixes #11520
2020-03-13 08:40:47 +00:00
Karen Metts
0336130030 Change default threads for azure module
Fixes #11664
2020-03-12 22:36:07 +00:00
Joao Duarte
53d4a78ce8 ensure mavencentral is always used before plugins.gradle.org
Fixes #11682
2020-03-12 12:04:54 +00:00
andsel
dfdc6f2aac Fixed flaky test, as fixed in packport PR #11641
Fixes #11679
2020-03-12 09:00:49 +00:00
Karen Metts
3ac8aa2df6 Update troubleshooting.asciidoc
Fixes #11545
2020-03-11 14:23:47 +00:00
andsel
64330abc51 Removed errored CLI flag description
Fixes #11545
2020-03-11 14:23:47 +00:00
andsel
850222475d Minor, added suggestion to switch on the log per pipeline
Fixes #11545
2020-03-11 14:23:47 +00:00
Karen Metts
edc5915b22 Add tips for troubleshooting a pipeline
Fixes #11545
2020-03-11 14:23:47 +00:00
João Duarte
e9c9865f40
Add apache and elastic license headers to source code files (#11673)
* add license header to ruby and java files
* add license header to erb and rake files
* add license headers to gradle files
2020-03-11 11:53:38 +00:00
Kris Reberger
b6d9bbefe9 Update to include verification mode switch
As of 6.4.1 (https://www.elastic.co/guide/en/logstash/6.4/logstash-6-4-1.html#logstash-6-4-1 and https://github.com/elastic/support-dev-help/issues/4770), we allow setting the monitoring and management ssl verification to either certificate or none, with certificate being the default.

Fixes #11674
2020-03-10 22:20:23 +00:00
Karen Metts
dddbab7270 Wording tweak for more emphasis
Fixes #10717
2020-03-10 21:22:04 +00:00
Ryan Earle
07312ec665 Update logging.asciidoc
Fixes #10717
2020-03-10 21:22:03 +00:00
meshkov
bb534acbea Update offline-plugins.asciidoc
Fixes #10912
2020-03-10 21:02:34 +00:00
Jonathan Bride
e29d8ef7e4 Fix grammar in enable_metric filter option
Description was a run-on sentence, so split into two.

Fixes #10841
2020-03-10 19:30:59 +00:00
0xflotus
f2d9da7e5a Update logging.asciidoc
- changed `2 seconds` to `2s` for consistency
- exchanged *trace* with *debug* time values and vice versa to be referable to the example above

Fixes #11671
2020-03-10 07:28:26 +00:00
Luca Belluccini
5a62a52249 Clarify reload of configuration files
Logstash is not watching or monitoring any configuration files used or referenced by inputs,
filters or outputs.

Fixes #11255
2020-03-10 05:45:23 +00:00
Karen Metts
fc20e9b913
Fix sv agreement (#11667) 2020-03-06 18:22:12 -05:00
Benoit Dupont
394854f481
Add more references to contributing issues (#11544) 2020-03-06 17:07:04 -05:00
Colin Milhaupt
385d98ebb4 Update proxy_support.rb
Fixes #9787
2020-03-06 18:59:42 +00:00
Karol Bucek
1553cf608e Changed: .ruby-version back to 9.1.12.0
.ruby-version is used to select the external jruby
(for package building + acceptance tests on infra)

reverts the upgraded JRuby version from #11647

Fixes #11663
2020-03-06 15:05:13 +00:00
Lisa Cawley
1aa7e9c235
[DOCS] Updates security API examples (#10752) 2020-03-05 16:01:34 -08:00
Rob Bavey
786d5851c2
Update Logstash release for 6.8 branch to 6.8.7 (#11659)
Released version of logstash for 6.8 branch was inadvertently changed
 to the next version on the 6.8 branch, rather than the latest released
 version.
2020-03-05 12:44:34 -05:00
João Duarte
8698ec068f
Update logstash_releases.json with 6.8.8 and 7.6.1 (#11658) 2020-03-05 13:58:18 +00:00
Karol Bucek
22d07520e4 Updated: JRuby to 9.2.11.0
- fix: deprecation warnings due JRuby 9.2.11
- fix: compat for upgraded RubyGems 3.0

Fixes #11647
2020-03-05 11:40:47 +00:00
Karol Bucek
81a339e746 Fix: use l/w match-ing (which does not depend on frames)
this was wrong on LS' end - String#match impl expects a frame (due $~)
... started failing due JRuby reducing frame usage (for blocks)

Fixes #11653
2020-03-04 16:39:10 +00:00
andsel
fc0ced5708 Fixed time format that introduced flaky tests depending on time
Fixes #11652
2020-03-04 14:53:29 +00:00
Karol Bucek
7b4808bd10 Fix: broken --help due sinatra 2.x upgrade
Fixes #11634
2020-03-03 21:00:10 +00:00
João Duarte
19bcb623fc Update rack dependency on docgen project
Fixes #11644
2020-03-03 13:57:35 +00:00
andsel
97d211012b Fixes JDK13's javadoc build failure
Fixes #11642
2020-03-03 09:58:37 +00:00
andsel
3695580b92 Adaptations to internal collector to send data directly to monitoring cluster Close 11573
Fixes #11541
2020-02-28 14:26:19 +00:00
Karol Bucek
307617e6a7 remove TODO from CONTRIBUTING notes
Fixes #11638
2020-02-27 17:30:59 +00:00
andsel
fc1ae6f119 Fixes #11598 enabling the users to use completely commented config files
Fixes #11615
2020-02-27 09:43:05 +00:00
Karen Metts
c47b232ee0 Remove deprecation notices
Fixes #11624
2020-02-26 20:00:38 +00:00
Karen Metts
6b586cd9aa Make capitalization consistent
Fixes #11629
2020-02-26 19:32:41 +00:00
lcawl
a42db55bbd Fixes out-dated monitoring links
Fixes #11629
2020-02-26 19:32:41 +00:00
Karen Metts
ce8971a70a Add shared attribute for cloud trial
Fixes #11621
2020-02-26 18:51:16 +00:00
Karen Metts
7cf67cacad Update contributing guidelines to clarify changelog formatting
Co-Authored-By: João Duarte <jsvd@users.noreply.github.com>

Fixes #11316
2020-02-20 17:39:12 +00:00
andsel
05fe308c64 Changed PluginFactory to resolve id field with environment variables docs: plugin ids variable expansion cannot use secret store
closes 10546

Fixes #11592
2020-02-20 08:57:46 +00:00
Karen Metts
3c8b803fdb Fix setting name for monitoring
Fixes #11597
2020-02-12 20:05:00 +00:00
Rob Bavey
704e247e32
Updated releases.json after 7.6.0 release (#11595) 2020-02-12 08:56:25 -05:00
Karol Bucek
b25be7432b Review: more places for RUBY.getCurrentContext()
Fixes #11587
2020-02-10 17:41:09 +00:00
Karol Bucek
d7caa7d3cc Review: more consistent getCurrentContext()
Fixes #11587
2020-02-10 17:41:09 +00:00
Karol Bucek
f4f1a61cbb Refactor: do not keep around JRuby context reference
there's no need for this and makes code base inconsistent
... also the original intent seems no longer relevant :

was introduced at 57e7a8a56b
> allows for a massive simplification for the invocation of filters and
outputs from the Java execution

Fixes #11587
2020-02-10 17:41:09 +00:00
andsel
e4c0f1aa69 Adding plugin.id to docker images
Fixes #11593
2020-02-10 16:22:21 +00:00
Karen Metts
2c9fb9e7b8 Clarify wording and add to another page
Fixes #11588
2020-02-06 18:01:27 +00:00
Karen Metts
ecfda1881a Add Apple notarization info
Fixes #11588
2020-02-06 18:01:27 +00:00
Karen Metts
5f50b7f18d Remove module-only disclaimer for cloud id
Fixes #11469
2020-02-04 19:38:26 +00:00
Colin Surprenant
8481bd0838
revert #11482 and fix redundant code generation (#11564) 2020-02-04 12:23:37 -05:00
Spencer Niemi
e09723efef Updating the log4j2.properties file that the Docker container image uses to also log the pipeline.id.
Fixes #11567
2020-02-04 16:49:32 +00:00
João Duarte
5fcab21194
update licenses for master (#11549) 2020-01-31 12:43:01 +00:00
Joao Duarte
a36fdb9050 fail license report job on missing licenses
Fixes #11554
2020-01-31 12:36:41 +00:00
tbotalla
6348a1cde8 Fix missing " on glob pattern
Fixes #11551
2020-01-30 16:16:55 +00:00
Karen Metts
17aeaccf3a Add deprecation notice to internal collectors for monitoring
Fixes #11526
2020-01-29 22:35:38 +00:00
Karen Metts
e8306b4921 Add details about pipeline.workers
Fixes #11474
2020-01-29 19:28:26 +00:00
Colin Surprenant
0bc9fa5665
add support for pipeline.ordered setting for java execution (#11524)
reuse rubyArray for single element batches

rename preserveBatchOrder to preserveEventOrder

allow boolean and string values for the pipeline.ordered setting, reorg validation

update docs

yml typo

Update docs/static/running-logstash-command-line.asciidoc

Co-Authored-By: Karen Metts <35154725+karenzone@users.noreply.github.com>

Update docs/static/running-logstash-command-line.asciidoc

Co-Authored-By: Karen Metts <35154725+karenzone@users.noreply.github.com>

java execution specs and spec support

docs corrections per review

typo

close not shutdown

Ruby pipeline spec
2020-01-29 14:01:38 -05:00
Karen Metts
13cf267ca0 Add info about deprecation logger support mixin
Fixes #11486
2020-01-29 17:18:46 +00:00
Dan Hermann
1d7df01df0 Ignore versions in dependency license checker 2020-01-29 13:32:37 +00:00
andsel
2925b491f9 Added precation notice when internal monitoring collector is used. Closes #11346
Fixes #11511
2020-01-27 15:06:46 +00:00
Joao Duarte
0c021d4f9d ensure lock template is in docker tasks
Fixes #11539
2020-01-27 09:48:37 +00:00
andsel
2162fb045b Updated README to document how to run single Ruby specs
Fixes #11536
2020-01-27 09:47:34 +00:00
andsel
3eb36bfa5e Added section for monitoring.cluster_uuid
Fixes #11538
2020-01-27 08:14:15 +00:00
Mike Place
020e87efc4 Add cluster_uuid setting to default config file, displaying it in Node stats HTTP API
Fixes #11106
2020-01-27 08:12:39 +00:00
andsel
6eb25173e0 Added plugin.id to fish tag log lines related to plugins
Fixes #11078
2020-01-23 15:33:31 +00:00
Fabien Baligand
80a91f9a76 fix java filter unit test link
Fixes #11519
2020-01-20 17:09:24 +00:00
Joao Duarte
d579bf4de5 pin google-java-format back to 1.1 for licensing reasons
Fixes #11515
2020-01-17 13:16:54 +00:00
Rob Bavey
d6b70f9631
Add link conversion from Markdown to AsciiDoctor (#11508) 2020-01-16 12:00:53 -05:00
Karol Bucek
d8398351a2
Feat: x-pack cloud id/auth for monitoring/management (#11496)
resolves #11488
2020-01-14 22:06:50 +01:00
Colin Surprenant
b5f203ce24
start inputs only when all WorkerLoop are fully initialized (#11492) 2020-01-14 15:46:48 -05:00
Rob Bavey
5c4d35343a Removes UBI7 docker code
Removal of code (#11335) to generate UBI7 based docker images, as this is not
being used for now

Fixes #11489
2020-01-14 14:04:54 +00:00
Colin Surprenant
4b29112efd
cache compiled datasets (#11482) 2020-01-13 12:52:58 -05:00
Karol Bucek
1bc0aeab34 Test: try to deal with (potentially) flaky spec
Fixes #11483
2020-01-13 10:22:01 +00:00
Rob Bavey
879ec5ba2b Update offline pack tests for integration plugins
Fix wildcard "logstash-filter-*" test
Add test for offline packaging of integaration plugins

Fixes #11406
2020-01-10 19:07:54 +00:00
Rob Bavey
a6369bce50 Replace references to JDBC plugins with integration plugins
Fixes #11406
2020-01-10 19:07:54 +00:00
andsel
8ccb24bf99 Changed plugin factory creation to use SourceWithMedata and not destructured line and column
Fixes #11456
2020-01-10 16:23:43 +00:00
Rob Bavey
f2ab8fefa8 Update JrJackson and jackson deps
Fixes #11478
2020-01-09 19:45:59 +00:00
Ry Biesemeyer
715295cdbe Update logstash_releases.json to include 6.8.6 and 7.5.1 releases (#11454) 2020-01-03 09:49:25 +00:00
Ioana Tagirta
c9b09bb369
Remove NodeStats#mem_payload (#9051) 2020-01-02 11:53:52 +01:00
Karol Bucek
abd4253708 Fix: SafeURI normalize and eql? to work as expected
normalize wasn't doing what was expected (URI.normalize)
also make sure SafeURI can be stored in Hash (proper eql?)

Fixes #11443
2019-12-31 10:06:40 +00:00
Karol Bucek
18af2d2c67 Test: get_thread_id (native thread being gc-d)
Fixes #11458
2019-12-30 13:04:16 +00:00
Karol Bucek
7b4e3585bc Fix: (move and) make get_thread_id "nil safe"
necessary since native (Java) thread is kept as a weak ref
so un-wrapping should deal with a potentially GCd instance

resolves GH-11450

Fixes #11458
2019-12-30 13:04:16 +00:00
Karol Bucek
b9fb9a7063 Refactor: minor one sub-stitution should do
Fixes #11458
2019-12-30 13:04:16 +00:00
Karol Bucek
850d270703 Refactor: we're always on JRuby these days
(other part of same method assume JRuby already)

Fixes #11458
2019-12-30 13:04:16 +00:00
andsel
71eed80d3c Fixes to JMH launch after upgrade to Gradle 5
Fixes #11459
2019-12-30 10:43:44 +00:00
Karol Bucek
a7cf23d9e8 Test: Java proxied QueueReadClient unwrapping
Fixes #11391
2019-12-22 22:06:08 +00:00
Karol Bucek
af3513dfba Changed: avoid JavaObject wrapping in Ruby methods
aligns the Ruby/Java returns as they happen in scripted Java
e.g. as `java.lang.Thread.new` returns a JavaProxy instance

there's really no reason to use JavaObject which always needs `to_java`
conversion to be useful (and is considered legacy in JRuby).

considered breaking change e.g. `LogStash::MemoryReadClient#read_batch`
will now return a proper JavaProxy instead of the JavaObject

Fixes #11391
2019-12-22 22:06:08 +00:00
Karol Bucek
5fd5fb2db2 Test: a lengthy real-world cloud-id test
Fixes #11435
2019-12-12 21:12:30 +00:00
Karol Bucek
3cbe7e922a Fix: handle cloud-id with an empty kibana part
fixes GH-10747

Fixes #11435
2019-12-12 21:12:30 +00:00
Colin Surprenant
702efea88f test codec against class name string to prevent class equivalence bug with a Delegator
Fixes #11401
2019-12-12 17:14:39 +00:00
andsel
71e702c16c Covered the read of logfile content with try-resource to avoid to keep a file descriptor open that later prohibited access to the process itself. Also added clean shutdown of LogManager before deleting log files used by log.
Fixes #11399
2019-12-12 16:00:18 +00:00
Joao Duarte
7f5aa186c1 remove use of thread.exclusive in plugin_metadata.rb
Fixes #11388
2019-12-10 19:43:29 +00:00
Joao Duarte
526a8f89ad introduce enterprise license level
Fixes #11407
2019-12-10 12:31:16 +00:00
Joao Duarte
3294a4be61 refactor list of license_types
DRY up the list of license types as there were 10 places that listed the types explicitly

Fixes #11407
2019-12-10 12:31:16 +00:00
João Duarte
557e287966
[gradle] add rootProject.name (#11400)
Since Logstash may not be cloned into a “logstash” directory (e.g. on Windows ci we mount it as A:/) gradle needs to be told the name of the top level project.
2019-12-06 21:52:02 +00:00
João Duarte
e807a9e030
Update gradle wrapper to 5.6.4 (#11389)
* upgrade gradle wrapper to the latest 5.x release
* update shadow plugin to 4.x for gradle compatibility
* change dependency declaration to work around [breaking change in annotation processing](https://docs.gradle.org/current/userguide/upgrading_version_4.html#rel4.6:annotation_processor_configuration)
2019-12-06 15:39:17 +00:00
Karen Metts
19605c8f1d Remove ref to encrypted communications
Fixes #11398
2019-12-06 14:49:11 +00:00
Joao Duarte
e48e06d31a setup jruby and bundler/rake before artifact rake tasks
Fixes #11392
2019-12-04 19:36:24 +00:00
andsel
4993c37e02 Changed the deletion of log files to use retry mechanism and avoid flaky errors on Windows builds (related to #11307)
Fixes #11387
2019-12-04 10:50:37 +00:00
João Duarte
cbfc945d74 Disable flaky test "should include the http address"
follow up at https://github.com/elastic/logstash/issues/11385

Fixes #11386
2019-12-04 10:13:43 +00:00
Karen Metts
1c6c6f11b6 Add default edit_links to pages
Fixes #11384
2019-12-03 19:44:32 +00:00
Rob Bavey
830e49a159 Add UBI based docker images
This commit adds support for images based on UBI7 base image

Closes #11265

Fixes #11335
2019-12-03 13:51:49 +00:00
Karol Bucek
84347a1518 Changed: base-line JRUBY_OPTS to default to --dev
Fixes #11355
2019-12-03 10:51:44 +00:00
Karol Bucek
5d408cdc09 Refactor: avoid ThreadContext retrieval + use Ruby API
- thread-context isn't needed - only the runtime is really used
- native Ruby types do not need to pass through Java coercion

Fixes #11365
2019-12-03 10:50:17 +00:00
Karol Bucek
27455f9dd5 Build: fix bundle bin path in bundler task
follow-up on d65f78728b

Fixes #11381
2019-12-03 10:37:51 +00:00
Lisa Cawley
3446b84df6
[DOCS] Replaces occurrences of xpack-ref (#11366) 2019-12-02 16:53:02 -08:00
João Duarte
f078458ab5
Update logstash_releases.json (#11364)
Updates:

* 7.x to 7.5.0
* 7.x snapshot to 7.6.0-SNAPSHOT
* 6.8 to 6.8.5
2019-12-02 17:04:45 +00:00
Joao Duarte
d65f78728b stop installing rake and json on every bootstrap
Fixes #11102
2019-12-02 14:59:43 +00:00
Karol Bucek
6e048d5b5b Fix: do not leak ThreadContext into the system
this is fairly recent - since 7.4 (added in GH-11075)

there's a risk plugins would assume ThreadContext to
exist or collide the 'global' constant - usually best
to import where the Java class actually gets used ...

Fixes #11356
2019-12-02 11:21:05 +00:00
Karen Metts
46f2618b61 Incorporate review comments
Fixes #11331
2019-11-27 15:55:10 +00:00
Karen Metts
6c204bd2da Add plugin integrations to doc
Fixes #11331
2019-11-27 15:55:10 +00:00
João Duarte
b6a8af2d45
bump sinatra and rack to 2.x (#11354) 2019-11-27 15:09:55 +00:00
lcawl
e9ee1fd67c Fixes monitoring link
Fixes #11341
2019-11-26 17:24:38 +00:00
João Duarte
ff527a01cd Remove license header from pipelines_info.rb
This code was moved to the apache 2.0 license part of the distribution and should not have the license header any more

Fixes #11345
2019-11-26 14:02:28 +00:00
andsel
e9ac2e4b69 Changed GemInstaller to don't blank gemspec attribute, close 11325
Fixes #11340
2019-11-26 11:27:08 +00:00
Colin Surprenant
41b4cbdde8 support remove_field on metadata and tests
Fixes #11334
2019-11-25 21:29:00 +00:00
andsel
2a25547fbc Changed the xpack metrics pipeline to use a customized ES output plugin to put document_type for /_monitoring, closes #11312
Fixes #11321
2019-11-21 16:10:01 +00:00
Joao Duarte
2d8ac8b95a remove leftover jruby version check in spec file
Fixes #11333
2019-11-21 13:46:14 +00:00
Colin Surprenant
17575f32ba remove JRuby resolv.rb patch following fix in 9.2.9.0
Fixes #11330
2019-11-21 09:59:18 +00:00
Joao Duarte
0924e97da4 update jruby to 9.2.9.0
Fixes #11281
2019-11-21 09:36:29 +00:00
andsel
7fb01b7e3b Fixed: avoid touch of log files before deleting it (issue #11307)
Fixes #11311
2019-11-19 14:59:50 +00:00
Dan Hermann
36f07402ce correct directory for versions.yml file
Fixes #11318
2019-11-19 14:36:01 +00:00
Ry Biesemeyer
4c8370b329 Integration plugin docs support (#11315)
* docgen: no-op refactor bringing plugin types list out of regexp

* docgen: add integration plugins for plugin discovery
2019-11-19 09:30:05 +00:00
Karen Metts
dbef070bc7 Remove xls settings page
Fixes #11319
2019-11-18 22:57:56 +00:00
Karen Metts
4b47f28e40 Restructure configuration content
Fixes #11310
2019-11-18 20:39:46 +00:00
andsel
f554930e81 Introduced DeprecationLogger for use in core code and exposed to Java and Ruby plugins. Closes 11049
Fixes #11260
2019-11-14 10:49:27 +00:00
amitav.mohanty
b99c2f956d Mention the path of DLQ to indicate DLQ if full for which pipeline
Fixes #11280
2019-11-13 15:54:52 +00:00
Rob Bavey
ef9b0d2db5
Update elasticsearch gem dependency requirements (#11258)
Currently, the version of the elasticsearch gem bundled with Logstash
 requires the type field to be set, which is incompatible with
 Elasticsearch 8.x after types were removed.
2019-11-13 08:15:26 -05:00
Rob Bavey
a6afa59123
Update Logstash releases (#11300)
Updating, as this is missing out on the latest 6.8 and 7.4 releases
2019-11-12 12:08:26 -05:00
andsel
aad25d9bbc Drop _xpack namespace for ES security and license endpoints
Fixes #11297
2019-11-12 16:49:45 +00:00
Joao Duarte
4dcf53cbde don't rely on expect match and last_match in qa test
Fixes #11273
2019-10-31 09:14:07 +00:00
Joao Duarte
29bf73300c dont mutate SETTINGS object in keystore specs
Fixes #11270
2019-10-25 14:18:33 +00:00
Joao Duarte
fc30277843 remove logging setting in cgroup_spec.rb
Fixes #11271
2019-10-25 10:24:28 +00:00
Joao Duarte
d4990fd6f5 improve reliability of webserver port binding
use "127.0.0.1" instead of "localhost" to avoid binding to ipv4 and ipv6
don't assume port 10006 will be open in the machine
rely on the ranges and the actual bound port for the assertions

Fixes #11263
2019-10-24 08:00:38 +00:00
Karen Metts
3505271f6f Remove edit_me link overrides for monitoring topics
Fixes #11259
2019-10-23 13:49:49 +00:00
João Duarte
a160c1d08d Update logstash-core/build.gradle
Fixes #11103
2019-10-23 13:14:39 +00:00
Joao Duarte
3992e66841 update jar dependencies
Fixes #11103
2019-10-23 13:14:39 +00:00
Joao Duarte
e7bbc5819d update core jars. remove dependency on org.eclipse
Fixes #11103
2019-10-23 13:14:39 +00:00
João Duarte
fb0bf43690
upgrade puma to 4.x (#11241) 2019-10-22 11:55:33 +01:00
Joao Duarte
ab7d9ca49c Revert "Update .ruby-version to jruby-9.2.8.0"
This reverts commit 89479e00fb.

Fixes #11248
2019-10-19 14:22:41 +00:00
lcawl
63c60622ff Fixes links to Stack Overview
Fixes #11239
2019-10-18 18:19:49 +00:00
Joao Duarte
bec396e5e8 ensure output of plugin list is utf8
Fixes #11246
2019-10-18 16:52:51 +00:00
João Duarte
10d62f0168 Disable dlq integration tests due to multiple intermittent failures
Fixes #11244
2019-10-18 16:09:25 +00:00
João Duarte
4f902b435c
Remove unused code (#11231)
* remove unused certificate bundles and ruby files
* remove chronic_duration dependency
2019-10-18 16:08:53 +01:00
andsel
f3fac29d55 Fixes intermittent failing build due to Puma server going down bad on shutdown request
Fixes #11242
2019-10-18 11:28:45 +00:00
Ry Biesemeyer
2854132ce8 validate plugin list output respecting integration plugins
Fixes #11240
2019-10-18 08:54:33 +00:00
Karen Metts
d1613ad926 Fix typo in doc-for-plugin
Fixes #11232
2019-10-17 16:05:05 +00:00
Joao Duarte
1e461dee22 more resilient testing of logging level setting
Fixes #11230
2019-10-17 13:04:14 +00:00
andsel
4621a0a798 Fix to avoid Nashorn error regarding the unknown flag --no-deprecation-warning for JDK < 11. closes 11221
Fixes #11225
2019-10-17 10:46:23 +00:00
Ry Biesemeyer
f6fa136b84 plugins: replace kafka input/output with integration
Fixes #11218
2019-10-16 01:46:49 +00:00
Ry Biesemeyer
984ecf6a9f plugins: replace rabbitmq input/output with integration
Fixes #11218
2019-10-16 01:46:49 +00:00
Ry Biesemeyer
c20234bff5 doc: replace unicode non-breaking hyphen U+8211 with ASCII hyphen
Fixes #11217
2019-10-15 18:37:41 +00:00
Ry Biesemeyer
7f90040b9b make pipeline grammars more accurately capture field references
Certain malformed field reference literals (e.g., those containing a series of
multiple open-brackets `[[`) were propagated undetected by the parser, only to
create a crashing error when used.

Starting Logstash with the `--config.test_and_exit` flag (or `-t` shorthand)
would validate the config, even though it could not be used in practice.

By updating the grammar(s) to exclude the use of an open square bracket (`[`),
we more closely match the formal grammar and ensure these malformed literals
are rejected closer to the source.

NOTE: this PR only affects field reference _literals_, and does not resolve
a similar issue with field references in quoted format strings.

Resolves: https://github.com/elastic/logstash/issues/11022

Fixes #11195
2019-10-15 16:54:48 +00:00
Ry Biesemeyer
61dfb087df regenerate config parsers from unmodified grammar definitions
`touch logstash-core/**/*.treetop && ./gradlew compileGrammar`

Fixes #11195
2019-10-15 16:54:48 +00:00
Ry Biesemeyer
8f471e3f68 add tasks for generating config parsers
Fixes #11195
2019-10-15 16:54:48 +00:00
Sachin Frayne
4dfe493a45 syntax fix
Fixes #11220
2019-10-15 11:07:14 +00:00
João Duarte
7a62b2da8e replace YAML.parse with YAML.safe_load in release tool
YAML.parse returns Psych nodes that then need to be converted to plain ruby objects.

Calling YAML.safe_load outputs basic ruby objects already and also increases security as it greatly restricts the classes it deserializes.

Fixes #11208
2019-10-11 13:09:06 +00:00
João Duarte
89479e00fb Update .ruby-version to jruby-9.2.8.0
Fixes #11198
2019-10-11 07:57:21 +00:00
Karen Metts
5a1c0dae14 Update reference to last 6.x version to be 6.8
Fixes #11200
2019-10-10 17:07:33 +00:00
Karen Metts
3882d84200
Remove leftover tags (#11201) 2019-10-10 13:06:04 -04:00
Joao Duarte
a3e7e9f315 handling missing gems during generatePluginsVersion
Fixes #11207
2019-10-10 13:28:17 +00:00
João Duarte
ec16c49741 remove 10k character truncation from log4j2.properties
Quite often we see log entries that are truncated by this limit since java stack traces can be very verbose.

This prevents us from seeing the real issue and require us to ask for users to remove the limitation and trigger the issue again so we can see the full problem.

This commit removes this truncation.

Fixes #11206
2019-10-10 10:28:24 +00:00
Karen Metts
526d1aaf76 Add remaining review comments from #11033
Fixes #11197
2019-10-09 19:50:51 +00:00
andsel
53c04ce325 Added section in logstash.yml documentation to describe feature
Fixes #11177
2019-10-08 14:13:26 +00:00
andsel
e58a6e01ce Added LS configuration variable 'pipeline.separate_logs' to separate logs per pipelines - use log4j RoutingAppender - avoid output to main log files when log per pipeline is enabled - closes 10427
Fixes #11108
2019-10-08 14:07:17 +00:00
Jason Tedor
e86cd4ebc9 Clarify monitoring hosts should not be master-only
This commit clarifies that Logstash monitoring metrics should not be
routed through master-only nodes, and should instead prefer coordinating
nodes.

Fixes #11194
2019-10-05 00:00:49 +00:00
Karen Metts
bcaf4788d5
Add metricbeat as monitoring option (#11033)
Restructure content

Restructure source files

Incorporate review comments

Incorporate more review comments and fix links
2019-10-03 18:39:20 -04:00
Andrew Siegman
e77ec793b5 clarify: config.reload.interval is seconds
Fixes #11180
2019-10-03 21:55:26 +00:00
João Duarte
7f4b0210b9
Update releases manifest (#11187) 2019-10-03 15:27:58 +01:00
Lisa Cawley
533d5c169d
[DOCS] Fixes links to monitoring content (#11166) 2019-09-30 08:58:11 -07:00
Rob Bavey
a4ac5cce52 Update version of jrjackson
0.4.10 includes multi-threading improvements

Fixes #11164
2019-09-26 13:21:41 +00:00
Karen Metts
3c88b802f6 Add note about illegal reflective access
Fixes #11152
2019-09-19 20:56:56 +00:00
Joao Duarte
af7e047fbf remove mention of pipeline to pipeline being Beta
Fixes #11150
2019-09-19 10:05:19 +00:00
Karen Metts
ddbfba32e1 Deprecate LS Netflow module and point to FB Netflow module
Fixes #11113
2019-09-16 18:49:22 +00:00
Karen Metts
3d2daca5d8
Update logstash to use shared version files (#11125)
Remove release-state info
2019-09-12 20:16:07 -04:00
Kuba Clark
c0b93defa2 Fixed links in contributing-to-logstash page
Fixes #11126
2019-09-12 21:32:34 +00:00
andsel
0e622cc744 Added origins of pipeline's configuration (es config string, the paths of config files used, module).
closes 9630
2019-09-12 16:02:36 +02:00
Pavel Zubkou
2360d0f72a Update link to Debugging Java Performance
Fixes #11084
2019-09-04 14:44:06 +00:00
Colin Surprenant
974da8c4bb use 2048 bits key
Fixes #11115
2019-09-03 21:03:32 +00:00
João Duarte
28345e8caf
Improve warning about UDP/TCP not having app level acks 2019-09-02 12:19:52 +01:00
Joao Duarte
10f9b9e5c8 support substitutions in pipelines.yml file
Fixes #11081
2019-08-30 14:02:59 +00:00
Joao Duarte
47fc8e7c4d give multiple pipelines all the settings
Previously we'd only give a pipeline the settings related to pipelines
The PipelineSettings class was used for this.
However a pipeline may need other settings like the keystore location.

For this we instead clone the settings object and merge all the pipeline
specific settings. This is accomplished with a new method that ensures
that only pipeline level settings are overwritten in the clone.

Fixes #11076
2019-08-30 11:20:35 +00:00
andsel
cda592f659 Add pipeline.id to log lines
fixes #8290, #10521
2019-08-28 17:57:28 +02:00
Dan Hermann
398e64e2eb Write generated Java files to disk only if debug flag is set
Fixes #11082
2019-08-28 14:24:12 +00:00
Peter Dyson
b66329f8ab hint plugins need to be installed before bundle
Fixes #11080
2019-08-26 08:58:28 +00:00
João Duarte
92fecc6046
bump 7.x release to 7.3.1 (#11077) 2019-08-23 16:25:43 +01:00
Nik Everett
64c2889544
Docs: Fix formatting in table (#11016)
Fixes formatting in a table cell in `logstash-monitoring-overview.html`.
A `+` which was required by AsciiDoc was leaking into the output when
the doc is built with Asciidoctor.
2019-08-22 15:18:29 -04:00
Dan Hermann
a0e521488d Use correct execution engine for test-and-exit mode
Fixes #11067
2019-08-21 17:40:55 +00:00
Nik Everett
169a04d55d
Docs: Fix backticks in how to docs (#11018)
In the "methods" sections of the how to develop a plugin docs
Asciidoctor as incorrectly passing backticks into the output when it
should have marked the words surrounded by backticks as code. I'm not
100% sure why it did that. The fix is to force macro evaluation
immediately on attribute assignment.
2019-08-21 09:07:12 -04:00
Dan Hermann
ed91408ffd Integration test for Java plugins
Fixes #11054
2019-08-20 19:22:06 +00:00
Rob Bavey
006bd481ff Fix misleading log message
Fix DLQ error log message incorrectly referring to PQ.

Fixes #11063
2019-08-20 15:36:29 +00:00
Aaron Mildenstein
67abdfea85 Add missing "create" privilege to documentation
Users following our documentation are frustrated to discover that they get 403 errors from Logstash, even when following the instructions to the letter.  The problem is that the `create` privilege is missing. With this in place, it works as designed.

These changes may need to be back ported to previous branches, too.

Fixes #11013
2019-08-20 15:27:04 +00:00
João Duarte
12b0987ecc
avoid variable collision in pipeline stats api (#11059) 2019-08-20 15:47:52 +01:00
amitav.mohanty
4d36bb06a3 Improved logging of version mismatch in DLQ file reader (RecordIOReader)
Fixes #11039
2019-08-16 12:50:22 +00:00
Dan Hermann
2646f617bc fix javadoc warning
Fixes #11046
2019-08-13 21:18:25 +00:00
Dan Hermann
dae3eecca5 Expand config variables for Java plugins
Fixes #11043
2019-08-13 19:36:41 +00:00
João Duarte
e44ec7ad41
update jruby to 9.2.8.0 (#11041) 2019-08-13 07:45:42 +01:00
Rob Bavey
f5e76034c9 Update jrjackson, jackson versions
Also splits out jackson and jackson databind versions to allow separate revisions
 for databind.

Fixes #11040
2019-08-12 18:08:22 +00:00
Mike Place
f5f2173c6a
Enhanced API testing (#10972)
* Starting to audit tests

* Additional field checking in stats

* Add epehemeral id

* More tests

* Test new structure of pipeline report

* Add default_metadata testing

* Add node command tests

* add jvm

* test no mutate

* Add check for graph flag

* Break apart test per review suggestion

* Remove test that doesn't test much
2019-08-12 12:05:28 +00:00
Dan Hermann
25744d16e8 support truthy eval of constants
Fixes #11032
2019-08-09 17:23:55 +00:00
Dan Hermann
c60d5e326a fix compilation of [field] in [field] event conditions
Fixes #11026
2019-08-08 20:02:24 +00:00
Dan Hermann
3a84d46a32 add regex support for constant conditionals
Fixes #11017
2019-08-06 10:30:10 +00:00
João Duarte
1882ce0df5
update releases file (#11009) 2019-07-31 17:04:43 +01:00
Rob Bavey
2f9a76073a Bump releases.json file for 7.2.1 (#10998) 2019-07-31 12:57:19 +01:00
Dan Hermann
76a35971d0
Update for 6.8.2 release (#11005) 2019-07-30 11:37:26 -05:00
Nik Everett
235755ce76
Docs: Add more missing subs for asciidoctor (#10991)
Adds a few missing `[attributes="subs"]` clauses for asciidoctor.
2019-07-24 15:02:46 -04:00
Ry Biesemeyer
3e3a061a5e update Jinja2 docker dependency
Fixes #10986
2019-07-23 21:20:20 +00:00
Colin Surprenant
696323f26a make sure joni regexp interruptability is enabled
Fixes #10978
2019-07-22 16:22:32 +00:00
Karen Metts
cc260baa67 Incorporate review comments
Fixes #10977
2019-07-22 14:12:28 +00:00
Karen Metts
3635ce87ed Prepare core plugin docs for inclusion in LS ref
Fixes #10977
2019-07-22 14:12:28 +00:00
Rob Bavey
3649c7d32b
Update logstash releases to reflect 6.8.1 release (#10975) 2019-07-18 13:25:14 -04:00
DeDe Morton
c0a5e12ec5 Fix include path
Fixes #10969
2019-07-18 14:46:54 +00:00
Dan Hermann
d9923ad902 remove extra brace from end of example command
Fixes #10966
2019-07-16 15:15:10 +00:00
Dan Hermann
73346d20f5 Update Reflections library
Fixes #10951
2019-07-16 11:59:29 +00:00
Dan Hermann
669aab1a12 Change version of Logstash containing GA version of Java plugin API
Fixes #10964
2019-07-16 11:39:43 +00:00
João Duarte
5918c09c2d
Update logstash_releases.json 2019-07-15 10:09:15 +01:00
Karen Metts
774d2ac17d
Fix formatting for nested version attributes (#10949) 2019-07-12 19:59:45 -04:00
Rodrigo López Dato
db191ce191 Expose DLQ writers to all types of plugins, not just Ruby outputs
Fixes #10749
2019-07-12 17:21:54 +00:00
Rodrigo López Dato
7382db9de4 Allow LogStash::Event to be instantiated with a Java Event
Allows inputs such as dead_letter_queue to create Ruby events that
include both data and metadata from deserialised Java events

Fixes #10749
2019-07-12 17:21:54 +00:00
João Duarte
d7eeaaf8e2
fix plugin version bump rake task (#10947)
By removing the default plugins from the Gemfile.template
the current task that modified the template was not working correctly.

This commit either replaces the dependency entry if it exists or
otherwise creates it.
2019-07-12 15:24:23 +01:00
João Duarte
15fb30823f
Cleanup gradle tasks and dependency installation (#10942)
- have `bootstrap` task do as little as possible: install gems in Gemfile.template that don't belong to groups
- have test tasks depend on the `installTestGems` task instead of `bootstrap`
- logstash es output is now a dependency because of license checking
- fix out of memory problem in SharedHelpers.trap

Also use release lockfile during installDefaultGems

The release lockfile is only copied to Gemfile.lock if
it doesn't exist. During the `installDefaultGems` task other
plugin installation tasks already occurred, generating a lock file.

This commit removes it before running the plugin installation.
2019-07-12 09:11:07 +01:00
Colin Surprenant
0c8585796d
logstash-input-twitter as a default plugin (#10934) 2019-07-11 13:01:25 -04:00
Rob Waight
183b6c328e
Document running Logstash on Windows (#10805)
* Create running-logstash-windows.asciidoc
Initial commit for #4005

* Update running-logstash-windows
1. Added section to validate JVM pre-requisites and shell sections for nssm, task scheduler, and PowerShell
2. Updated options to run Logstash on Windows, update section headers
3. Clarified JVM pre-requisites and included example to add environmental variables using SETX
4. Added example Logstash configuration, added steps for running Logstash manually with PowerShell
5. Removed `WIP` from the PowerShell section; updated the example to include output to Elasticsearch; Added notes for running Logstash as a service with NSSM
6. Removed `WIP` from the NSSM section; Added notes for running Logstash as a Scheduled Task; Added notes to stopping Logstash for each section; Removed `WIP` from the Scheduled Task section; Removed `WIP` from the page header
7. Updated initial section; moved the running manually section as the first configuration; added notes to the NSSM and Schedule Task sections.
8. Push headings down one level
9. Clarify this document contains examples for running Logstash on Windows.  Updated which NSSM file should be extracted for use.
10. Updated formatting for the example Logstash configuration
11. Update formatting for the command examples
12. Update the instructions in the Task Scheduler section
13. Update the instructions in the run Logstash manually section, the NSSM section, and update formatting
14. Update formatting
15. Add note regarding support for running multiple pipelines
16. Clarify use of command line options.  Re-state what is mentioned in the `Running Logstash from the Command Line` doc that: "Specifying command line options is useful when you are testing Logstash. However, in a production environment, we recommend that you use [logstash-settings-file] to control Logstash execution."
17. Clarify steps to accessing the Windows Environmental Variables window (i.e., link to Microsoft docs).
18. Remove unnecessary plus signs
19. Updated source types for examples, updated documents for specific Logstash versions with `{logstash_version}`


* Update running-logstash-command-line
1. Add note for running Logstash on Windows with `bin\logstash.bat`
2. Update formatting for running Logstash from the Windows command line
2019-07-11 08:59:13 -05:00
Joao Duarte
dd2c9b791f disable testInvalidInputPlugin
Test has been failing on windows for many weeks.

See https://github.com/elastic/logstash/issues/10926

Fixes #10927
2019-07-02 18:54:54 +00:00
Dan Hermann
728eff24f1 simplify unit test
Fixes #10872
2019-06-29 17:27:23 +00:00
Dan Hermann
4b2857d225 use method-level ensure blocks
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
0304da9ac9 remote != remove
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
eaeffd47b5 don't put nulls in the map
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
e0135c4e63 add missing lock statement
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
b9da367d39 don't perform long-running pipeline actions inside calls to ConcurrentHashMap.compute to avoid deadlocks
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
cfa31467f4 serialize access to PipelineBus methods on a per-plugin basis, code cleanup in AddressState
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
1b16eca32a Fix pipeline shutdown ordering
Fixes #10872
2019-06-29 17:27:22 +00:00
Karen Metts
35d91ccbde Add java example plugins to skiplist
Fixes #10921
2019-06-28 16:15:15 +00:00
Dan Hermann
c87d24a82f docs for the Java UUID filter
Fixes #10859
2019-06-28 15:45:27 +00:00
Dan Hermann
1cf08aa121 docs for java_generator input
Fixes #10857
2019-06-28 15:44:30 +00:00
Dan Hermann
dc07af1d4d docs for java stdin input
Fixes #10858
2019-06-28 15:44:14 +00:00
Dan Hermann
b58635ec61 docs for java stdout output
Fixes #10866
2019-06-28 15:44:01 +00:00
Dan Hermann
e2defde5c1 docs for Java sink output
Fixes #10867
2019-06-28 15:43:34 +00:00
Dan Hermann
6da7aa5dc8 docs for java dots codec
Fixes #10868
2019-06-28 15:43:20 +00:00
Dan Hermann
8902b62881 docs for Java line codec
Fixes #10869
2019-06-28 15:43:06 +00:00
Dan Hermann
8fb1145701 docs for Java plain codec
Fixes #10870
2019-06-28 15:39:11 +00:00
Joao Duarte
e8d553addf remove gcs output from skip list
Fixes #10919
2019-06-27 11:17:22 +00:00
Mike Place
2dc6150fd8
Restore UUID lookup to node (#10884)
* Restore UUID lookup to node

* Fix incorrect merge

* Move private method to bottom

* Change method name per review suggestion

* Update method description
2019-06-26 14:32:19 +02:00
Dan Hermann
6ba1b1ff67 Remove debug code for p2p plus formatting
Fixes #10840
2019-06-25 18:31:37 +00:00
Dan Hermann
ea0485d5bf Do not shut down API webserver until after pipelines have been shut down
Fixes #10880
2019-06-25 18:30:21 +00:00
Dan Hermann
46b94667f7 remove the beta designation from the docs for Java plugins
Fixes #10891
2019-06-25 16:37:19 +00:00
Mike Place
03001fa1f5
Add workers and batch_size to root request (#10853)
* Add workers and batch_size to root request

* Add batch delay per review recommendation
2019-06-25 13:44:25 +02:00
Mike Place
aa0588000c
Inject hash and ephemeral_id into stats (#10885) 2019-06-25 13:19:23 +02:00
Mike Place
252d5e7686
Enhance GET _node/stats/pipelines API for Metricbeat monitoring (#10576)
* parent 8c5697c748
author Guy Boertje <guy@elastic.co> 1556806171 +0100
committer Mike Place <mike.place@elastic.co> 1557234770 +0200

Bump JrJackson to 0.4.8

Fixes #10748

LIR serializer refactor

Remove commented code

Remove more commented code

Remove license and add encoding

Style change to make code more vertical.

eid and hash

Use pipelines_info to construct the stats

Add tests for new fields

Add queue stats

* bad merge resolution

* bad merge resolution

* Don't merge if nil

* Better merge strategy

* add vertex gate

* Guard against nil

* Use extended queue stats in pipeline report

* Add cluster uuids to Elasticsearch outputters in pipeline output

* move uuid

* remove old uuid lookup

* Only populate cluster_uuids when present

* remove print

* cluster_uuids -> cluster_uuid

* Update logstash-core/lib/logstash/api/commands/stats.rb

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Update logstash-core/lib/logstash/api/commands/stats.rb

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Update logstash-core/lib/logstash/api/commands/stats.rb

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Make var singular

* Match singular var name

* Remove unnecessary nil check

* Pass in the matching pipeline for the report

* Remove old way of inserting cluster_uuids

* Update logstash-core/lib/logstash/api/commands/stats.rb

I like this much better and in testing it seems to work correctly.

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Remove unreferenced code that was part of debugging

* Remove events var which was unused

* Don't try to remove before insert

* Update logstash-core/lib/logstash/api/commands/stats.rb

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Make pipeline extended stats generation more efficient

* Implement suggestion to improve readability

* Cleaner merging per review recommendation

* Only generate extended_stats once

* remove unneeded comments

* Add cluster_uuid to node vertex

* remove top-level cluster_uuids

* Update logstash-core/lib/logstash/api/commands/stats.rb

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Implement change to make logic more simple suggested in review

* Rely on options gate to insert graph

Resolves concern here:
https://github.com/elastic/logstash/pull/10576#issuecomment-501774635

* Update logstash-core/lib/logstash/api/commands/stats.rb

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Move UUID lookup to API layer

* Move private method to bottom per review recommandation
2019-06-22 08:31:13 +02:00
Karen Metts
32d8542518 Add homebrew as installation option
Fixes #10874
2019-06-20 14:54:19 +00:00
Rob Bavey
b8dd1ac64c Add Logstash JMS input to the list of default plugins
Fixes #10865
2019-06-17 18:50:21 +00:00
Joao Duarte
7468ed058f avoid clashes between Environment class methods
Fixes #10860
2019-06-14 17:44:38 +00:00
Jeff
dfb90fff16 Add details about Elastic Search dependency
No Elastic Search dependency is mentioned in the guide for Logstash up to this point. This would be good for those who are getting started to Log Stash without knowing much about Elastic Search and unaware that it isn't already packages along with the install of Logstash.

Fixes #10852
2019-06-11 15:24:28 +00:00
Dan Hermann
b477869eb3 fix parsing of boolean options provided to Java plugins
Fixes #10848
2019-06-07 19:54:08 +00:00
Ry Biesemeyer
4fab0f531e field_refefence: handle illegal field references in converted maps
When using the Jruby event API, re-cast java exceptions produced by illegal
field references to ruby `RuntimeError`s, which can be caught by the ruby-based
plugins.

This is similar to what we already do in the Jruby event API when directly
handling field references, but catches a case where the `Valuifier` encounters
an illegal reference when creating a `ConvertedMap`.

Fixes #10839
2019-06-06 21:27:40 +00:00
Karen Metts
8f88e91671 Remove note about j11
Fixes #10689
2019-06-05 18:18:39 +00:00
Florian Kelbert
ee2e4ad286 Value of start_timestamp must to be quoted
Fixes #10836
2019-05-31 12:35:18 +00:00
Dan Hermann
d9c60bfe35 plain codec for Java
Fixes #10791
2019-05-30 14:45:18 +00:00
Dan Hermann
2449e94164 Fixes unit test failures on some runs of ConfigCompilerTest::testComplexConfigToPipelineIR
Fixes #10837
2019-05-30 14:40:51 +00:00
Dan Hermann
2f5aff2362 Merge config values in LIR
Fixes #10832
2019-05-30 12:59:09 +00:00
Joao Duarte
f22b835ab6 name rpm/deb oss packages as logstash-oss
Fixes #10833
2019-05-29 14:25:21 +00:00
Dan Hermann
fd74ce0156 LIR support for octal literals in pipeline definitions
Fixes #10828
2019-05-28 16:51:03 +00:00
João Duarte
5398e58a24
Update logstash_releases.json 2019-05-28 16:30:55 +01:00
Joao Duarte
c54f451c1e fix plugin doc version generation with default plugins
now that default plugins are read only from the json metadata file and
not from the lock file, the plugin version manifesto needs to be adapted
so the status of "default" plugin is read from the json file.

Fixes #10824
2019-05-27 19:43:46 +00:00
Joao Duarte
64732b81ca allow skipping docker artifacts during artifact:all
Fixes #10823
2019-05-27 13:57:07 +00:00
Joao Duarte
75725e1a51 generate tarballs for docker images
Fixes #10819
2019-05-24 15:09:26 +00:00
Dan Hermann
9a78a6ce80 Document copy semantics of QueueWriter::push method
Fixes #10808
2019-05-22 10:51:52 +00:00
Dan Hermann
08d2443a37 Provide DLQ writer interface to Java plugins
Fixes #10790
2019-05-22 03:38:44 +00:00
Karen Metts
b093c58a88 Add structure for new windows topic
Added coming notice

Fixes #10809
2019-05-21 17:12:27 +00:00
Dan Hermann
7cd6bb89ae Default stack trace size to 50 and make it configurable
Fixes #10793
2019-05-21 15:42:06 +00:00
Jordan Doyle
15ac5db739 Expose Metrics API to Java plugins (#10761)
Expose Metric API to Java plugins and migrate JavaCodecDelegator to new Metric API
2019-05-20 11:24:07 -04:00
Jordan Doyle
bf1881dff2 Include G1 in JVM heap metrics (#10728) 2019-05-10 15:34:07 -05:00
dedemorton
86d14fb743 Comment out config examples that no longer work
Fixes #10671
2019-05-09 21:34:08 +00:00
Guy Boertje
fc74c3c392 Bump JrJackson to 0.4.8
Fixes #10748
2019-05-07 08:36:29 +00:00
Karen Metts
8c5697c748
Fix asciidoc formatting for conversion to asciidoctor (#10744) 2019-05-06 16:53:23 -04:00
Dan Hermann
d61aee6a2c Clarify behavior of ensure_delivery flag
Fixes #10754
2019-05-06 12:33:13 +00:00
João Duarte
43f28479e9
fix javadoc warning for Codec.java (#10756) 2019-05-06 09:34:50 +01:00
Dan Hermann
0de53939e9 * Adds a java_generator input with jdots codec to facilitate testing, adds float config type
* Breaking change to codec.encode method

* Sink output for discarding events

* URI and password config types

* Utility methods for packaging Java plugins

* Plugin API validation, fix gemspec generation

* Plugin Jar validation

* Update developer documentation

* Update codec metrics for new encode method

* Beta: Isolated classloaders for Java plugins

* Address code review comments

Fixes #10620
2019-05-03 11:54:37 +00:00
Colin Surprenant
c28ded78c9
fix JRuby resolv.rb leak (#10734) 2019-05-01 13:58:49 -04:00
Nik Everett
a1d2ba3b37
[Docs] Asciidoctor support (#10730)
Ports elastic/logstash-docs#688 to this repo. Asciidoctor doesn't quite
work on this repo, but it comes closer with these changes.
2019-05-01 13:54:43 -04:00
Mike Place
3f56d93e01
Enhance GET / API for Metricbeat (#10589)
* ephemeral id

* hard-code status

* Add snapshot field
2019-05-01 13:14:47 +02:00
Mike Place
cc3c5ec00f
Refactoring of LIR serializer and exposing pipeline metrics (#10561)
* [WIP] Add ephemeral id and hash to pipeline stats

Refs #10119

* Fix incorrect hash id

* Add graph metrics

* Include node update

* LIR serializer refactor

* Remove commented code

* Remove more commented code

* Update spec

* Remove license and add encoding

* Style change to make code more vertical.

* Implement review suggestions

* Remove commented code

* Fix spec path

* Add cluster UUID

* Add graph?=true parameter

* Add options to pipelines/

* Use pluginmetadata

* Replicate change from java_pipeline to ruby pipeline
2019-05-01 12:45:11 +02:00
Karen Metts
0a92f14cf8 Correct links to LS Ref Guide
Fixes #10727
2019-04-30 22:54:31 +00:00
Karen Metts
18c76012cb Note doc file created with plugin generation
Fixes #9861
2019-04-26 21:38:07 +00:00
Karen Metts
5321913d44 Incorporate review comments
Fixes #9861
2019-04-26 21:38:07 +00:00
Karen Metts
c75c2dea56 Add guidelines for writing plugin doc
Fix link formatting

Fixes #9861
2019-04-26 21:38:07 +00:00
Rob Bavey
b088147cf1 Move plugin cleanup before retry
Previously the `do_close` method would never be called on a failing
plugin, because the retry call stops the code under `ensure` from
ever being called.

Fixes #10691
2019-04-26 13:15:46 +00:00
Rob Bavey
4f270295a1 Adds cleanup after shutdown of plugin
Fixes #10691
2019-04-26 13:15:46 +00:00
Rob Bavey
9c09f1ee50 Add methods to clear PluginMetadata repositories
Fixes #10691
2019-04-26 13:15:46 +00:00
Ry Biesemeyer
1fa9454c7c adds LogStash::PluginMetadata for simple key/value plugin metadata
We need a way for a plugin to register simple metadata about external
resources it connects to in order to implement a Monitoring feature in which
an Elasticsearch Output Plugin can store the connected cluster's uuid (#10602)

Here, we add a generic `LogStash::PluginMetadata` along with a registry, and
expose an accessor on `LogStash::Plugin#plugin_metadata` so that instances
can access their own metadata object.

Fixes #10691
2019-04-26 13:15:45 +00:00
Dan Hermann
ba1ca78c2a Clarify that Java codecs work only with Java inputs and outputs
Fixes #10716
2019-04-24 17:45:10 +00:00
João Duarte
d15f6c3631
Rename filebeat.prospectors to filebeat.inputs (#10711)
In filebeat prospectors settings have been renamed to inputs. When
prospectors is used a deprecation warning is printed. With 7.0
`filebeat.prospectors` will be removed.

This change updates all uses of prospectors with inputs. For now
filebeat events report `prospector.type` and `input.type` for
compatibility reasons.
2019-04-23 18:37:28 +01:00
Dan Hermann
d13b10de7f Correction on Java execution in docs on command-line arguments
Fixes #10710
2019-04-23 17:14:28 +00:00
Joao Duarte
088ece441a
rake task to generate dockerfile
* dont include docker tasks in artifact:all
* don't rebuild tar/zip if source hasn't changed
* allow SKIP_PREPARE to avoid tar creation if no modifications
* don't need a tarball to generate the dockerfile
* remove docker tests as they weren't working anymore

This commit adds a task to produce all necessary files to generate a docker image.

```
% RELEASE=1 rake artifact:dockerfile
....
Dockerfile created in /tmp/elastic/logstash/build/docker
% tree /tmp/elastic/logstash/build/docker
/tmp/elastic/logstash/build/docker
├── Dockerfile
├── bin
│   └── docker-entrypoint
├── config
│   ├── log4j2.properties
│   ├── logstash-full.yml
│   └── pipelines.yml
├── env2yaml
│   └── env2yaml
└── pipeline
    └── default.conf
% docker build --rm .
.....
Step 19/20 : LABEL org.label-schema.schema-version="1.0"   org.label-schema.vendor="Elastic"   org.label-schema.name="logstash"   org.label-schema.version="7.0.0"   org.label-schema.url="https://www.elastic.co/products/logstash"   org.label-schema.vcs-url="https://github.com/elastic/logstash" license="Elastic License"
 ---> Using cache
 ---> f622d7555220
Step 20/20 : ENTRYPOINT ["/usr/local/bin/docker-entrypoint"]
 ---> Using cache
 ---> b6feba7f4934
Successfully built b6feba7f4934
```

This task works only for releases (not snapshots).

This commit also adds a few tweaks to the artifacts building:

Using `SKIP_PREPARE=1` in `rake artifact:tar` or `rake artifact:tar_oss` will make a check to not rebuild the tarball if there are no code modifications.

These two changes are made since docker image build is new and we want to keep it out of artifact:all for a while. And if we're running these separately, we want to ensure the tarball built is used in the docker image (versus building a new one for each `rake artifact:tar` )

This means that, to generate all artifacts including docker images and dockerfile, it's necessary to run:

```
RELEASE=1 rake artifact:all
SKIP_PREPARE=1 RELEASE=1 rake artifact:docker
SKIP_PREPARE=1 RELEASE=1 rake artifact:docker_oss
RELEASE=1 rake artifact:dockerfile
```
2019-04-22 22:53:40 +01:00
Dan Hermann
9c05354d74 Corrects the description of codec behavior in the output stage of Logstash pipelines
Fixes #10682
2019-04-22 15:56:37 +00:00
Dan Hermann
7b8c447d96 Correct the docs for the settings file to note that Java execution defaults to true
Fixes #10701
2019-04-22 13:05:16 +00:00
João Duarte
c657f90362
moved to openjdk 11 in docker testing (#10563)
- also fix javadoc warning when building on jdk11
2019-04-15 21:13:05 +01:00
Karen Metts
1d5f9e0bca
Clean up release notes and add placeholders for master (#10670)
* Clean up release notes for master

* update version number in links

* Update docs/static/releasenotes.asciidoc

Comment out future links

Co-Authored-By: karenzone <35154725+karenzone@users.noreply.github.com>

* Update releasenotes.asciidoc

Comment out future links
2019-04-15 14:02:44 -04:00
Joao Duarte
8ee1ff4d29 properly exclude bundler 1.16.6
Fixes #10684
2019-04-12 21:30:27 +00:00
Joao Duarte
2a40099718 updated bundler to 1.17.3
Fixes #10685
2019-04-12 21:07:54 +00:00
João Duarte
8af616777b
Update 5.x release on logstash_releases.json to 5.6.16 (#10686) 2019-04-12 22:06:45 +01:00
João Duarte
9c698bf92a
Update logstash_releases.json 2019-04-12 10:31:16 +01:00
Joao Duarte
79a4fd1601 bump jruby to 9.2.7.0
Revert "work around jruby-5642 during package installation on jdk11 (#10658)"

This reverts commit 033c896330.

skip the bundler-1.16.6 files when unpacking jruby

Fixes #10674
2019-04-11 21:32:32 +00:00
Colin Surprenant
a121ee4d42 download exact version artifact for release build otherwise download snapshot (#10664) 2019-04-11 22:23:48 +01:00
Jordan Johnson-Doyle
aa03eb3973 Inputs expect a NamespacedMetric, not the root metric instance
Fixes #10614
2019-04-11 13:10:18 +00:00
Jordan Johnson-Doyle
30879b293a Add tests for LogStash::Codec::Delegator
Fixes #10614
2019-04-11 13:10:18 +00:00
Jordan Johnson-Doyle
58dcfae199 Add tests for JavaCodecDelegator
Fixes #10614
2019-04-11 13:10:18 +00:00
Jordan Johnson-Doyle
68e9c6ff04 Collect and expose metrics from Ruby codecs
Fixes #10614
2019-04-11 13:10:18 +00:00
Jordan Johnson-Doyle
310541f41b Collect and expose metrics from Java codecs
Fixes #10614
2019-04-11 13:10:18 +00:00
Dan Hermann
03df1316ce Correctly sets the default codec to java_line. Fixes buffer handling for events whose encodings do not fit into the buffer.
Fixes #10673
2019-04-10 18:32:05 +00:00
Karen Metts
4b28339c9e Add links to particular breaking changes
Fixes #10668
2019-04-09 09:07:21 +00:00
Karen Metts
d96854a2dd
[WIP] Update breaking changes doc for 7.0 (#10632)
* Update breaking changes doc for 7.0

Update structure to allow for previous and current changes

* Update docs/static/breaking-changes.asciidoc

Adds info about field reference parser

Co-Authored-By: karenzone <35154725+karenzone@users.noreply.github.com>

* Populate content for plugin changes

Co-Authored-By: karenzone <35154725+karenzone@users.noreply.github.com>

* Fix asciidoc formatting

* Incorporate review comments and new content

* Minor change for clarity

* add anchors for linking

* Add anchor for ecs-beats

* Incorporate review comments

* [DOCS] Adds tagged region for notable breaking changes

* Incorporate review comments

Remove link
2019-04-08 16:02:37 -04:00
Karen Metts
2eea42f59e
Refine upgrade instructions for 7.0 (#10634) 2019-04-08 14:36:40 -04:00
Lisa Cawley
7de969db16
[DOCS] Adds tagged region for notable breaking changes (#10654) 2019-04-08 07:48:51 -07:00
João Duarte
033c896330
work around jruby-5642 during package installation on jdk11 (#10658)
fixes #10593
2019-04-05 15:37:55 +01:00
Dan Hermann
b8ce9d7aeb Move Gradle wrappers around Ruby operations to a separate file to facilitate sharing of common operations with Java plugins
Fixes #10642
2019-04-04 19:56:59 +00:00
Dan Hermann
a16e67d332 Handle duplicate config entries
Fixes #10619
2019-04-04 17:53:44 +00:00
João Duarte
3f36244494
Update logstash_releases.json (#10650)
this includes newly released 6.7.1 and 7.0.0-rc2
2019-04-04 16:42:15 +01:00
Joao Duarte
28afe59c23 disable docker img generation on artifact:all
Fixes #10647
2019-04-04 15:19:26 +00:00
Joao Duarte
43f49b9764 remove docker-compose symlink
Fixes #10645
2019-04-04 14:33:05 +00:00
João Duarte
dc5db673ee
build docker images from logstash repo (#10603)
introduces two rake tasks: `rake artifact:docker_oss` and `rake artifact:docker`, which will create the docker images of the OSS and non OSS packages. These tasks depend on the tar artifacts being built.

Also `rake artifact:all` has been modified to also call these two tasks.

most code was moved from https://github.com/elastic/logstash-docker/
2019-04-04 11:27:06 +01:00
João Duarte
bb8d4fbc19
Update logstash_releases.json (#10627) 2019-04-04 11:24:07 +01:00
Dan Hermann
a808c8fcb3 Log successful shutdowns
Fixes #10628
2019-04-04 08:51:00 +00:00
Karen Metts
e80c7dcab2 Add note about issues with Java 11 and Debian or RPM (#10635) 2019-04-04 09:46:18 +01:00
Dan Hermann
3243aa16ed Call out requirement for Java execution in note
Fixes #10630
2019-04-03 16:22:12 +00:00
Karen Metts
4bdf8e7966 Remove duplicate text
Fixes #10621
2019-04-03 14:12:56 +00:00
Karen Metts
262c7ca8cc Removed note from earlier upgrade
Fixes #10621
2019-04-03 14:12:56 +00:00
Karen Metts
82301d34e2 Update instructions for 7.0 upgrade
Fixes #10621
2019-04-03 14:12:56 +00:00
Yi Ou
8760b48de7 Make the sample command easier to follow
A tiny change suggestion due to:

- `-SIGHUP` was mentioned in the previous text
- `-SIGHUP` is easier to read than `-1`
- `-1` can be easily mixed up with `-l`

Fixes #10592
2019-04-01 09:32:37 +00:00
Rob Bavey
03edd76abd Update Kafka version to fix build
Fixes #10608
2019-03-28 19:37:17 +00:00
Dan Hermann
39dd4cb425 Update JRuby and Java prerequisites
Fixes #10604
2019-03-28 16:09:22 +00:00
Karen Metts
712ba6cbf1 Add note that pline-pline also supports files
Fixes #10590
2019-03-27 18:43:31 +00:00
Karen Metts
b9a591f81e Update supported java version and example
Fixes #10584
2019-03-26 20:54:47 +00:00
Karen Metts
c690e3c583 Add sample doc files to plugin generator
Fixes #10029
2019-03-19 20:21:19 +00:00
Jake Landis
8bd7223bbf monitoring: bump to system_api_version 7
Fixes #10562
2019-03-17 15:12:15 +00:00
Ry Biesemeyer
67b8d43dff fix events_count to return total
Fixes #10564
2019-03-16 00:10:39 +00:00
Joao Duarte
0e115d31a6 cleanup many rakelib tasks that aren't used anymore
* simplify the plugins-metadata.json file
* sort and update the plugin list in the rakelib/plugins-metadata.json
* remove dependency on twitter input for testing
* sorted Gemfile.template (grouped by group)
* remove default plugins from Gemfile.template

Fixes #10509
2019-03-15 16:26:58 +00:00
Colin Surprenant
5ae5386d13
correctly handle unexecuted downloadEs task (#10555) 2019-03-13 17:56:26 -04:00
Karen Metts
a1f6da67b7
Update java plugin docs for beta (#10534) 2019-03-13 14:19:59 -04:00
Joao Duarte
6f7d97abce make monitoring specs resilient to internal api number changes
Fixes #10552
2019-03-13 16:26:22 +00:00
Rob Bavey
fb5eba8c8a Fix issue setting 'enable_metric => false' on a plugin
This commit fixes a ClassCastException which happens when
 a plugin has the `enable_metric` setting set to false - a
 NullMetricExt is assumed, but that is only created when
 'metric.collect' is set to 'false' in the Logstash configuration,
 not when an individual plugin disables its metrics.

Fixes #10538
2019-03-13 10:43:17 +00:00
Colin Surprenant
dc7205a204 move download setup code inside the downloadEs task (#10547) 2019-03-12 16:01:16 -07:00
Ry Biesemeyer
fcd52c1573 prevent concurrent convergence (e.g., SIGHUP during in-flight convergence)
There are several scenarios in which we can trigger concurrent convergence in
the agent, resulting in two or more threads working to perform interleaved and
potentially conflicting or overlapping pipeline actions. Notably, our trap on
`SIGHUP` will be resolved in its own thread, so if we are sent `SIGHUP` while
in the process of converging, the second in-flight convergence may get its
starting state before, during, or after the effects of the first convergence.

By mutually excluding execution of the convergence cycle, we eliminate the
class of bugs in which one convergence acquires actions that cannot succeed due
to the prior success of actions given to the other convergence.

Fixes #10537
2019-03-12 17:37:40 +00:00
Jake Landis
4867674eac Update monitoring HTTP end point
This commit changes /_xpack/monitoring/_bulk to /_monitoring/bulk.
The former is deprecrated as 7.0.0.

Relates https://github.com/elastic/elasticsearch/pull/36130
Relates https://github.com/elastic/elasticsearch/issues/35958

Fixes #10528
2019-03-12 11:45:35 +00:00
Rob Bavey
5d41ab675c Change internal document type to push "_doc" instead of "doc"
This commit fixes x-pack integration tests that were broken by https://github.com/elastic/elasticsearch/pull/39888 removing the "doc"
 type, and using `_doc` in templates.

Fixes #10533
2019-03-11 19:55:15 +00:00
Karen Metts
31f7314c3b Convert instructions for Java plugins to asciidoc
Fixes #10523
2019-03-11 18:02:57 +00:00
Dan Hermann
80c966b03e fix bug with explicitly-specified Java codecs
Fixes #10520
2019-03-08 02:05:57 +00:00
Jake Landis
ad65518304 update to send api version 6
Fixes #10518
2019-03-07 16:19:44 +00:00
Jake Landis
0ca34f07bb Central management typeless API
This commit adopts Elasticsearch's typeless API for central management.

Relates: https://github.com/elastic/elasticsearch/issues/3863

Fixes #10421
2019-03-07 16:19:17 +00:00
Aarti Gupta
311ea143de Enhancements to Logstash Benchmarking Tool (#10253)
* Adding support for -
1. Custom Data Sets
2. Added heap used statistics to results
2019-02-28 11:45:32 -06:00
Guy Boertje
8605760d97 Mute CI integration DLQ acceptance test
Fixes #10504
2019-02-27 17:44:57 +00:00
João Duarte
925b9daa21
bump jruby to 9.2.6.0 (#10425) 2019-02-18 16:34:07 +00:00
Colin Surprenant
0cdefb9141
remove exclusive lock for Ruby pipeline initialization (#10431) 2019-02-15 17:27:43 -05:00
Rob Bavey
6cd7329080 Mute CLI integration plugin acceptance test
Test is failing CI
https://github.com/elastic/logstash/issues/10459

Fixes #10460
2019-02-15 22:08:39 +00:00
DeDe Morton
d8c7a980b0
Improve docs about using Filebeat modules with Logstash (#10438)
* Improve docs about using Filebeat modules with Logstash

* Add fixes from review
2019-02-15 12:39:28 -08:00
Rob Bavey
95a0362fb9 Mute Failing Test on Windows
Mute mixin_spec, tracked by #10454

Fixes #10455
2019-02-15 19:44:21 +00:00
Dan Hermann
0efc0d58d5 One more character encoding fix
Fixes #10452
2019-02-14 21:36:51 +00:00
Karen Metts
7cb2cd631d Incorporate review comments
Fixes #10433
2019-02-14 17:03:15 +00:00
Karen Metts
85ca8dda31 Add prilileges required for ilm
Fixes #10433
2019-02-14 17:03:14 +00:00
Dan Hermann
5505f7c9d5 fix Stdin tests to work on platforms that do not have UTF-8 as the default character encoding
Fixes #10449
2019-02-14 16:56:07 +00:00
Dan Hermann
9eb2aac36a Fix line codec tests so they work on platforms such as Windows that do not have UTF-8 as the default character encoding
Fixes #10446
2019-02-14 14:47:56 +00:00
Karen Metts
447c0f253e
Move field-ref include below xpack content (#10437) 2019-02-13 19:50:34 -05:00
Ry Biesemeyer
7d8e9f3c22
add 8.x snapshot builds to exported CI matrix (#10439) 2019-02-13 07:36:57 -08:00
Karen Metts
b424b3b030 Edits from review comments
Fixes #10376
2019-02-12 22:38:45 +00:00
Karen Metts
0697be52d6 Expande descriptions
Fixes #10376
2019-02-12 22:38:45 +00:00
Karen Metts
8383120cd3 Add http and memcached filters to lookup plugins
Fixes #10376
2019-02-12 22:38:45 +00:00
Karen Metts
30313a2137
Reorder files in index to unhide lost topics (#10429)
Add comment about placement of include
2019-02-12 15:47:34 -05:00
Joao Duarte
fe684f87fa factor in OS and architecture when downloading ES
- use artifacts api to fetch latest build
- use latest build info to find download url
- download package

Fixes #10422
2019-02-11 14:28:19 +00:00
Ry Biesemeyer
b605161662 ast/lir: simplify concurrent use of AST, which is globally stateful
Fixes #10415
2019-02-09 00:24:46 +00:00
Rob Bavey
51d7723fb6 Remove unnecessary option to not require host in SafeURI
Fixes #10414
2019-02-08 14:14:33 +00:00
Rob Bavey
795fd98e52 Better handle malformed URIs
Raise an error if a URI has inadvertently been supplied without a host

Fixes #10414
2019-02-08 14:14:33 +00:00
Joao Duarte
115738ceef mute metrics_spec line 138 test
Fixes #10412
2019-02-07 16:25:45 +00:00
João Duarte
5223b5cde4
pin childprocess to 0.9 (#10410) 2019-02-07 15:42:30 +00:00
Ry Biesemeyer
86ab26f818 keystore: instances of CharsetEncoder are stateful and cannot be shared
Fixes a crash that occurs on pipeline load and/or reload when using both the
java keystore and the multi-pipeline feature, when more than one pipeline
references `${}`-style variables.

Fixes #10408
2019-02-06 22:17:52 +00:00
João Duarte
7b6d60c433
bump to 8.0.0 (#10400) 2019-02-06 15:04:44 +00:00
3370 changed files with 110630 additions and 83554 deletions

View file

@ -0,0 +1,161 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
agents:
provider: aws
imagePrefix: platform-ingest-logstash-ubuntu-2204-aarch64
instanceType: "m6g.4xlarge"
diskSizeGb: 200
steps:
- group: "Testing Phase"
key: "testing-phase"
steps:
- label: ":rspec: Ruby unit tests"
key: "ruby-unit-tests"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/unit_tests.sh ruby
retry:
automatic:
- limit: 3
- label: ":java: Java unit tests"
key: "java-unit-tests"
env:
# https://github.com/elastic/logstash/pull/15486 for background
ENABLE_SONARQUBE: "false"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/unit_tests.sh java
retry:
automatic:
- limit: 3
- label: ":lab_coat: Integration Tests / part 1-of-3"
key: "integration-tests-part-1-of-3"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/integration_tests.sh split 0 3
retry:
automatic:
- limit: 3
- label: ":lab_coat: Integration Tests / part 2-of-3"
key: "integration-tests-part-2-of-3"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/integration_tests.sh split 1 3
retry:
automatic:
- limit: 3
- label: ":lab_coat: Integration Tests / part 3-of-3"
key: "integration-tests-part-3-of-3"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/integration_tests.sh split 2 3
retry:
automatic:
- limit: 3
- label: ":lab_coat: IT Persistent Queues / part 1-of-3"
key: "integration-tests-qa-part-1-of-3"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 0 3
retry:
automatic:
- limit: 3
- label: ":lab_coat: IT Persistent Queues / part 2-of-3"
key: "integration-tests-qa-part-2-of-3"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 1 3
retry:
automatic:
- limit: 3
- label: ":lab_coat: IT Persistent Queues / part 3-of-3"
key: "integration-tests-qa-part-3-of-3"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 2 3
retry:
automatic:
- limit: 3
- label: ":lab_coat: x-pack unit tests"
key: "x-pack-unit-tests"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
x-pack/ci/unit_tests.sh
retry:
automatic:
- limit: 3
- label: ":lab_coat: x-pack integration"
key: "integration-tests-x-pack"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
x-pack/ci/integration_tests.sh
retry:
automatic:
- limit: 3
- group: "Acceptance Phase"
depends_on: "testing-phase"
key: "acceptance-phase"
steps:
- label: "Docker [{{matrix}}] flavor acceptance"
command:
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh && ci/docker_acceptance_tests.sh {{matrix}}
retry:
automatic:
- limit: 3
matrix:
- "full"
- "oss"
# *** TODO: enable after clarifying if acceptance tests really need vagrant on aarch64
# - label: "Acceptance tests on {{matrix.distribution}}"
# agents:
# provider: aws
# imagePrefix: platform-ingest-logstash-{{matrix.distribution}}-aarch64
# instanceType: "m6g.4xlarge"
# diskSizeGb: 200
# command:
# set -euo pipefail
# source .buildkite/scripts/common/vm-agent.sh && ci/acceptance_tests.sh {{matrix.suite}}
# matrix:
# setup:
# suite:
# - "debian"
# distribution:
# - "ubuntu-2204"

View file

@ -0,0 +1,11 @@
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-16"
diskSizeGb: 100
diskType: pd-ssd
steps:
- label: "Benchmark Marathon"
command: .buildkite/scripts/benchmark/marathon.sh

View file

@ -0,0 +1,14 @@
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-16"
diskSizeGb: 100
diskType: pd-ssd
steps:
- label: "Benchmark Snapshot"
retry:
automatic:
- limit: 3
command: .buildkite/scripts/benchmark/main.sh

View file

@ -0,0 +1,15 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
steps:
- label: ":pipeline: Generate steps"
command: |
set -euo pipefail
echo "--- Building [$${WORKFLOW_TYPE}] artifacts"
python3 -m pip install pyyaml
echo "--- Building dynamic pipeline steps"
python3 .buildkite/scripts/dra/generatesteps.py > steps.yml
echo "--- Printing dynamic pipeline steps"
cat steps.yml
echo "--- Uploading dynamic pipeline steps"
cat steps.yml | buildkite-agent pipeline upload

View file

@ -0,0 +1,39 @@
steps:
- label: "Exhaustive tests pipeline"
command: |
#!/usr/bin/env bash
echo "--- Check for docs changes"
set +e
.buildkite/scripts/common/check-files-changed.sh '^docs/.*'
if [[ $$? -eq 0 ]]; then
echo "^^^ +++"
echo "Skipping running pipeline as all changes are related to docs."
exit 0
else
echo "Changes are not exclusively related to docs, continuing."
fi
set -eo pipefail
echo "--- Downloading prerequisites"
python3 -m pip install ruamel.yaml
curl -fsSL --retry-max-time 60 --retry 3 --retry-delay 5 -o /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod a+x /usr/bin/yq
echo "--- Printing generated dynamic steps"
set +e
python3 .buildkite/scripts/exhaustive-tests/generate-steps.py >pipeline_steps.yml
if [[ $$? -ne 0 ]]; then
echo "^^^ +++"
echo "There was a problem rendering the pipeline steps."
cat pipeline_steps.yml
echo "Exiting now."
exit 1
else
set -eo pipefail
cat pipeline_steps.yml | yq .
fi
set -eo pipefail
echo "--- Uploading steps to buildkite"
cat pipeline_steps.yml | buildkite-agent pipeline upload

View file

@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-4"
diskSizeGb: 64
steps:
- group: ":logstash: Health API integration tests"
key: "testing-phase"
steps:
- label: "main branch"
key: "integ-tests-on-main-branch"
command:
- .buildkite/scripts/health-report-tests/main.sh
retry:
automatic:
- limit: 3

View file

@ -0,0 +1,14 @@
steps:
- label: "JDK Availability check"
key: "jdk-availability-check"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci"
cpu: "4"
memory: "6Gi"
ephemeralStorage: "100Gi"
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
export GRADLE_OPTS="-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info"
ci/check_jdk_version_availability.sh

View file

@ -0,0 +1,96 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
# Before adding an Operating System to the JDK matrix:
# - Ensure the image is available in https://github.com/elastic/ci-agent-images/blob/main/vm-images/platform-ingest/logstash-multi-jdk.yml
# - If image doesn't exist, review https://docs.elastic.dev/ingest-dev-docs/engineer-productivity/custom-ci-images
env:
DEFAULT_MATRIX_OS: "ubuntu-2204"
DEFAULT_MATRIX_JDK: "adoptiumjdk_21"
steps:
- input: "Test Parameters"
if: build.source != "schedule" && build.source != "trigger_job"
fields:
- select: "Operating System"
key: "matrix-os"
hint: "The operating system variant(s) to run on:"
required: true
multiple: true
default: "${DEFAULT_MATRIX_OS}"
options:
- label: "Ubuntu 24.04"
value: "ubuntu-2404"
- label: "Ubuntu 22.04"
value: "ubuntu-2204"
- label: "Ubuntu 20.04"
value: "ubuntu-2004"
- label: "Debian 12"
value: "debian-12"
- label: "Debian 11"
value: "debian-11"
- label: "RHEL 9"
value: "rhel-9"
- label: "RHEL 8"
value: "rhel-8"
- label: "Oracle Linux 8"
value: "oraclelinux-8"
- label: "Oracle Linux 7"
value: "oraclelinux-7"
- label: "Rocky Linux 8"
value: "rocky-linux-8"
- label: "Rocky Linux 9"
value: "rocky-linux-9"
- label: "Alma Linux 8"
value: "almalinux-8"
- label: "Alma Linux 9"
value: "almalinux-9"
- label: "Amazon Linux (2023)"
value: "amazonlinux-2023"
- label: "OpenSUSE Leap 15"
value: "opensuse-leap-15"
- select: "Java"
key: "matrix-jdk"
hint: "The JDK to test with:"
required: true
multiple: true
default: "${DEFAULT_MATRIX_JDK}"
options:
- label: "Adoptium JDK 21 (Eclipse Temurin)"
value: "adoptiumjdk_21"
- label: "Adoptium JDK 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
- label: "OpenJDK 21"
value: "openjdk_21"
- label: "Zulu 21"
value: "zulu_21"
- label: "Zulu 17"
value: "zulu_17"
- wait: ~
if: build.source != "schedule" && build.source != "trigger_job"
- command: |
set -euo pipefail
echo "--- Downloading prerequisites"
python3 -m pip install ruamel.yaml
echo "--- Printing generated dynamic steps"
export MATRIX_OSES="$(buildkite-agent meta-data get matrix-os --default=${DEFAULT_MATRIX_OS})"
export MATRIX_JDKS="$(buildkite-agent meta-data get matrix-jdk --default=${DEFAULT_MATRIX_JDK})"
set +eo pipefail
python3 .buildkite/scripts/jdk-matrix-tests/generate-steps.py >pipeline_steps.yml
if [[ $$? -ne 0 ]]; then
echo "^^^ +++"
echo "There was a problem rendering the pipeline steps."
cat pipeline_steps.yml
echo "Exiting now."
exit 1
else
set -eo pipefail
cat pipeline_steps.yml
fi
echo "--- Uploading steps to buildkite"
cat pipeline_steps.yml | buildkite-agent pipeline upload

View file

@ -0,0 +1,26 @@
{
"jobs": [
{
"enabled": true,
"pipeline_slug": "logstash-pull-request-pipeline",
"allow_org_users": true,
"allowed_repo_permissions": ["admin", "write"],
"allowed_list": ["dependabot[bot]", "mergify[bot]", "github-actions[bot]", "elastic-vault-github-plugin-prod[bot]"],
"set_commit_status": true,
"build_on_commit": true,
"build_on_comment": true,
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
"skip_ci_labels": [ ],
"skip_target_branches": [ ],
"skip_ci_on_only_changed": [
"^.github/",
"^docs/",
"^.mergify.yml$",
"^.pre-commit-config.yaml",
"\\.md$"
],
"always_require_ci_on_changed": [ ]
}
]
}

View file

@ -0,0 +1,243 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
steps:
- label: ":passport_control: License check"
key: "license-check"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci"
cpu: "4"
memory: "6Gi"
ephemeralStorage: "100Gi"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
export JRUBY_OPTS="-J-Xmx1g"
export GRADLE_OPTS="-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info"
ci/license_check.sh -m 4G
- label: ":rspec: Ruby unit tests"
key: "ruby-unit-tests"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "4"
memory: "8Gi"
ephemeralStorage: "100Gi"
# Run as a non-root user
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
ci/unit_tests.sh ruby
artifact_paths:
- "coverage/coverage.json"
- label: ":java: Java unit tests"
key: "java-unit-tests"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
retry:
automatic:
- limit: 3
env:
ENABLE_SONARQUBE: true
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
ci/unit_tests.sh java
artifact_paths:
- "**/build/test-results/javaTests/TEST-*.xml"
- "**/jacocoTestReport.xml"
- "**/build/classes/**/*.*"
- label: ":sonarqube: Continuous Code Inspection"
if: |
build.pull_request.id != null ||
build.branch == "main" ||
build.branch =~ /^[0-9]+\.[0-9]+\$/
env:
VAULT_SONAR_TOKEN_PATH: "kv/ci-shared/platform-ingest/elastic/logstash/sonar-analyze-token"
agents:
image: "docker.elastic.co/cloud-ci/sonarqube/buildkite-scanner:latest"
command:
- "buildkite-agent artifact download --step ruby-unit-tests coverage/coverage.json ."
- "buildkite-agent artifact download --step java-unit-tests **/jacocoTestReport.xml ."
- "buildkite-agent artifact download --step java-unit-tests **/build/classes/**/*.* ."
- "/scan-source-code.sh"
depends_on:
- "ruby-unit-tests"
- "java-unit-tests"
retry:
manual:
allowed: true
- label: ":lab_coat: Integration Tests / part 1-of-3"
key: "integration-tests-part-1-of-3"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as a non-root user
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
ci/integration_tests.sh split 0 3
- label: ":lab_coat: Integration Tests / part 2-of-3"
key: "integration-tests-part-2-of-3"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as a non-root user
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
ci/integration_tests.sh split 1 3
- label: ":lab_coat: Integration Tests / part 3-of-3"
key: "integration-tests-part-3-of-3"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as a non-root user
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
ci/integration_tests.sh split 2 3
- label: ":lab_coat: IT Persistent Queues / part 1-of-3"
key: "integration-tests-qa-part-1-of-3"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as non root (logstash) user. UID is hardcoded in image.
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 0 3
- label: ":lab_coat: IT Persistent Queues / part 2-of-3"
key: "integration-tests-qa-part-2-of-3"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as non root (logstash) user. UID is hardcoded in image.
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 1 3
- label: ":lab_coat: IT Persistent Queues / part 3-of-3"
key: "integration-tests-qa-part-3-of-3"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as non root (logstash) user. UID is hardcoded in image.
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 2 3
- label: ":lab_coat: x-pack unit tests"
key: "x-pack-unit-tests"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as non root (logstash) user. UID is hardcoded in image.
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
x-pack/ci/unit_tests.sh
- label: ":lab_coat: x-pack integration"
key: "integration-tests-x-pack"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
# Run as non root (logstash) user. UID is hardcoded in image.
imageUID: "1002"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
x-pack/ci/integration_tests.sh
- wait: ~
continue_on_failure: true
- label: "🏁 Annotate JUnit results"
# the plugin requires docker run, hence the use of a VM
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-2"
plugins:
- junit-annotate#v2.4.1:
artifacts: "**/TEST-*.xml"

View file

@ -0,0 +1,22 @@
## Steps to set up GCP instance to run benchmark script
- Create an instance "n2-standard-16" with Ubuntu image
- Install docker
- `sudo snap install docker`
- `sudo usermod -a -G docker $USER`
- Install jq
- Install vault
- `sudo snap install vault`
- `vault login --method github`
- `vault kv get -format json secret/ci/elastic-logstash/benchmark`
- Setup Elasticsearch index mapping and alias with `setup/*`
- Import Kibana dashboard with `save-objects/*`
- Run the benchmark script
- Send data to your own Elasticsearch. Customise `VAULT_PATH="secret/ci/elastic-logstash/your/path"`
- Run the script `main.sh`
- or run in background `nohup bash -x main.sh > log.log 2>&1 &`
## Notes
- Benchmarks should only be compared using the same hardware setup.
- Please do not send the test metrics to the benchmark cluster. You can set `VAULT_PATH` to send data and metrics to your own server.
- Run `all.sh` as calibration which gives you a baseline of performance in different versions.
- [#16586](https://github.com/elastic/logstash/pull/16586) allows legacy monitoring using the configuration `xpack.monitoring.allow_legacy_collection: true`, which is not recognized in version 8. To run benchmarks in version 8, use the script of the corresponding branch (e.g. `8.16`) instead of `main` in buildkite.

View file

@ -0,0 +1,15 @@
http.enabled: false
filebeat.inputs:
- type: log
symlinks: true
paths:
- "/usr/share/filebeat/flog/*.log"
logging.level: info
output.logstash:
hosts:
- "localhost:5044"
ttl: 10ms
bulk_max_size: 2048
# queue.mem:
# events: 4096
# flush.min_events: 2048

View file

@ -0,0 +1,10 @@
api.http.host: 0.0.0.0
pipeline.workers: ${WORKER}
pipeline.batch.size: ${BATCH_SIZE}
queue.type: ${QTYPE}
xpack.monitoring.allow_legacy_collection: true
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.username: ${MONITOR_ES_USER}
xpack.monitoring.elasticsearch.password: ${MONITOR_ES_PW}
xpack.monitoring.elasticsearch.hosts: ["${MONITOR_ES_HOST}"]

View file

@ -0,0 +1,44 @@
- pipeline.id: main
config.string: |
input {
beats {
port => 5044
}
}
output {
elasticsearch {
hosts => [ "${BENCHMARK_ES_HOST}" ]
user => "${BENCHMARK_ES_USER}"
password => "${BENCHMARK_ES_PW}"
}
}
- pipeline.id: node_stats
config.string: |
input {
http_poller {
urls => {
NodeStats => {
method => get
url => "http://localhost:9600/_node/stats"
}
}
schedule => { every => "30s"}
codec => "json"
}
}
filter {
mutate {
remove_field => [ "host", "[pipelines][.monitoring-logstash]", "event" ]
add_field => { "[benchmark][label]" => "${QTYPE}_w${WORKER}b${BATCH_SIZE}" }
}
}
output {
elasticsearch {
hosts => [ "${BENCHMARK_ES_HOST}" ]
user => "${BENCHMARK_ES_USER}"
password => "${BENCHMARK_ES_PW}"
data_stream_type => "metrics"
data_stream_dataset => "nodestats"
data_stream_namespace => "logstash"
}
}

View file

@ -0,0 +1 @@
f74f1a28-25e9-494f-ba41-ca9f13d4446d

View file

@ -0,0 +1,331 @@
#!/usr/bin/env bash
set -eo pipefail
SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
CONFIG_PATH="$SCRIPT_PATH/config"
source "$SCRIPT_PATH/util.sh"
usage() {
echo "Usage: $0 [FB_CNT] [QTYPE] [CPU] [MEM]"
echo "Example: $0 4 {persisted|memory|all} 2 2"
exit 1
}
parse_args() {
while [[ "$#" -gt 0 ]]; do
if [ -z "$FB_CNT" ]; then
FB_CNT=$1
elif [ -z "$QTYPE" ]; then
case $1 in
all | persisted | memory)
QTYPE=$1
;;
*)
echo "Error: wrong queue type $1"
usage
;;
esac
elif [ -z "$CPU" ]; then
CPU=$1
elif [ -z "$MEM" ]; then
MEM=$1
else
echo "Error: Too many arguments"
usage
fi
shift
done
# set default value
# number of filebeat
FB_CNT=${FB_CNT:-4}
# all | persisted | memory
QTYPE=${QTYPE:-all}
CPU=${CPU:-4}
MEM=${MEM:-4}
XMX=$((MEM / 2))
IFS=','
# worker multiplier: 1,2,4
MULTIPLIERS="${MULTIPLIERS:-1,2,4}"
read -ra MULTIPLIERS <<< "$MULTIPLIERS"
BATCH_SIZES="${BATCH_SIZES:-500}"
read -ra BATCH_SIZES <<< "$BATCH_SIZES"
# tags to json array
read -ra TAG_ARRAY <<< "$TAGS"
JSON_TAGS=$(printf '"%s",' "${TAG_ARRAY[@]}" | sed 's/,$//')
JSON_TAGS="[$JSON_TAGS]"
IFS=' '
echo "filebeats: $FB_CNT, cpu: $CPU, mem: $MEM, Queue: $QTYPE, worker multiplier: ${MULTIPLIERS[@]}, batch size: ${BATCH_SIZES[@]}"
}
get_secret() {
VAULT_PATH=${VAULT_PATH:-secret/ci/elastic-logstash/benchmark}
VAULT_DATA=$(vault kv get -format json $VAULT_PATH)
BENCHMARK_ES_HOST=$(echo $VAULT_DATA | jq -r '.data.es_host')
BENCHMARK_ES_USER=$(echo $VAULT_DATA | jq -r '.data.es_user')
BENCHMARK_ES_PW=$(echo $VAULT_DATA | jq -r '.data.es_pw')
MONITOR_ES_HOST=$(echo $VAULT_DATA | jq -r '.data.monitor_es_host')
MONITOR_ES_USER=$(echo $VAULT_DATA | jq -r '.data.monitor_es_user')
MONITOR_ES_PW=$(echo $VAULT_DATA | jq -r '.data.monitor_es_pw')
}
pull_images() {
echo "--- Pull docker images"
if [[ -n "$LS_VERSION" ]]; then
# pull image if it doesn't exist in local
[[ -z $(docker images -q docker.elastic.co/logstash/logstash:$LS_VERSION) ]] && docker pull "docker.elastic.co/logstash/logstash:$LS_VERSION"
else
# pull the latest snapshot logstash image
# select the SNAPSHOT artifact with the highest semantic version number
LS_VERSION=$( curl --retry-all-errors --retry 5 --retry-delay 1 -s "https://storage.googleapis.com/artifacts-api/snapshots/main.json" | jq -r '.version' )
BUILD_ID=$(curl --retry-all-errors --retry 5 --retry-delay 1 -s "https://storage.googleapis.com/artifacts-api/snapshots/main.json" | jq -r '.build_id')
ARCH=$(arch)
IMAGE_URL="https://snapshots.elastic.co/${BUILD_ID}/downloads/logstash/logstash-$LS_VERSION-docker-image-$ARCH.tar.gz"
IMAGE_FILENAME="$LS_VERSION.tar.gz"
echo "Download $LS_VERSION from $IMAGE_URL"
[[ ! -e $IMAGE_FILENAME ]] && curl -fsSL --retry-max-time 60 --retry 3 --retry-delay 5 -o "$IMAGE_FILENAME" "$IMAGE_URL"
[[ -z $(docker images -q docker.elastic.co/logstash/logstash:$LS_VERSION) ]] && docker load -i "$IMAGE_FILENAME"
fi
# pull filebeat image
FB_DEFAULT_VERSION="8.13.4"
FB_VERSION=${FB_VERSION:-$FB_DEFAULT_VERSION}
docker pull "docker.elastic.co/beats/filebeat:$FB_VERSION"
}
generate_logs() {
FLOG_FILE_CNT=${FLOG_FILE_CNT:-4}
SINGLE_SIZE=524288000
TOTAL_SIZE="$((FLOG_FILE_CNT * SINGLE_SIZE))"
FLOG_PATH="$SCRIPT_PATH/flog"
mkdir -p $FLOG_PATH
if [[ ! -e "$FLOG_PATH/log${FLOG_FILE_CNT}.log" ]]; then
echo "--- Generate logs in background. log: ${FLOG_FILE_CNT}, each size: 500mb"
docker run -d --name=flog --rm -v $FLOG_PATH:/go/src/data mingrammer/flog -t log -w -o "/go/src/data/log.log" -b $TOTAL_SIZE -p $SINGLE_SIZE
fi
}
check_logs() {
echo "--- Check log generation"
local cnt=0
until [[ -e "$FLOG_PATH/log${FLOG_FILE_CNT}.log" || $cnt -gt 600 ]]; do
echo "wait 30s" && sleep 30
cnt=$((cnt + 30))
done
ls -lah $FLOG_PATH
}
start_logstash() {
LS_CONFIG_PATH=$SCRIPT_PATH/ls/config
mkdir -p $LS_CONFIG_PATH
cp $CONFIG_PATH/pipelines.yml $LS_CONFIG_PATH/pipelines.yml
cp $CONFIG_PATH/logstash.yml $LS_CONFIG_PATH/logstash.yml
cp $CONFIG_PATH/uuid $LS_CONFIG_PATH/uuid
remove_v9_config
LS_JAVA_OPTS=${LS_JAVA_OPTS:--Xmx${XMX}g}
docker run -d --name=ls --net=host --cpus=$CPU --memory=${MEM}g -e LS_JAVA_OPTS="$LS_JAVA_OPTS" \
-e QTYPE="$QTYPE" -e WORKER="$WORKER" -e BATCH_SIZE="$BATCH_SIZE" \
-e BENCHMARK_ES_HOST="$BENCHMARK_ES_HOST" -e BENCHMARK_ES_USER="$BENCHMARK_ES_USER" -e BENCHMARK_ES_PW="$BENCHMARK_ES_PW" \
-e MONITOR_ES_HOST="$MONITOR_ES_HOST" -e MONITOR_ES_USER="$MONITOR_ES_USER" -e MONITOR_ES_PW="$MONITOR_ES_PW" \
-v $LS_CONFIG_PATH/logstash.yml:/usr/share/logstash/config/logstash.yml:ro \
-v $LS_CONFIG_PATH/pipelines.yml:/usr/share/logstash/config/pipelines.yml:ro \
-v $LS_CONFIG_PATH/uuid:/usr/share/logstash/data/uuid:ro \
docker.elastic.co/logstash/logstash:$LS_VERSION
}
remove_v9_config() {
local config_path="$LS_CONFIG_PATH/logstash.yml"
local major_version=$(echo $LS_VERSION | cut -d. -f1)
if [ "$major_version" -lt 9 ]; then
echo "Remove v9 config 'xpack.monitoring.allow_legacy_collection' from logstash.yml"
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' '/xpack\.monitoring\.allow_legacy_collection/d' "$config_path"
else
sed -i '/xpack\.monitoring\.allow_legacy_collection/d' "$config_path"
fi
fi
}
start_filebeat() {
for ((i = 0; i < FB_CNT; i++)); do
FB_PATH="$SCRIPT_PATH/fb${i}"
mkdir -p $FB_PATH
cp $CONFIG_PATH/filebeat.yml $FB_PATH/filebeat.yml
docker run -d --name=fb$i --net=host --user=root \
-v $FB_PATH/filebeat.yml:/usr/share/filebeat/filebeat.yml \
-v $SCRIPT_PATH/flog:/usr/share/filebeat/flog \
docker.elastic.co/beats/filebeat:$FB_VERSION filebeat -e --strict.perms=false
done
}
capture_stats() {
CURRENT=$(jq -r '.flow.output_throughput.current' $NS_JSON)
local eps_1m=$(jq -r '.flow.output_throughput.last_1_minute' $NS_JSON)
local eps_5m=$(jq -r '.flow.output_throughput.last_5_minutes' $NS_JSON)
local worker_util=$(jq -r '.pipelines.main.flow.worker_utilization.last_1_minute' $NS_JSON)
local worker_concurr=$(jq -r '.pipelines.main.flow.worker_concurrency.last_1_minute' $NS_JSON)
local cpu_percent=$(jq -r '.process.cpu.percent' $NS_JSON)
local heap=$(jq -r '.jvm.mem.heap_used_in_bytes' $NS_JSON)
local non_heap=$(jq -r '.jvm.mem.non_heap_used_in_bytes' $NS_JSON)
local q_event_cnt=$(jq -r '.pipelines.main.queue.events_count' $NS_JSON)
local q_size=$(jq -r '.pipelines.main.queue.queue_size_in_bytes' $NS_JSON)
TOTAL_EVENTS_OUT=$(jq -r '.pipelines.main.events.out' $NS_JSON)
printf "current: %s, 1m: %s, 5m: %s, worker_utilization: %s, worker_concurrency: %s, cpu: %s, heap: %s, non-heap: %s, q_events: %s, q_size: %s, total_events_out: %s\n" \
$CURRENT $eps_1m $eps_5m $worker_util $worker_concurr $cpu_percent $heap $non_heap $q_event_cnt $q_size $TOTAL_EVENTS_OUT
}
aggregate_stats() {
local file_glob="$SCRIPT_PATH/$NS_DIR/${QTYPE:0:1}_w${WORKER}b${BATCH_SIZE}_*.json"
MAX_EPS_1M=$( jqmax '.flow.output_throughput.last_1_minute' "$file_glob" )
MAX_EPS_5M=$( jqmax '.flow.output_throughput.last_5_minutes' "$file_glob" )
MAX_WORKER_UTIL=$( jqmax '.pipelines.main.flow.worker_utilization.last_1_minute' "$file_glob" )
MAX_WORKER_CONCURR=$( jqmax '.pipelines.main.flow.worker_concurrency.last_1_minute' "$file_glob" )
MAX_Q_EVENT_CNT=$( jqmax '.pipelines.main.queue.events_count' "$file_glob" )
MAX_Q_SIZE=$( jqmax '.pipelines.main.queue.queue_size_in_bytes' "$file_glob" )
AVG_CPU_PERCENT=$( jqavg '.process.cpu.percent' "$file_glob" )
AVG_VIRTUAL_MEM=$( jqavg '.process.mem.total_virtual_in_bytes' "$file_glob" )
AVG_HEAP=$( jqavg '.jvm.mem.heap_used_in_bytes' "$file_glob" )
AVG_NON_HEAP=$( jqavg '.jvm.mem.non_heap_used_in_bytes' "$file_glob" )
}
send_summary() {
echo "--- Send summary to Elasticsearch"
# build json
local timestamp
timestamp=$(date -u +"%Y-%m-%dT%H:%M:%S")
SUMMARY="{\"timestamp\": \"$timestamp\", \"version\": \"$LS_VERSION\", \"cpu\": \"$CPU\", \"mem\": \"$MEM\", \"workers\": \"$WORKER\", \"batch_size\": \"$BATCH_SIZE\", \"queue_type\": \"$QTYPE\""
not_empty "$TOTAL_EVENTS_OUT" && SUMMARY="$SUMMARY, \"total_events_out\": \"$TOTAL_EVENTS_OUT\""
not_empty "$MAX_EPS_1M" && SUMMARY="$SUMMARY, \"max_eps_1m\": \"$MAX_EPS_1M\""
not_empty "$MAX_EPS_5M" && SUMMARY="$SUMMARY, \"max_eps_5m\": \"$MAX_EPS_5M\""
not_empty "$MAX_WORKER_UTIL" && SUMMARY="$SUMMARY, \"max_worker_utilization\": \"$MAX_WORKER_UTIL\""
not_empty "$MAX_WORKER_CONCURR" && SUMMARY="$SUMMARY, \"max_worker_concurrency\": \"$MAX_WORKER_CONCURR\""
not_empty "$AVG_CPU_PERCENT" && SUMMARY="$SUMMARY, \"avg_cpu_percentage\": \"$AVG_CPU_PERCENT\""
not_empty "$AVG_HEAP" && SUMMARY="$SUMMARY, \"avg_heap\": \"$AVG_HEAP\""
not_empty "$AVG_NON_HEAP" && SUMMARY="$SUMMARY, \"avg_non_heap\": \"$AVG_NON_HEAP\""
not_empty "$AVG_VIRTUAL_MEM" && SUMMARY="$SUMMARY, \"avg_virtual_memory\": \"$AVG_VIRTUAL_MEM\""
not_empty "$MAX_Q_EVENT_CNT" && SUMMARY="$SUMMARY, \"max_queue_events\": \"$MAX_Q_EVENT_CNT\""
not_empty "$MAX_Q_SIZE" && SUMMARY="$SUMMARY, \"max_queue_bytes_size\": \"$MAX_Q_SIZE\""
not_empty "$TAGS" && SUMMARY="$SUMMARY, \"tags\": $JSON_TAGS"
SUMMARY="$SUMMARY}"
tee summary.json << EOF
{"index": {}}
$SUMMARY
EOF
# send to ES
local resp
local err_status
resp=$(curl -s -X POST -u "$BENCHMARK_ES_USER:$BENCHMARK_ES_PW" "$BENCHMARK_ES_HOST/benchmark_summary/_bulk" -H 'Content-Type: application/json' --data-binary @"summary.json")
echo "$resp"
err_status=$(echo "$resp" | jq -r ".errors")
if [[ "$err_status" == "true" ]]; then
echo "Failed to send summary"
exit 1
fi
}
# $1: snapshot index
node_stats() {
NS_JSON="$SCRIPT_PATH/$NS_DIR/${QTYPE:0:1}_w${WORKER}b${BATCH_SIZE}_$1.json" # m_w8b1000_0.json
# curl inside container because docker on mac cannot resolve localhost to host network interface
docker exec -i ls curl localhost:9600/_node/stats > "$NS_JSON" 2> /dev/null
}
# $1: index
snapshot() {
node_stats $1
capture_stats
}
create_directory() {
NS_DIR="fb${FB_CNT}c${CPU}m${MEM}" # fb4c4m4
mkdir -p "$SCRIPT_PATH/$NS_DIR"
}
queue() {
for QTYPE in "persisted" "memory"; do
worker
done
}
worker() {
for m in "${MULTIPLIERS[@]}"; do
WORKER=$((CPU * m))
batch
done
}
batch() {
for BATCH_SIZE in "${BATCH_SIZES[@]}"; do
run_pipeline
stop_pipeline
done
}
run_pipeline() {
echo "--- Run pipeline. queue type: $QTYPE, worker: $WORKER, batch size: $BATCH_SIZE"
start_logstash
start_filebeat
docker ps
echo "(0) sleep 3m" && sleep 180
snapshot "0"
for i in {1..8}; do
echo "($i) sleep 30s" && sleep 30
snapshot "$i"
# print docker log when ingestion rate is zero
# remove '.' in number and return max val
[[ $(max -g "${CURRENT/./}" "0") -eq 0 ]] &&
docker logs fb0 &&
docker logs ls
done
aggregate_stats
send_summary
}
stop_pipeline() {
echo "--- Stop Pipeline"
for ((i = 0; i < FB_CNT; i++)); do
docker stop fb$i
docker rm fb$i
done
docker stop ls
docker rm ls
curl -u "$BENCHMARK_ES_USER:$BENCHMARK_ES_PW" -X DELETE $BENCHMARK_ES_HOST/_data_stream/logs-generic-default
echo " data stream deleted "
# TODO: clean page caches, reduce memory fragmentation
# https://github.com/elastic/logstash/pull/16191#discussion_r1647050216
}
clean_up() {
# stop log generation if it has not done yet
[[ -n $(docker ps | grep flog) ]] && docker stop flog || true
# remove image
docker image rm docker.elastic.co/logstash/logstash:$LS_VERSION
}

View file

@ -0,0 +1,59 @@
#!/usr/bin/env bash
set -eo pipefail
# *******************************************************
# This script does benchmark by running Filebeats (docker) -> Logstash (docker) -> ES Cloud.
# Logstash metrics and benchmark results are sent to the same ES Cloud.
# Highlights:
# - Use flog (docker) to generate ~2GB log
# - Pull the snapshot docker image of the main branch every day
# - Logstash runs two pipelines, main and node_stats
# - The main pipeline handles beats ingestion, sending data to the data stream `logs-generic-default`
# - It runs for all combinations. (pq + mq) x worker x batch size
# - Each test runs for ~7 minutes
# - The node_stats pipeline retrieves Logstash /_node/stats every 30s and sends it to the data stream `metrics-nodestats-logstash`
# - The script sends a summary of EPS and resource usage to index `benchmark_summary`
# *******************************************************
SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
source "$SCRIPT_PATH/core.sh"
## usage:
## main.sh FB_CNT QTYPE CPU MEM
## main.sh 4 all 4 4 # default launch 4 filebeats to benchmark pq and mq
## main.sh 4 memory
## main.sh 4 persisted
## main.sh 4
## main.sh
## accept env vars:
## FB_VERSION=8.13.4 # docker tag
## LS_VERSION=8.15.0-SNAPSHOT # docker tag
## LS_JAVA_OPTS=-Xmx2g # by default, Xmx is set to half of memory
## MULTIPLIERS=1,2,4 # determine the number of workers (cpu * multiplier)
## BATCH_SIZES=125,500
## CPU=4 # number of cpu for Logstash container
## MEM=4 # number of GB for Logstash container
## QTYPE=memory # queue type to test {persisted|memory|all}
## FB_CNT=4 # number of filebeats to use in benchmark
## FLOG_FILE_CNT=4 # number of files to generate for ingestion
## VAULT_PATH=secret/path # vault path point to Elasticsearch credentials. The default value points to benchmark cluster.
## TAGS=test,other # tags with "," separator.
main() {
parse_args "$@"
get_secret
generate_logs
pull_images
check_logs
create_directory
if [[ $QTYPE == "all" ]]; then
queue
else
worker
fi
clean_up
}
main "$@"

View file

@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -eo pipefail
# *******************************************************
# Run benchmark for versions that have flow metrics
# When the hardware changes, run the marathon task to establish a new baseline.
# Usage:
# nohup bash -x all.sh > log.log 2>&1 &
# Accept env vars:
# STACK_VERSIONS=8.15.0,8.15.1,8.16.0-SNAPSHOT # versions to test. It is comma separator string
# *******************************************************
SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
source "$SCRIPT_PATH/core.sh"
parse_stack_versions() {
IFS=','
STACK_VERSIONS="${STACK_VERSIONS:-8.9.0,8.10.0,8.11.0,8.12.0,8.13.0,8.14.0,8.15.5,8.16.6,8.17.5,8.18.0,9.0.0}"
read -ra STACK_VERSIONS <<< "$STACK_VERSIONS"
}
main() {
parse_stack_versions
parse_args "$@"
get_secret
generate_logs
check_logs
USER_QTYPE="$QTYPE"
for V in "${STACK_VERSIONS[@]}" ; do
LS_VERSION="$V"
QTYPE="$USER_QTYPE"
pull_images
create_directory
if [[ $QTYPE == "all" ]]; then
queue
else
worker
fi
done
}
main "$@"

View file

@ -0,0 +1,8 @@
## 20241210
Remove scripted field `5m_num` from dashboards
## 20240912
Updated runtime field `release` to return `true` when `version` contains "SNAPSHOT"
## 20240912
Initial dashboards

View file

@ -0,0 +1,14 @@
benchmark_objects.ndjson contains the following resources
- Dashboards
- daily snapshot
- released versions
- Data Views
- benchmark
- runtime fields
- | Fields Name | Type | Comment |
|--------------|---------------------------------------------------------------------------------------|--------------------------------------------------|
| versions_num | long | convert semantic versioning to number for graph sorting |
| release | boolean | `true` for released version. `false` for snapshot version. It is for graph filtering. |
To import objects to Kibana, navigate to Stack Management > Save Objects and click Import

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
POST /_aliases
{
"actions": [
{ "add": { "index": "benchmark_summary_v2", "alias": "benchmark_summary" } }
]
}

View file

@ -0,0 +1,179 @@
PUT /benchmark_summary_v2/_mapping
{
"properties": {
"avg_cpu_percentage": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"avg_heap": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"avg_non_heap": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"avg_virtual_memory": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"batch_size": {
"type": "integer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"cpu": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"max_eps_1m": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"max_eps_5m": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"max_queue_bytes_size": {
"type": "integer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"max_queue_events": {
"type": "integer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"max_worker_concurrency": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"max_worker_utilization": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"mem": {
"type": "float",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"queue_type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"tag": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"timestamp": {
"type": "date"
},
"total_events_out": {
"type": "integer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"workers": {
"type": "integer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"tags" : {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}

View file

@ -0,0 +1,41 @@
#!/usr/bin/env bash
arch() { uname -m | sed -e "s|amd|x86_|" -e "s|arm|aarch|"; }
# return the min value
# usage:
# g: float; h: human; d: dictionary; M: month
# min -g 3 2 5 1
# max -g 1.5 5.2 2.5 1.2 5.7
# max -g "null" "0"
# min -h 25M 13G 99K 1098M
min() { printf "%s\n" "${@:2}" | sort "$1" | head -n1 ; }
max() { min ${1}r ${@:2} ; }
# return the average of values
# usage:
# jqavg '.process.cpu.percent' m_w8b1000_*.json
# $1: jq field
# $2: file path in glob pattern
jqavg() {
jq -r "$1 | select(. != null)" $2 | jq -s . | jq 'add / length'
}
# return the maximum of values
# usage:
# jqmax '.process.cpu.percent' m_w8b1000_*.json
# $1: jq field
# $2: file path in glob pattern
jqmax() {
jq -r "$1 | select(. != null)" $2 | jq -s . | jq 'max'
}
# return true if $1 is non empty and not "null"
not_empty() {
if [[ -n "$1" && "$1" != "null" ]]; then
return 0
else
return 1
fi
}

View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
# **********************************************************
# Returns true if current checkout compared to parent commit
# has changes ONLY matching the argument regexp
#
# Used primarily to skip running the exhaustive pipeline
# when only docs changes have happened.
# ********************************************************
if [[ -z "$1" ]]; then
echo "Usage: $0 <regexp>"
exit 1
fi
previous_commit=$(git rev-parse HEAD^)
changed_files=$(git diff --name-only $previous_commit)
if [[ -n "$changed_files" ]] && [[ -z "$(echo "$changed_files" | grep -vE "$1")" ]]; then
echo "All files compared to the previous commit [$previous_commit] match the specified regex: [$1]"
echo "Files changed:"
git --no-pager diff --name-only HEAD^
exit 0
else
exit 1
fi

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# ********************************************************
# This file contains prerequisite bootstrap invocations
# required for Logstash CI when using containerized agents
# ********************************************************
set -euo pipefail
if [[ $(whoami) == "logstash" ]]
then
export PATH="/home/logstash/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
else
export PATH="/usr/local/rbenv/bin:$PATH"
eval "$(rbenv init -)"
fi

View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# ********************************************************
# Source this script to get the QUALIFIED_VERSION env var
# or execute it to receive the qualified version on stdout
# ********************************************************
set -euo pipefail
export QUALIFIED_VERSION="$(
# Extract the version number from the version.yml file
# e.g.: 8.6.0
printf '%s' "$(awk -F':' '{ if ("logstash" == $1) { gsub(/^ | $/,"",$2); printf $2; exit } }' versions.yml)"
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases for staging builds only:
# e.g: 8.0.0-alpha1
printf '%s' "${VERSION_QUALIFIER:+-${VERSION_QUALIFIER}}"
# add the SNAPSHOT tag unless WORKFLOW_TYPE=="staging" or RELEASE=="1"
if [[ ! ( "${WORKFLOW_TYPE:-}" == "staging" || "${RELEASE:+$RELEASE}" == "1" ) ]]; then
printf '%s' "-SNAPSHOT"
fi
)"
# if invoked directly, output the QUALIFIED_VERSION to stdout
if [[ "$0" == "${BASH_SOURCE:-${ZSH_SCRIPT:-}}" ]]; then
printf '%s' "${QUALIFIED_VERSION}"
fi

View file

@ -0,0 +1,106 @@
#!/usr/bin/env bash
set -eo pipefail
# *******************************************************
# this script is used by schedule-type pipelines
# to automate triggering other pipelines (e.g. DRA) based
# on ci/branches.json
#
# See:
# https://elasticco.atlassian.net/browse/ENGPRD-318 /
# https://github.com/elastic/ingest-dev/issues/2664
# *******************************************************
ACTIVE_BRANCHES_URL="https://storage.googleapis.com/artifacts-api/snapshots/branches.json"
EXCLUDE_BRANCHES_ARRAY=()
BRANCHES=()
function install_yq() {
if ! [[ -x $(which yq) && $(yq --version) == *mikefarah* ]]; then
echo "--- Downloading prerequisites"
curl -fsSL --retry-max-time 60 --retry 3 --retry-delay 5 -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod a+x /usr/local/bin/yq
fi
}
function parse_pipelines() {
IFS="," read -ra PIPELINES <<< "$PIPELINES_TO_TRIGGER"
}
# converts the (optional) $EXCLUDE_BRANCHES env var, containing a comma separated branches string, to $EXCLUDE_BRANCHES_ARRAY
function exclude_branches_to_array() {
if [[ ! -z "$EXCLUDE_BRANCHES" ]]; then
IFS="," read -ra EXCLUDE_BRANCHES_ARRAY <<< "$EXCLUDE_BRANCHES"
fi
}
function check_if_branch_in_exclude_array() {
local branch=$1
local _excl_br
local ret_val="false"
for _excl_br in "${EXCLUDE_BRANCHES_ARRAY[@]}"; do
if [[ "$branch" == "$_excl_br" ]]; then
ret_val="true"
break
fi
done
echo $ret_val
}
if [[ -z $PIPELINES_TO_TRIGGER ]]; then
echo "^^^ +++"
echo "Required environment variable [PIPELINES_TO_TRIGGER] is missing."
echo "Exiting now."
exit 1
fi
parse_pipelines
exclude_branches_to_array
set -u
set +e
# pull releaseable branches from $ACTIVE_BRANCHES_URL
readarray -t ELIGIBLE_BRANCHES < <(curl --retry-all-errors --retry 5 --retry-delay 5 -fsSL $ACTIVE_BRANCHES_URL | jq -r '.branches[]')
if [[ $? -ne 0 ]]; then
echo "There was an error downloading or parsing the json output from [$ACTIVE_BRANCHES_URL]. Exiting."
exit 1
fi
set -e
if [[ ${#EXCLUDE_BRANCHES_ARRAY[@]} -eq 0 ]]; then
# no branch exclusions
BRANCHES=("${ELIGIBLE_BRANCHES[@]}")
else
# exclude any branches passed via optional $EXCLUDE_BRANCHES
for _branch in "${ELIGIBLE_BRANCHES[@]}"; do
res=$(check_if_branch_in_exclude_array $_branch)
if [[ "$res" == "false" ]]; then
BRANCHES+=("$_branch")
fi
done
fi
install_yq
echo 'steps:' >pipeline_steps.yaml
for PIPELINE in "${PIPELINES[@]}"; do
for BRANCH in "${BRANCHES[@]}"; do
cat >>pipeline_steps.yaml <<EOF
- trigger: $PIPELINE
label: ":testexecute: Triggering ${PIPELINE} / ${BRANCH}"
build:
branch: "$BRANCH"
message: ":testexecute: Scheduled build for ${BRANCH}"
EOF
done
done
echo "--- Printing generated steps"
yq . pipeline_steps.yaml
echo "--- Uploading steps to buildkite"
cat pipeline_steps.yaml | buildkite-agent pipeline upload

View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# **************************************************************
# This file contains prerequisite bootstrap invocations
# required for Logstash CI when using custom multi-jdk VM images
# It is primarily used by the exhaustive BK pipeline.
# **************************************************************
set -euo pipefail
source .ci/java-versions.properties
export BUILD_JAVA_HOME=/opt/buildkite-agent/.java/$LS_BUILD_JAVA
export PATH="/opt/buildkite-agent/.rbenv/bin:/opt/buildkite-agent/.pyenv/bin:$BUILD_JAVA_HOME/bin:$PATH"
eval "$(rbenv init -)"

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# ********************************************************
# This file contains prerequisite bootstrap invocations
# required for Logstash CI when using VM/baremetal agents
# ********************************************************
set -euo pipefail
export PATH="/opt/buildkite-agent/.rbenv/bin:/opt/buildkite-agent/.pyenv/bin:/opt/buildkite-agent/.java/bin:$PATH"
export JAVA_HOME="/opt/buildkite-agent/.java"
eval "$(rbenv init -)"

View file

@ -0,0 +1,13 @@
{
"#comment": "This file lists all custom vm images. We use it to make decisions about randomized CI jobs.",
"linux": {
"ubuntu": ["ubuntu-2404", "ubuntu-2204", "ubuntu-2004"],
"debian": ["debian-12", "debian-11"],
"rhel": ["rhel-9", "rhel-8"],
"oraclelinux": ["oraclelinux-8", "oraclelinux-7"],
"rocky": ["rocky-linux-8"],
"amazonlinux": ["amazonlinux-2023"],
"opensuse": ["opensuse-leap-15"]
},
"windows": ["windows-2025", "windows-2022", "windows-2019", "windows-2016"]
}

View file

@ -0,0 +1,55 @@
#!/bin/bash -ie
#Note - ensure that the -e flag is set to properly set the $? status if any command fails
echo "####################################################################"
echo "##################### Starting $0"
echo "####################################################################"
source ./$(dirname "$0")/common.sh
# WORKFLOW_TYPE is a CI externally configured environment variable that could assume "snapshot" or "staging" values
info "Building artifacts for the $WORKFLOW_TYPE workflow ..."
case "$WORKFLOW_TYPE" in
snapshot)
: # no-op
;;
staging)
export RELEASE=1
;;
*)
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
rake artifact:docker || error "artifact:docker build failed."
rake artifact:docker_oss || error "artifact:docker_oss build failed."
rake artifact:docker_wolfi || error "artifact:docker_wolfi build failed."
rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
STACK_VERSION="$(./$(dirname "$0")/../common/qualified-version.sh)"
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
info "Saving tar.gz for docker images"
save_docker_tarballs "${ARCH}" "${STACK_VERSION}"
info "Generated Artifacts"
for file in build/logstash-*; do shasum $file;done
info "Uploading DRA artifacts in buildkite's artifact store ..."
# Note the deb, rpm tar.gz AARCH64 files generated has already been loaded by the build_packages.sh
images="logstash logstash-oss logstash-wolfi"
for image in ${images}; do
buildkite-agent artifact upload "build/$image-${STACK_VERSION}-docker-image-${ARCH}.tar.gz"
done
# Upload 'docker-build-context.tar.gz' files only when build x86_64, otherwise they will be
# overwritten when building aarch64 (or viceversa).
if [ "$ARCH" != "aarch64" ]; then
for image in logstash logstash-oss logstash-wolfi logstash-ironbank; do
buildkite-agent artifact upload "build/${image}-${STACK_VERSION}-docker-build-context.tar.gz"
done
fi
echo "####################################################################"
echo "##################### Finishing $0"
echo "####################################################################"

View file

@ -0,0 +1,44 @@
#!/bin/bash -ie
#Note - ensure that the -e flag is set to properly set the $? status if any command fails
echo "####################################################################"
echo "##################### Starting $0"
echo "####################################################################"
source ./$(dirname "$0")/common.sh
# WORKFLOW_TYPE is a CI externally configured environment variable that could assume "snapshot" or "staging" values
info "Building artifacts for the $WORKFLOW_TYPE workflow ..."
case "$WORKFLOW_TYPE" in
snapshot)
: # no-op
;;
staging)
export RELEASE=1
;;
*)
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
STACK_VERSION="$(./$(dirname "$0")/../common/qualified-version.sh)"
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
info "Generated Artifacts"
for file in build/logstash-*; do shasum $file;done
info "Creating dependencies report for ${STACK_VERSION}"
mkdir -p build/distributions/dependencies-reports/
bin/dependencies-report --csv=build/distributions/dependencies-reports/logstash-${STACK_VERSION}.csv
info "Generated dependencies report"
shasum build/distributions/dependencies-reports/logstash-${STACK_VERSION}.csv
info "Uploading DRA artifacts in buildkite's artifact store ..."
buildkite-agent artifact upload "build/logstash*;build/distributions/dependencies-reports/logstash*"
echo "####################################################################"
echo "##################### Finishing $0"
echo "####################################################################"

View file

@ -0,0 +1,42 @@
function info {
echo "--- INFO: $1"
}
function error {
echo "--- ERROR: $1"
exit 1
}
function save_docker_tarballs {
local arch="${1:?architecture required}"
local version="${2:?stack-version required}"
local images="logstash logstash-oss logstash-wolfi"
for image in ${images}; do
tar_file="${image}-${version}-docker-image-${arch}.tar"
docker save -o "build/${tar_file}" \
"docker.elastic.co/logstash/${image}:${version}" || \
error "Unable to save tar file ${tar_file} for ${image} image."
# NOTE: if docker save exited with non-zero the error log already exited the script
gzip "build/${tar_file}"
done
}
# Since we are using the system jruby, we need to make sure our jvm process
# uses at least 1g of memory, If we don't do this we can get OOM issues when
# installing gems. See https://github.com/elastic/logstash/issues/5179
export JRUBY_OPTS="-J-Xmx4g"
# Extract the version number from the version.yml file
# e.g.: 8.6.0
# The suffix part like alpha1 etc is managed by the optional VERSION_QUALIFIER environment variable
STACK_VERSION=`cat versions.yml | sed -n 's/^logstash\:[[:space:]]\([[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\)$/\1/p'`
info "Agent is running on architecture [$(uname -i)]"
export VERSION_QUALIFIER=${VERSION_QUALIFIER:-""}
export DRA_DRY_RUN=${DRA_DRY_RUN:-""}
if [[ ! -z $DRA_DRY_RUN && $BUILDKITE_STEP_KEY == "logstash_publish_dra" ]]; then
info "Release manager will run in dry-run mode [$DRA_DRY_RUN]"
fi

View file

@ -0,0 +1,23 @@
#!/bin/bash
set -euo pipefail
DOCKER_REGISTRY="docker.elastic.co"
DOCKER_REGISTRY_SECRET_PATH="kv/ci-shared/platform-ingest/docker_registry_prod"
CI_DRA_ROLE_PATH="kv/ci-shared/release/dra-role"
function docker_login {
DOCKER_USERNAME_SECRET=$(retry -t 5 -- vault kv get -field user "${DOCKER_REGISTRY_SECRET_PATH}")
DOCKER_PASSWORD_SECRET=$(retry -t 5 -- vault kv get -field password "${DOCKER_REGISTRY_SECRET_PATH}")
docker login -u "${DOCKER_USERNAME_SECRET}" -p "${DOCKER_PASSWORD_SECRET}" "${DOCKER_REGISTRY}" 2>/dev/null
unset DOCKER_USERNAME_SECRET DOCKER_PASSWORD_SECRET
}
function release_manager_login {
DRA_CREDS_SECRET=$(retry -t 5 -- vault kv get -field=data -format=json ${CI_DRA_ROLE_PATH})
VAULT_ADDR_SECRET=$(echo ${DRA_CREDS_SECRET} | jq -r '.vault_addr')
VAULT_ROLE_ID=$(echo ${DRA_CREDS_SECRET} | jq -r '.role_id')
VAULT_SECRET_ID=$(echo ${DRA_CREDS_SECRET} | jq -r '.secret_id')
export VAULT_ADDR_SECRET VAULT_ROLE_ID VAULT_SECRET_ID
}

View file

@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail
# Unset all variables ending with _SECRET or _TOKEN
for var in $(printenv | sed 's;=.*;;' | sort); do
if [[ $var != "VAULT_ADDR" && ("$var" == *_SECRET || "$var" == *_TOKEN || "$var" == *VAULT* ) ]]; then
unset "$var"
fi
done
if command -v docker &>/dev/null; then
DOCKER_REGISTRY="docker.elastic.co"
docker logout $DOCKER_REGISTRY
fi

View file

@ -0,0 +1,147 @@
import os
import sys
import yaml
YAML_HEADER = '# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json\n'
def to_bk_key_friendly_string(key):
"""
Convert and return key to an acceptable format for Buildkite's key: field
Only alphanumerics, dashes and underscores are allowed.
"""
mapping_table = str.maketrans({'.': '_'})
return key.translate(mapping_table)
def package_x86_step(branch, workflow_type):
step = f'''
- label: ":package: Build packages / {branch}-{workflow_type.upper()} DRA artifacts"
key: "logstash_build_packages_dra"
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-16"
diskSizeGb: 200
command: |
export WORKFLOW_TYPE="{workflow_type}"
export PATH="/opt/buildkite-agent/.rbenv/bin:/opt/buildkite-agent/.pyenv/bin:$PATH"
eval "$(rbenv init -)"
.buildkite/scripts/dra/build_packages.sh
artifact_paths:
- "**/*.hprof"
'''
return step
def package_x86_docker_step(branch, workflow_type):
step = f'''
- label: ":package: Build x86_64 Docker / {branch}-{workflow_type.upper()} DRA artifacts"
key: "logstash_build_x86_64_docker_dra"
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-16"
diskSizeGb: 200
artifact_paths:
- "**/*.hprof"
command: |
export WORKFLOW_TYPE="{workflow_type}"
export PATH="/opt/buildkite-agent/.rbenv/bin:/opt/buildkite-agent/.pyenv/bin:$PATH"
export ARCH="x86_64"
eval "$(rbenv init -)"
.buildkite/scripts/dra/build_docker.sh
'''
return step
def package_aarch64_docker_step(branch, workflow_type):
step = f'''
- label: ":package: Build aarch64 Docker / {branch}-{workflow_type.upper()} DRA artifacts"
key: "logstash_build_aarch64_docker_dra"
agents:
provider: aws
imagePrefix: platform-ingest-logstash-ubuntu-2204-aarch64
instanceType: "m6g.4xlarge"
diskSizeGb: 200
artifact_paths:
- "**/*.hprof"
command: |
export WORKFLOW_TYPE="{workflow_type}"
export PATH="/opt/buildkite-agent/.rbenv/bin:/opt/buildkite-agent/.pyenv/bin:$PATH"
export ARCH="aarch64"
eval "$(rbenv init -)"
.buildkite/scripts/dra/build_docker.sh
'''
return step
def publish_dra_step(branch, workflow_type, depends_on):
step = f'''
- label: ":elastic-stack: Publish / {branch}-{workflow_type.upper()} DRA artifacts"
key: "logstash_publish_dra"
depends_on: "{depends_on}"
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-16"
diskSizeGb: 200
command: |
echo "+++ Restoring Artifacts"
buildkite-agent artifact download "build/logstash*" .
buildkite-agent artifact download "build/distributions/**/*" .
echo "+++ Changing permissions for the release manager"
sudo chown -R :1000 build
echo "+++ Running DRA publish step"
export WORKFLOW_TYPE="{workflow_type}"
.buildkite/scripts/dra/publish.sh
'''
return step
def build_steps_to_yaml(branch, workflow_type):
steps = []
steps.extend(yaml.safe_load(package_x86_step(branch, workflow_type)))
steps.extend(yaml.safe_load(package_x86_docker_step(branch, workflow_type)))
steps.extend(yaml.safe_load(package_aarch64_docker_step(branch, workflow_type)))
return steps
if __name__ == "__main__":
try:
workflow_type = os.environ["WORKFLOW_TYPE"]
version_qualifier = os.environ.get("VERSION_QUALIFIER", "")
except ImportError:
print(f"Missing env variable WORKFLOW_TYPE. Use export WORKFLOW_TYPE=<staging|snapshot>\n.Exiting.")
exit(1)
branch = os.environ["BUILDKITE_BRANCH"]
structure = {"steps": []}
if workflow_type.upper() == "SNAPSHOT" and len(version_qualifier)>0:
structure["steps"].append({
"label": f"no-op pipeline because prerelease builds (VERSION_QUALIFIER is set to [{version_qualifier}]) don't support the [{workflow_type}] workflow",
"command": ":",
"skip": "VERSION_QUALIFIER (prerelease builds) not supported with SNAPSHOT DRA",
})
else:
# Group defining parallel steps that build and save artifacts
group_key = to_bk_key_friendly_string(f"logstash_dra_{workflow_type}")
structure["steps"].append({
"group": f":Build Artifacts - {workflow_type.upper()}",
"key": group_key,
"steps": build_steps_to_yaml(branch, workflow_type),
})
# Final step: pull artifacts built above and publish them via the release-manager
structure["steps"].extend(
yaml.safe_load(publish_dra_step(branch, workflow_type, depends_on=group_key)),
)
print(YAML_HEADER + yaml.dump(structure, Dumper=yaml.Dumper, sort_keys=False))

118
.buildkite/scripts/dra/publish.sh Executable file
View file

@ -0,0 +1,118 @@
#!/bin/bash -i
set -euo pipefail
echo "####################################################################"
echo "##################### Starting $0"
echo "####################################################################"
source ./$(dirname "$0")/common.sh
# DRA_BRANCH can be used for manually testing packaging with PRs
# e.g. define `DRA_BRANCH="main"` and `RUN_SNAPSHOT="true"` under Options/Environment Variables in the Buildkite UI after clicking new Build
BRANCH="${DRA_BRANCH:="${BUILDKITE_BRANCH:=""}"}"
# This is the branch selector that needs to be passed to the release-manager
# It has to be the name of the branch which originates the artifacts.
RELEASE_VER=`cat versions.yml | sed -n 's/^logstash\:[[:space:]]\([[:digit:]]*\.[[:digit:]]*\)\.[[:digit:]]*$/\1/p'`
if [ -n "$(git ls-remote --heads origin $RELEASE_VER)" ] ; then
RELEASE_BRANCH=$RELEASE_VER
else
RELEASE_BRANCH="${BRANCH:="main"}"
fi
echo "RELEASE BRANCH: $RELEASE_BRANCH"
VERSION_QUALIFIER="${VERSION_QUALIFIER:=""}"
case "$WORKFLOW_TYPE" in
snapshot)
:
;;
staging)
;;
*)
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
info "Uploading artifacts for ${WORKFLOW_TYPE} workflow on branch: ${RELEASE_BRANCH} for version: ${STACK_VERSION} with version_qualifier: ${VERSION_QUALIFIER}"
if [ "$RELEASE_VER" != "7.17" ]; then
# Version 7.17.x doesn't generates ARM artifacts for Darwin
# TODO see if we need to do anything here
:
fi
info "Downloaded ARTIFACTS sha report"
for file in build/logstash-*; do shasum $file;done
FINAL_VERSION="$(./$(dirname "$0")/../common/qualified-version.sh)"
mv build/distributions/dependencies-reports/logstash-${FINAL_VERSION}.csv build/distributions/dependencies-${FINAL_VERSION}.csv
# set required permissions on artifacts and directory
chmod -R a+r build/*
chmod -R a+w build
chmod -R a+r $PWD/*
chmod -R a+w $PWD
info "Setup docker credentials"
# TODO disable tracing
# set +o xtrace
source ./$(dirname "$0")/docker-env-setup.sh
release_manager_login
# ensure the latest image has been pulled
docker pull docker.elastic.co/infra/release-manager:latest
echo "+++ :clipboard: Listing DRA artifacts for version [$STACK_VERSION], branch [$RELEASE_BRANCH], workflow [$WORKFLOW_TYPE], QUALIFIER [$VERSION_QUALIFIER]"
docker run --rm \
--name release-manager \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
--mount type=bind,readonly=false,src="$PWD",target=/artifacts \
docker.elastic.co/infra/release-manager:latest \
cli list \
--project logstash \
--branch "${RELEASE_BRANCH}" \
--commit "$(git rev-parse HEAD)" \
--workflow "${WORKFLOW_TYPE}" \
--version "${STACK_VERSION}" \
--artifact-set main \
--qualifier "${VERSION_QUALIFIER}"
info "Running the release manager ..."
# collect the artifacts for use with the unified build
docker run --rm \
--name release-manager \
-e VAULT_ADDR="${VAULT_ADDR_SECRET}" \
-e VAULT_ROLE_ID \
-e VAULT_SECRET_ID \
--mount type=bind,readonly=false,src="$PWD",target=/artifacts \
docker.elastic.co/infra/release-manager:latest \
cli collect \
--project logstash \
--branch ${RELEASE_BRANCH} \
--commit "$(git rev-parse HEAD)" \
--workflow "${WORKFLOW_TYPE}" \
--version "${STACK_VERSION}" \
--artifact-set main \
--qualifier "${VERSION_QUALIFIER}" \
${DRA_DRY_RUN} | tee rm-output.txt
# extract the summary URL from a release manager output line like:
# Report summary-8.22.0.html can be found at https://artifacts-staging.elastic.co/logstash/8.22.0-ABCDEFGH/summary-8.22.0.html
SUMMARY_URL=$(grep -E '^Report summary-.* can be found at ' rm-output.txt | grep -oP 'https://\S+' | awk '{print $1}')
rm rm-output.txt
# and make it easily clickable as a Builkite annotation
printf "**Summary link:** [${SUMMARY_URL}](${SUMMARY_URL})\n" | buildkite-agent annotate --style=success
info "Teardown logins"
$(dirname "$0")/docker-env-teardown.sh
echo "####################################################################"
echo "##################### Finishing $0"
echo "####################################################################"

View file

@ -0,0 +1,219 @@
import json
import os
import random
import sys
import typing
from ruamel.yaml import YAML
from ruamel.yaml.scalarstring import LiteralScalarString
VM_IMAGES_FILE = ".buildkite/scripts/common/vm-images.json"
VM_IMAGE_PREFIX = "platform-ingest-logstash-multi-jdk-"
ACCEPTANCE_LINUX_OSES = ["ubuntu-2404", "ubuntu-2204", "ubuntu-2004", "debian-11", "rhel-8", "oraclelinux-7", "rocky-linux-8", "opensuse-leap-15", "amazonlinux-2023"]
CUR_PATH = os.path.dirname(os.path.abspath(__file__))
def slugify_bk_key(key: str) -> str:
"""
Convert and return key to an acceptable format for Buildkite's key: field
Only alphanumerics, dashes and underscores are allowed.
"""
mapping_table = str.maketrans({'.': '_', ' ': '_', '/': '_'})
return key.translate(mapping_table)
def testing_phase_steps() -> typing.Dict[str, typing.List[typing.Any]]:
with open(os.path.join(CUR_PATH, "..", "..", "pull_request_pipeline.yml")) as fp:
return YAML().load(fp)
def compat_linux_step(imagesuffix: str) -> dict[str, typing.Any]:
linux_command = LiteralScalarString("""#!/usr/bin/env bash
set -eo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/unit_tests.sh""")
return compat_step(imagesuffix, command=linux_command)
def compat_windows_step(imagesuffix: str) -> dict[str, typing.Any]:
windows_command = LiteralScalarString(r'''.\\ci\\unit_tests.ps1''')
return compat_step(imagesuffix, command=windows_command)
def compat_step(imagesuffix: str, command: LiteralScalarString) -> dict[str, typing.Any]:
step = {
"label": imagesuffix,
"key": slugify_bk_key(f"compat-linux-{imagesuffix}"),
"command": command,
"agents": {},
"retry": {"automatic": [{"limit": 3}]},
}
if "amazon" in imagesuffix.lower():
step["agents"] = {
"provider": "aws",
"imagePrefix": f"{VM_IMAGE_PREFIX}{imagesuffix}",
"instanceType": "m5.2xlarge",
"diskSizeGb": 200,
}
else:
step["agents"] = {
"provider": "gcp",
"imageProject": "elastic-images-prod",
"image": f"family/{VM_IMAGE_PREFIX}{imagesuffix}",
"machineType": "n2-standard-4",
"diskSizeGb": 200,
"diskType": "pd-ssd",
}
return step
def randomized_linux_oses() -> typing.List[str]:
with open(VM_IMAGES_FILE, "r") as fp:
all_oses = json.load(fp)
randomized_oses = []
for _, family_oses in all_oses["linux"].items():
randomized_oses.append(random.choice(family_oses))
return randomized_oses
def randomized_windows_os() -> str:
with open(VM_IMAGES_FILE, "r") as fp:
all_oses = json.load(fp)
return random.choice(all_oses["windows"])
def aws_agent(vm_name: str, instance_type: str, image_prefix: str = "platform-ingest-logstash-multi-jdk", disk_size_gb: int = 200) -> dict[str, typing.Any]:
return {
"provider": "aws",
"imagePrefix": f"{image_prefix}-{vm_name}",
"instanceType": instance_type,
"diskSizeGb": disk_size_gb,
}
def gcp_agent(vm_name: str, instance_type: str = "n2-standard-4", image_prefix: str = "family/platform-ingest-logstash-multi-jdk", disk_size_gb: int = 200) -> dict[str, typing.Any]:
return {
"provider": "gcp",
"imageProject": "elastic-images-prod",
"image": f"{image_prefix}-{vm_name}",
"machineType": instance_type,
"diskSizeGb": disk_size_gb,
"diskType": "pd-ssd",
}
def acceptance_linux_vms() -> typing.List[str]:
acceptance_linux_vms = os.getenv("ACCEPTANCE_LINUX_OSES")
if acceptance_linux_vms:
acceptance_linux_vms = acceptance_linux_vms.split(",")
else:
acceptance_linux_vms = ACCEPTANCE_LINUX_OSES
return acceptance_linux_vms
def acceptance_linux_steps() -> list[typing.Any]:
steps = []
build_artifacts_step = {
"label": "Build artifacts",
"key": "acceptance-build-artifacts",
# use the same agent as the one we use for building DRA artifacts
"agents": gcp_agent("ubuntu-2204", instance_type="n2-standard-16", image_prefix="family/platform-ingest-logstash"),
"command": LiteralScalarString("""#!/usr/bin/env bash
set -eo pipefail
source .buildkite/scripts/common/vm-agent.sh
echo "--- Building all artifacts"
./gradlew clean bootstrap
rake artifact:deb artifact:rpm
"""),
"artifact_paths": [
"build/*rpm",
"build/*deb",
"build/*tar.gz",
],
}
steps.append(build_artifacts_step)
for vm in acceptance_linux_vms():
step = {
"label": vm,
"key": slugify_bk_key(vm),
"agents": aws_agent(vm,instance_type="m5.4xlarge") if "amazonlinux" in vm else gcp_agent(vm),
"depends_on": "acceptance-build-artifacts",
"retry": {"automatic": [{"limit": 3}]},
"command": LiteralScalarString("""#!/usr/bin/env bash
set -eo pipefail
source .buildkite/scripts/common/vm-agent-multi-jdk.sh
source /etc/os-release
ci/acceptance_tests.sh"""),
}
steps.append(step)
return steps
def acceptance_docker_steps()-> list[typing.Any]:
steps = []
for flavor in ["full", "oss", "ubi", "wolfi"]:
steps.append({
"label": f":docker: {flavor} flavor acceptance",
"agents": gcp_agent(vm_name="ubuntu-2204", image_prefix="family/platform-ingest-logstash"),
"command": LiteralScalarString(f"""#!/usr/bin/env bash
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/docker_acceptance_tests.sh {flavor}"""),
"retry": {"automatic": [{"limit": 3}]},
})
return steps
if __name__ == "__main__":
LINUX_OS_ENV_VAR_OVERRIDE = os.getenv("LINUX_OS")
WINDOWS_OS_ENV_VAR_OVERRIDE = os.getenv("WINDOWS_OS")
compat_linux_steps = []
linux_test_oses = [LINUX_OS_ENV_VAR_OVERRIDE] if LINUX_OS_ENV_VAR_OVERRIDE else randomized_linux_oses()
for linux_os in linux_test_oses:
compat_linux_steps.append(compat_linux_step(linux_os))
windows_test_os = WINDOWS_OS_ENV_VAR_OVERRIDE or randomized_windows_os()
structure = {"steps": []}
structure["steps"].append({
"group": "Testing Phase",
"key": "testing-phase",
**testing_phase_steps(),
})
structure["steps"].append({
"group": "Compatibility / Linux",
"key": "compatibility-linux",
"depends_on": "testing-phase",
"steps": compat_linux_steps,
})
structure["steps"].append({
"group": "Compatibility / Windows",
"key": "compatibility-windows",
"depends_on": "testing-phase",
"steps": [compat_windows_step(imagesuffix=windows_test_os)],
})
structure["steps"].append({
"group": "Acceptance / Packaging",
"key": "acceptance-packaging",
"depends_on": ["testing-phase"],
"steps": acceptance_linux_steps(),
})
structure["steps"].append({
"group": "Acceptance / Docker",
"key": "acceptance-docker",
"depends_on": ["testing-phase"],
"steps": acceptance_docker_steps(),
})
print('# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json')
YAML().dump(structure, sys.stdout)

View file

@ -0,0 +1,18 @@
## Description
This package for integration tests of the Health Report API.
Export `LS_BRANCH` to run on a specific branch. By default, it uses the main branch.
## How to run the Health Report Integration test?
### Prerequisites
Make sure you have python installed. Install the integration test dependencies with the following command:
```shell
python3 -mpip install -r .buildkite/scripts/health-report-tests/requirements.txt
```
### Run the integration tests
```shell
python3 .buildkite/scripts/health-report-tests/main.py
```
### Troubleshooting
- If you get `WARNING: pip is configured with locations that require TLS/SSL,...` warning message, make sure you have python >=3.12.4 installed.

View file

@ -0,0 +1,111 @@
"""
Health Report Integration test bootstrapper with Python script
- A script to resolve Logstash version if not provided
- Download LS docker image and spin up
- When tests finished, teardown the Logstash
"""
import os
import subprocess
import time
import util
import yaml
class Bootstrap:
ELASTIC_STACK_RELEASED_VERSION_URL = "https://storage.googleapis.com/artifacts-api/releases/current/"
def __init__(self) -> None:
f"""
A constructor of the {Bootstrap}.
Returns:
Resolves Logstash branch considering provided LS_BRANCH
Checks out git branch
"""
logstash_branch = os.environ.get("LS_BRANCH")
if logstash_branch is None:
# version is not specified, use the main branch, no need to git checkout
print(f"LS_BRANCH is not specified, using main branch.")
else:
# LS_BRANCH accepts major latest as a major.x or specific branch as X.Y
if logstash_branch.find(".x") == -1:
print(f"Using specified branch: {logstash_branch}")
util.git_check_out_branch(logstash_branch)
else:
major_version = logstash_branch.split(".")[0]
if major_version and major_version.isnumeric():
resolved_version = self.__resolve_latest_stack_version_for(major_version)
minor_version = resolved_version.split(".")[1]
branch = major_version + "." + minor_version
print(f"Using resolved branch: {branch}")
util.git_check_out_branch(branch)
else:
raise ValueError(f"Invalid value set to LS_BRANCH. Please set it properly (ex: 8.x or 9.0) and "
f"rerun again")
def __resolve_latest_stack_version_for(self, major_version: str) -> str:
resp = util.call_url_with_retry(self.ELASTIC_STACK_RELEASED_VERSION_URL + major_version)
release_version = resp.text.strip()
print(f"Resolved latest version for {major_version} is {release_version}.")
if release_version == "":
raise ValueError(f"Cannot resolve latest version for {major_version} major")
return release_version
def install_plugin(self, plugin_path: str) -> None:
util.run_or_raise_error(
["bin/logstash-plugin", "install", plugin_path],
f"Failed to install {plugin_path}")
def build_logstash(self):
print(f"Building Logstash...")
util.run_or_raise_error(
["./gradlew", "clean", "bootstrap", "assemble", "installDefaultGems"],
"Failed to build Logstash")
print(f"Logstash has successfully built.")
def apply_config(self, config: dict) -> None:
with open(os.getcwd() + "/.buildkite/scripts/health-report-tests/config/pipelines.yml", 'w') as pipelines_file:
yaml.dump(config, pipelines_file)
def run_logstash(self, full_start_required: bool) -> subprocess.Popen:
# --config.reload.automatic is to make instance active
# it is helpful when testing crash pipeline cases
config_path = os.getcwd() + "/.buildkite/scripts/health-report-tests/config"
process = subprocess.Popen(["bin/logstash", "--config.reload.automatic", "--path.settings", config_path,
"-w 1"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, shell=False)
if process.poll() is not None:
print(f"Logstash failed to run, check the the config and logs, then rerun.")
return None
# Read stdout and stderr in real-time
logs = []
for stdout_line in iter(process.stdout.readline, ""):
logs.append(stdout_line.strip())
# we don't wait for Logstash fully start as we also test slow pipeline start scenarios
if full_start_required is False and "Starting pipeline" in stdout_line:
break
if full_start_required is True and "Pipeline started" in stdout_line:
break
if "Logstash shut down" in stdout_line or "Logstash stopped" in stdout_line:
print(f"Logstash couldn't spin up.")
print(logs)
return None
print(f"Logstash is running with PID: {process.pid}.")
return process
def stop_logstash(self, process: subprocess.Popen):
start_time = time.time() # in seconds
process.terminate()
for stdout_line in iter(process.stdout.readline, ""):
# print(f"STDOUT: {stdout_line.strip()}")
if "Logstash shut down" in stdout_line or "Logstash stopped" in stdout_line:
print(f"Logstash stopped.")
return None
# shudown watcher keep running, we should be good with considering time spent
if time.time() - start_time > 60:
print(f"Logstash didn't stop in 1min, sending SIGTERM signal.")
process.kill()
if time.time() - start_time > 70:
print(f"Logstash didn't stop over 1min, exiting.")
return None

View file

@ -0,0 +1 @@
# Intentionally left blank

View file

@ -0,0 +1,70 @@
import yaml
from typing import Any, List, Dict
class ConfigValidator:
REQUIRED_KEYS = {
"root": ["name", "config", "conditions", "expectation"],
"config": ["pipeline.id", "config.string"],
"conditions": ["full_start_required", "wait_seconds"],
"expectation": ["status", "symptom", "indicators"],
"indicators": ["pipelines"],
"pipelines": ["status", "symptom", "indicators"],
"DYNAMIC": ["status", "symptom", "diagnosis", "impacts", "details"], # pipeline-id is a DYNAMIC
"details": ["status"],
"status": ["state"]
}
def __init__(self):
self.yaml_content = None
def __has_valid_keys(self, data: any, key_path: str, repeated: bool) -> bool:
# we reached the value
if isinstance(data, str) or isinstance(data, bool) or isinstance(data, int) or isinstance(data, float):
return True
# we have two indicators section and for the next repeated ones, we go deeper
first_key = next(iter(data))
data = data[first_key] if repeated and key_path == "indicators" else data
if isinstance(data, dict):
# pipeline-id is a DYNAMIC
required = self.REQUIRED_KEYS.get("DYNAMIC" if repeated and key_path == "indicators" else key_path, [])
repeated = not repeated if key_path == "indicators" else repeated
for key in required:
if key not in data:
print(f"Missing key '{key}' in '{key_path}'")
return False
else:
dic_keys_result = self.__has_valid_keys(data[key], key, repeated)
if dic_keys_result is False:
return False
elif isinstance(data, list):
for item in data:
list_keys_result = self.__has_valid_keys(item, key_path, repeated)
if list_keys_result is False:
return False
return True
def load(self, file_path: str) -> None:
"""Load the YAML file content into self.yaml_content."""
self.yaml_content: [Dict[str, Any]] = None
try:
with open(file_path, 'r') as file:
self.yaml_content = yaml.safe_load(file)
except yaml.YAMLError as exc:
print(f"Error in YAML file: {exc}")
self.yaml_content = None
def is_valid(self) -> bool:
"""Validate the entire YAML structure."""
if self.yaml_content is None:
print(f"YAML content is empty.")
return False
if not isinstance(self.yaml_content, dict):
print(f"YAML structure is not as expected, it should start with a Dict.")
return False
result = self.__has_valid_keys(self.yaml_content, "root", False)
return True if result is True else False

View file

@ -0,0 +1,16 @@
"""
A class to provide information about Logstash node stats.
"""
import util
class LogstashHealthReport:
LOGSTASH_HEALTH_REPORT_URL = "http://localhost:9600/_health_report"
def __init__(self):
pass
def get(self):
response = util.call_url_with_retry(self.LOGSTASH_HEALTH_REPORT_URL)
return response.json()

View file

@ -0,0 +1,89 @@
"""
Main entry point of the LS health report API integration test suites
"""
import glob
import os
import time
import traceback
import yaml
from bootstrap import Bootstrap
from scenario_executor import ScenarioExecutor
from config_validator import ConfigValidator
class BootstrapContextManager:
def __init__(self):
pass
def __enter__(self):
print(f"Starting Logstash Health Report Integration test.")
self.bootstrap = Bootstrap()
self.bootstrap.build_logstash()
plugin_path = os.getcwd() + "/qa/support/logstash-integration-failure_injector/logstash-integration" \
"-failure_injector-*.gem"
matching_files = glob.glob(plugin_path)
if len(matching_files) == 0:
raise ValueError(f"Could not find logstash-integration-failure_injector plugin.")
self.bootstrap.install_plugin(matching_files[0])
print(f"logstash-integration-failure_injector successfully installed.")
return self.bootstrap
def __exit__(self, exc_type, exc_value, exc_traceback):
if exc_type is not None:
print(traceback.format_exception(exc_type, exc_value, exc_traceback))
def main():
with BootstrapContextManager() as bootstrap:
scenario_executor = ScenarioExecutor()
config_validator = ConfigValidator()
working_dir = os.getcwd()
scenario_files_path = working_dir + "/.buildkite/scripts/health-report-tests/tests/*.yaml"
scenario_files = glob.glob(scenario_files_path)
for scenario_file in scenario_files:
print(f"Validating {scenario_file} scenario file.")
config_validator.load(scenario_file)
if config_validator.is_valid() is False:
print(f"{scenario_file} scenario file is not valid.")
return
else:
print(f"Validation succeeded.")
has_failed_scenario = False
for scenario_file in scenario_files:
with open(scenario_file, 'r') as file:
# scenario_content: Dict[str, Any] = None
scenario_content = yaml.safe_load(file)
print(f"Testing `{scenario_content.get('name')}` scenario.")
scenario_name = scenario_content['name']
is_full_start_required = scenario_content.get('conditions').get('full_start_required')
wait_seconds = scenario_content.get('conditions').get('wait_seconds')
config = scenario_content['config']
if config is not None:
bootstrap.apply_config(config)
expectations = scenario_content.get("expectation")
process = bootstrap.run_logstash(is_full_start_required)
if process is not None:
if wait_seconds is not None:
print(f"Test requires to wait for `{wait_seconds}` seconds.")
time.sleep(wait_seconds) # wait for Logstash to start
try:
scenario_executor.on(scenario_name, expectations)
except Exception as e:
print(e)
has_failed_scenario = True
bootstrap.stop_logstash(process)
if has_failed_scenario:
# intentionally fail due to visibility
raise Exception("Some of scenarios failed, check the log for details.")
if __name__ == "__main__":
main()

View file

@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
export PATH="/opt/buildkite-agent/.rbenv/bin:/opt/buildkite-agent/.pyenv/bin:/opt/buildkite-agent/.java/bin:$PATH"
export JAVA_HOME="/opt/buildkite-agent/.java"
export PYENV_VERSION="3.11.5"
eval "$(rbenv init -)"
eval "$(pyenv init -)"
echo "--- Installing dependencies"
python3 -m pip install -r .buildkite/scripts/health-report-tests/requirements.txt
echo "--- Running tests"
python3 .buildkite/scripts/health-report-tests/main.py

View file

@ -0,0 +1,2 @@
requests==2.32.3
pyyaml==6.0.2

View file

@ -0,0 +1,67 @@
"""
A class to execute the given scenario for Logstash Health Report integration test
"""
import time
from logstash_health_report import LogstashHealthReport
class ScenarioExecutor:
logstash_health_report_api = LogstashHealthReport()
def __init__(self):
pass
def __has_intersection(self, expects, results):
# TODO: this logic is aligned on current Health API response
# there is no guarantee that method correctly runs if provided multi expects and results
# we expect expects to be existing in results
for expect in expects:
for result in results:
if result.get('help_url') and "health-report-pipeline-" not in result.get('help_url'):
return False
if not all(key in result and result[key] == value for key, value in expect.items()):
return False
return True
def __get_difference(self, differences: list, expectations: dict, reports: dict) -> dict:
for key in expectations.keys():
if type(expectations.get(key)) != type(reports.get(key)):
differences.append(f"Scenario expectation and Health API report structure differs for {key}.")
return differences
if isinstance(expectations.get(key), str):
if expectations.get(key) != reports.get(key):
differences.append({key: {"expected": expectations.get(key), "got": reports.get(key)}})
continue
elif isinstance(expectations.get(key), dict):
self.__get_difference(differences, expectations.get(key), reports.get(key))
elif isinstance(expectations.get(key), list):
if not self.__has_intersection(expectations.get(key), reports.get(key)):
differences.append({key: {"expected": expectations.get(key), "got": reports.get(key)}})
return differences
def __is_expected(self, expectations: dict) -> None:
reports = self.logstash_health_report_api.get()
differences = self.__get_difference([], expectations, reports)
if differences:
print("Differences found in 'expectation' section between YAML content and stats:")
for diff in differences:
print(f"Difference: {diff}")
return False
else:
return True
def on(self, scenario_name: str, expectations: dict) -> None:
# retriable check the expectations
attempts = 5
while self.__is_expected(expectations) is False:
attempts = attempts - 1
if attempts == 0:
break
time.sleep(1)
if attempts == 0:
raise Exception(f"{scenario_name} failed.")
else:
print(f"Scenario `{scenario_name}` expectaion meets the health report stats.")

View file

@ -0,0 +1,32 @@
name: "Abnormally terminated pipeline"
config:
- pipeline.id: abnormally-terminated-pp
config.string: |
input { heartbeat { interval => 1 } }
filter { failure_injector { crash_at => filter } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
conditions:
full_start_required: true
wait_seconds: 5
expectation:
status: "red"
symptom: "1 indicator is unhealthy (`pipelines`)"
indicators:
pipelines:
status: "red"
symptom: "1 indicator is unhealthy (`abnormally-terminated-pp`)"
indicators:
abnormally-terminated-pp:
status: "red"
symptom: "The pipeline is unhealthy; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- cause: "pipeline is not running, likely because it has encountered an error"
action: "view logs to determine the cause of abnormal pipeline shutdown"
impacts:
- description: "the pipeline is not currently processing"
impact_areas: ["pipeline_execution"]
details:
status:
state: "TERMINATED"

View file

@ -0,0 +1,38 @@
name: "Backpressured in 1min pipeline"
config:
- pipeline.id: backpressure-1m-pp
config.string: |
input { heartbeat { interval => 0.1 } }
filter { failure_injector { degrade_at => [filter] } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
conditions:
full_start_required: true
wait_seconds: 70 # give more seconds to make sure time is over the threshold, 1m in this case
expectation:
status: "yellow"
symptom: "1 indicator is concerning (`pipelines`)"
indicators:
pipelines:
status: "yellow"
symptom: "1 indicator is concerning (`backpressure-1m-pp`)"
indicators:
backpressure-1m-pp:
status: "yellow"
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- id: "logstash:health:pipeline:flow:worker_utilization:diagnosis:1m-blocked"
cause: "pipeline workers have been completely blocked for at least one minute"
action: "address bottleneck or add resources"
impacts:
- id: "logstash:health:pipeline:flow:impact:blocked_processing"
severity: 2
description: "the pipeline is blocked"
impact_areas: ["pipeline_execution"]
details:
status:
state: "RUNNING"
flow:
worker_utilization:
last_1_minute: 100.0

View file

@ -0,0 +1,39 @@
name: "Backpressured in 5min pipeline"
config:
- pipeline.id: backpressure-5m-pp
config.string: |
input { heartbeat { interval => 0.1 } }
filter { failure_injector { degrade_at => [filter] } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
conditions:
full_start_required: true
wait_seconds: 310 # give more seconds to make sure time is over the threshold, 1m in this case
expectation:
status: "red"
symptom: "1 indicator is unhealthy (`pipelines`)"
indicators:
pipelines:
status: "red"
symptom: "1 indicator is unhealthy (`backpressure-5m-pp`)"
indicators:
backpressure-5m-pp:
status: "red"
symptom: "The pipeline is unhealthy; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- id: "logstash:health:pipeline:flow:worker_utilization:diagnosis:5m-blocked"
cause: "pipeline workers have been completely blocked for at least five minutes"
action: "address bottleneck or add resources"
impacts:
- id: "logstash:health:pipeline:flow:impact:blocked_processing"
severity: 1
description: "the pipeline is blocked"
impact_areas: ["pipeline_execution"]
details:
status:
state: "RUNNING"
flow:
worker_utilization:
last_1_minute: 100.0
last_5_minutes: 100.0

View file

@ -0,0 +1,67 @@
name: "Multi pipeline"
config:
- pipeline.id: slow-start-pp-multipipeline
config.string: |
input { heartbeat {} }
filter { failure_injector { degrade_at => [register] } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
- pipeline.id: normally-terminated-pp-multipipeline
config.string: |
input { generator { count => 1 } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
- pipeline.id: abnormally-terminated-pp-multipipeline
config.string: |
input { heartbeat { interval => 1 } }
filter { failure_injector { crash_at => filter } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
conditions:
full_start_required: false
wait_seconds: 10
expectation:
status: "red"
symptom: "1 indicator is unhealthy (`pipelines`)"
indicators:
pipelines:
status: "red"
symptom: "1 indicator is unhealthy (`abnormally-terminated-pp-multipipeline`) and 2 indicators are concerning (`slow-start-pp-multipipeline`, `normally-terminated-pp-multipipeline`)"
indicators:
slow-start-pp-multipipeline:
status: "yellow"
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- cause: "pipeline is loading"
action: "if pipeline does not come up quickly, you may need to check the logs to see if it is stalled"
impacts:
- impact_areas: ["pipeline_execution"]
details:
status:
state: "LOADING"
normally-terminated-pp-multipipeline:
status: "yellow"
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- cause: "pipeline has finished running because its inputs have been closed and events have been processed"
action: "if you expect this pipeline to run indefinitely, you will need to configure its inputs to continue receiving or fetching events"
impacts:
- impact_areas: [ "pipeline_execution" ]
details:
status:
state: "FINISHED"
abnormally-terminated-pp-multipipeline:
status: "red"
symptom: "The pipeline is unhealthy; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- cause: "pipeline is not running, likely because it has encountered an error"
action: "view logs to determine the cause of abnormal pipeline shutdown"
impacts:
- description: "the pipeline is not currently processing"
impact_areas: [ "pipeline_execution" ]
details:
status:
state: "TERMINATED"

View file

@ -0,0 +1,30 @@
name: "Successfully terminated pipeline"
config:
- pipeline.id: normally-terminated-pp
config.string: |
input { generator { count => 1 } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
conditions:
full_start_required: true
wait_seconds: 5
expectation:
status: "yellow"
symptom: "1 indicator is concerning (`pipelines`)"
indicators:
pipelines:
status: "yellow"
symptom: "1 indicator is concerning (`normally-terminated-pp`)"
indicators:
normally-terminated-pp:
status: "yellow"
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- cause: "pipeline has finished running because its inputs have been closed and events have been processed"
action: "if you expect this pipeline to run indefinitely, you will need to configure its inputs to continue receiving or fetching events"
impacts:
- impact_areas: ["pipeline_execution"]
details:
status:
state: "FINISHED"

View file

@ -0,0 +1,31 @@
name: "Slow start pipeline"
config:
- pipeline.id: slow-start-pp
config.string: |
input { heartbeat {} }
filter { failure_injector { degrade_at => [register] } }
output { stdout {} }
pipeline.workers: 1
pipeline.batch.size: 1
conditions:
full_start_required: false
wait_seconds: 0
expectation:
status: "yellow"
symptom: "1 indicator is concerning (`pipelines`)"
indicators:
pipelines:
status: "yellow"
symptom: "1 indicator is concerning (`slow-start-pp`)"
indicators:
slow-start-pp:
status: "yellow"
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available"
diagnosis:
- cause: "pipeline is loading"
action: "if pipeline does not come up quickly, you may need to check the logs to see if it is stalled"
impacts:
- impact_areas: ["pipeline_execution"]
details:
status:
state: "LOADING"

View file

@ -0,0 +1,36 @@
import os
import requests
import subprocess
from requests.adapters import HTTPAdapter, Retry
def call_url_with_retry(url: str, max_retries: int = 5, delay: int = 1) -> requests.Response:
f"""
Calls the given {url} with maximum of {max_retries} retries with {delay} delay.
"""
schema = "https://" if "https://" in url else "http://"
session = requests.Session()
# retry on most common failures such as connection timeout(408), etc...
retries = Retry(total=max_retries, backoff_factor=delay, status_forcelist=[408, 502, 503, 504])
session.mount(schema, HTTPAdapter(max_retries=retries))
return session.get(url)
def git_check_out_branch(branch_name: str) -> None:
f"""
Checks out specified branch or fails with error if checkout operation fails.
"""
run_or_raise_error(["git", "checkout", branch_name],
"Error occurred while checking out the " + branch_name + " branch")
def run_or_raise_error(commands: list, error_message):
f"""
Executes the {list} commands and raises an {Exception} if opration fails.
"""
result = subprocess.run(commands, env=os.environ.copy(), universal_newlines=True, stdout=subprocess.PIPE)
if result.returncode != 0:
full_error_message = (error_message + ", output: " + result.stdout.decode('utf-8')) \
if result.stdout else error_message
raise Exception(f"{full_error_message}")

View file

@ -0,0 +1,398 @@
import abc
import copy
from dataclasses import dataclass, field
import os
import sys
import typing
from functools import partial
from ruamel.yaml import YAML
from ruamel.yaml.scalarstring import LiteralScalarString
ENABLED_RETRIES = {"automatic": [{"limit": 3}]}
@dataclass
class JobRetValues:
step_label: str
command: str
step_key: str
depends: str
agent: typing.Dict[typing.Any, typing.Any]
retry: typing.Optional[typing.Dict[typing.Any, typing.Any]] = None
artifact_paths: list = field(default_factory=list)
class GCPAgent:
def __init__(self, image: str, machineType: str, diskSizeGb: int = 200, diskType: str = "pd-ssd") -> None:
self.provider = "gcp"
self.imageProject = "elastic-images-prod"
self.image = image
self.machineType = machineType
self.diskSizeGb = diskSizeGb
self.diskType = diskType
def to_dict(self):
return {
"provider": self.provider,
"imageProject": self.imageProject,
"image": self.image,
"machineType": self.machineType,
"diskSizeGb": self.diskSizeGb,
"diskType": self.diskType,
}
class AWSAgent:
def __init__(self, imagePrefix: str, instanceType: str, diskSizeGb: int):
self.provider = "aws"
self.imagePrefix = imagePrefix
self.instanceType = instanceType
self.diskSizeGb = diskSizeGb
def to_dict(self):
return {
"provider": self.provider,
"imagePrefix": self.imagePrefix,
"instanceType": self.instanceType,
"diskSizeGb": self.diskSizeGb,
}
class DefaultAgent:
"""
Represents an empty agent definition which makes Buildkite use the default agent i.e. a container
"""
def __init__(self) -> None:
pass
def to_json(self) -> typing.Dict:
return {}
@dataclass
class BuildkiteEmojis:
running: str = ":bk-status-running:"
success: str = ":bk-status-passed:"
failed: str = ":bk-status-failed:"
def slugify_bk_key(key: str) -> str:
"""
Convert and return key to an acceptable format for Buildkite's key: field
Only alphanumerics, dashes and underscores are allowed.
"""
mapping_table = str.maketrans({'.': '_', ' ': '_', '/': '_'})
return key.translate(mapping_table)
def get_bk_metadata(key: str) -> typing.List[str]:
try:
return os.environ[key].split()
except KeyError:
print(f"Missing environment variable [{key}]. This should be set before calling this script using buildkite-agent meta-data get. Exiting.")
exit(1)
def bk_annotate(body: str, context: str, mode = "") -> str:
cmd = f"""buildkite-agent annotate --style=info --context={context} """
if mode:
cmd += f"--{mode} "
cmd += f"\"{body}\n\""
return cmd
class Jobs(abc.ABC):
def __init__(self, os: str, jdk: str, group_key: str, agent: typing.Union[GCPAgent, AWSAgent]):
self.os = os
self.jdk = jdk
self.group_key = group_key
self.init_annotation_key = f"{os}-{jdk}-initialize-annotation"
self.agent = agent
def init_annotation(self) -> JobRetValues:
"""
Command for creating the header of a new annotation for a group step
"""
body = f"### Group: {self.os} / {self.jdk}\n| **Status** | **Test** |\n| --- | ----|"
return JobRetValues(
step_label="Initialize annotation",
command=LiteralScalarString(bk_annotate(body=body, context=self.group_key)),
step_key=self.init_annotation_key,
depends="",
agent=DefaultAgent().to_json(),
)
@abc.abstractmethod
def all_jobs(self) -> list[typing.Callable[[], typing.Tuple[str, str]]]:
pass
class WindowsJobs(Jobs):
def __init__(self, os: str, jdk: str, group_key: str, agent: typing.Union[GCPAgent, AWSAgent]):
super().__init__(os=os, jdk=jdk, group_key=group_key, agent=agent)
def all_jobs(self) -> list[typing.Callable[[], JobRetValues]]:
return [
self.init_annotation,
self.java_unit_test,
self.ruby_unit_test,
]
def java_unit_test(self) -> JobRetValues:
step_name_human = "Java Unit Test"
step_key = f"{self.group_key}-java-unit-test"
test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1 java" -Annotate
'''
return JobRetValues(
step_label=step_name_human,
command=LiteralScalarString(test_command),
step_key=step_key,
depends=self.init_annotation_key,
artifact_paths=["build_reports.zip"],
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
def ruby_unit_test(self) -> JobRetValues:
step_name_human = "Ruby Unit Test"
step_key = f"{self.group_key}-ruby-unit-test"
test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1 ruby" -Annotate
'''
return JobRetValues(
step_label=step_name_human,
command=LiteralScalarString(test_command),
step_key=step_key,
depends=self.init_annotation_key,
artifact_paths=["build_reports.zip"],
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
class LinuxJobs(Jobs):
def __init__(self, os: str, jdk: str, group_key: str, agent: typing.Union[GCPAgent, AWSAgent]):
super().__init__(os=os, jdk=jdk, group_key=group_key, agent=agent)
def all_jobs(self) -> list[typing.Callable[[], JobRetValues]]:
jobs=list()
jobs.append(self.init_annotation)
jobs.append(self.java_unit_test)
jobs.append(self.ruby_unit_test)
jobs.extend(self.integration_test_parts(3))
jobs.extend(self.pq_integration_test_parts(3))
jobs.append(self.x_pack_unit_tests)
jobs.append(self.x_pack_integration)
return jobs
def prepare_shell(self) -> str:
jdk_dir = f"/opt/buildkite-agent/.java/{self.jdk}"
return f"""#!/usr/bin/env bash
set -euo pipefail
# unset generic JAVA_HOME
unset JAVA_HOME
# LS env vars for JDK matrix tests
export BUILD_JAVA_HOME={jdk_dir}
export RUNTIME_JAVA_HOME={jdk_dir}
export LS_JAVA_HOME={jdk_dir}
export PATH="/opt/buildkite-agent/.rbenv/bin:/opt/buildkite-agent/.pyenv/bin:$PATH"
eval "$(rbenv init -)"
"""
def failed_step_annotation(self, step_name_human) -> str:
return bk_annotate(body=f"| {BuildkiteEmojis.failed} | {step_name_human} |", context=self.group_key, mode="append")
def succeeded_step_annotation(self, step_name_human) -> str:
return bk_annotate(body=f"| {BuildkiteEmojis.success} | {step_name_human} |", context=self.group_key, mode="append")
def emit_command(self, step_name_human, test_command: str) -> str:
return LiteralScalarString(f"""
{self.prepare_shell()}
# temporarily disable immediate failure on errors, so that we can update the BK annotation
set +eo pipefail
{test_command}
if [[ $$? -ne 0 ]]; then
{self.failed_step_annotation(step_name_human)}
exit 1
else
{self.succeeded_step_annotation(step_name_human)}
fi
""")
def java_unit_test(self) -> JobRetValues:
step_name_human = "Java Unit Test"
step_key = f"{self.group_key}-java-unit-test"
test_command = '''
export ENABLE_SONARQUBE="false"
ci/unit_tests.sh java
'''
return JobRetValues(
step_label=step_name_human,
command=self.emit_command(step_name_human, test_command),
step_key=step_key,
depends=self.init_annotation_key,
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
def ruby_unit_test(self) -> JobRetValues:
step_name_human = "Ruby Unit Test"
step_key = f"{self.group_key}-ruby-unit-test"
test_command = """
ci/unit_tests.sh ruby
"""
return JobRetValues(
step_label=step_name_human,
command=self.emit_command(step_name_human, test_command),
step_key=step_key,
depends=self.init_annotation_key,
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
def integration_test_parts(self, parts) -> list[partial[JobRetValues]]:
return [partial(self.integration_tests, part=idx+1, parts=parts) for idx in range(parts)]
def integration_tests(self, part: int, parts: int) -> JobRetValues:
step_name_human = f"Integration Tests - {part}/{parts}"
step_key = f"{self.group_key}-integration-tests-{part}-of-{parts}"
test_command = f"""
ci/integration_tests.sh split {part-1} {parts}
"""
return JobRetValues(
step_label=step_name_human,
command=self.emit_command(step_name_human, test_command),
step_key=step_key,
depends=self.init_annotation_key,
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
def pq_integration_test_parts(self, parts) -> list[partial[JobRetValues]]:
return [partial(self.pq_integration_tests, part=idx+1, parts=parts) for idx in range(parts)]
def pq_integration_tests(self, part: int, parts: int) -> JobRetValues:
step_name_human = f"IT Persistent Queues - {part}/{parts}"
step_key = f"{self.group_key}-it-persistent-queues-{part}-of-{parts}"
test_command = f"""
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split {part-1} {parts}
"""
return JobRetValues(
step_label=step_name_human,
command=self.emit_command(step_name_human, test_command),
step_key=step_key,
depends=self.init_annotation_key,
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
def x_pack_unit_tests(self) -> JobRetValues:
step_name_human = "x-pack unit tests"
step_key = f"{self.group_key}-x-pack-unit-test"
test_command = """
x-pack/ci/unit_tests.sh
"""
return JobRetValues(
step_label=step_name_human,
command=self.emit_command(step_name_human, test_command),
step_key=step_key,
depends=self.init_annotation_key,
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
def x_pack_integration(self) -> JobRetValues:
step_name_human = "x-pack integration"
step_key = f"{self.group_key}-x-pack-integration"
test_command = """
x-pack/ci/integration_tests.sh
"""
return JobRetValues(
step_label=step_name_human,
command=self.emit_command(step_name_human, test_command),
step_key=step_key,
depends=self.init_annotation_key,
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)
if __name__ == "__main__":
matrix_oses = get_bk_metadata(key="MATRIX_OSES")
matrix_jdkes = get_bk_metadata(key="MATRIX_JDKS")
pipeline_name = os.environ.get("BUILDKITE_PIPELINE_NAME", "").lower()
structure = {"steps": []}
for matrix_os in matrix_oses:
gcpAgent = GCPAgent(
image=f"family/platform-ingest-logstash-multi-jdk-{matrix_os}",
machineType="n2-standard-4",
diskSizeGb=200,
diskType="pd-ssd",
)
awsAgent = AWSAgent(
imagePrefix=f"platform-ingest-logstash-multi-jdk-{matrix_os}",
instanceType="m5.2xlarge",
diskSizeGb=200,
)
for matrix_jdk in matrix_jdkes:
group_name = f"{matrix_os}/{matrix_jdk}"
group_key = slugify_bk_key(group_name)
agent = awsAgent if "amazon" in matrix_os else gcpAgent
if "windows" in pipeline_name:
jobs = WindowsJobs(os=matrix_os, jdk=matrix_jdk, group_key=group_key, agent=agent)
else:
jobs = LinuxJobs(os=matrix_os, jdk=matrix_jdk, group_key=group_key, agent=agent)
group_steps = []
for job in jobs.all_jobs():
job_values = job()
step = {
"label": f"{job_values.step_label}",
"key": job_values.step_key,
}
if job_values.depends:
step["depends_on"] = job_values.depends
if job_values.agent:
step["agents"] = job_values.agent
if job_values.artifact_paths:
step["artifact_paths"] = job_values.artifact_paths
if job_values.retry:
step["retry"] = job_values.retry
step["command"] = job_values.command
group_steps.append(step)
structure["steps"].append({
"group": group_name,
"key": slugify_bk_key(group_name),
"steps": group_steps})
print('# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json')
YAML().dump(structure, sys.stdout)

View file

@ -0,0 +1,51 @@
# ********************************************************
# This file contains prerequisite bootstrap invocations
# required for Logstash CI JDK matrix tests
# ********************************************************
param (
[string]$JDK,
[string]$CIScript,
[string]$StepNameHuman,
[string]$AnnotateContext,
[switch]$Annotate
)
# expand previous buildkite folded section (command invocation)
Write-Host "^^^ +++"
# unset generic JAVA_HOME
if (Test-Path env:JAVA_HOME) {
Remove-Item -Path env:JAVA_HOME
Write-Host "--- Environment variable 'JAVA_HOME' has been unset."
} else {
Write-Host "--- Environment variable 'JAVA_HOME' doesn't exist. Continuing."
}
# LS env vars for JDK matrix tests
$JAVA_CUSTOM_DIR = "C:\Users\buildkite\.java\$JDK"
$env:BUILD_JAVA_HOME = $JAVA_CUSTOM_DIR
$env:RUNTIME_JAVA_HOME = $JAVA_CUSTOM_DIR
$env:LS_JAVA_HOME = $JAVA_CUSTOM_DIR
Write-Host "--- Running test: $CIScript"
try {
Invoke-Expression $CIScript
if ($LASTEXITCODE -ne 0) {
throw "Test script $CIScript failed with a non-zero code: $LASTEXITCODE"
}
if ($Annotate) {
C:\buildkite-agent\bin\buildkite-agent.exe annotate --context="$AnnotateContext" --append "| :bk-status-passed: | $StepNameHuman |`n"
}
} catch {
# tests failed
Write-Host "^^^ +++"
if ($Annotate) {
C:\buildkite-agent\bin\buildkite-agent.exe annotate --context="$AnnotateContext" --append "| :bk-status-failed: | $StepNameHuman |`n"
Write-Host "--- Archiving test reports"
& "7z.exe" a -r .\build_reports.zip .\logstash-core\build\reports\tests
}
exit 1
}

View file

@ -0,0 +1,10 @@
#!/bin/bash
set -e
install_java() {
# TODO: let's think about regularly creating a custom image for Logstash which may align on version.yml definitions
sudo apt update && sudo apt install -y openjdk-21-jdk && sudo apt install -y openjdk-21-jre
}
install_java

View file

@ -0,0 +1,76 @@
#!/bin/bash
set -e
TARGET_BRANCHES=("main")
install_java_11() {
curl -L -s "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.24%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.24_8.tar.gz" | tar -zxf -
}
# Resolves the branches we are going to track
resolve_latest_branches() {
source .buildkite/scripts/snyk/resolve_stack_version.sh
}
# Build Logstash specific branch to generate Gemlock file where Snyk scans
build_logstash() {
./gradlew clean bootstrap assemble installDefaultGems
}
# Downloads snyk distribution
download_auth_snyk() {
echo "Downloading snyk..."
curl https://static.snyk.io/cli/latest/snyk-linux -o snyk
chmod +x ./snyk
vault_path=secret/ci/elastic-logstash/snyk-creds
SNYK_TOKEN=$(vault read -field=token "${vault_path}")
./snyk auth "$SNYK_TOKEN"
}
# Reports vulnerabilities to the Snyk
report() {
REMOTE_REPO_URL=$1
echo "Reporting $REMOTE_REPO_URL branch."
if [ "$REMOTE_REPO_URL" != "main" ] && [ "$REMOTE_REPO_URL" != "8.x" ]; then
MAJOR_VERSION=$(echo "$REMOTE_REPO_URL"| cut -d'.' -f 1)
REMOTE_REPO_URL="$MAJOR_VERSION".latest
echo "Using '$REMOTE_REPO_URL' remote repo url."
fi
# adding git commit hash to Snyk tag to improve visibility
# for big projects Snyk recommends pruning dependencies
# https://support.snyk.io/hc/en-us/articles/360002061438-CLI-returns-the-error-Failed-to-get-Vulns
GIT_HEAD=$(git rev-parse --short HEAD 2> /dev/null)
./snyk monitor --prune-repeated-subdependencies --all-projects --org=logstash --remote-repo-url="$REMOTE_REPO_URL" --target-reference="$REMOTE_REPO_URL" --detection-depth=6 --exclude=qa,tools,devtools,requirements.txt --project-tags=branch="$TARGET_BRANCH",git_head="$GIT_HEAD" || :
}
resolve_latest_branches
download_auth_snyk
# clone Logstash repo, build and report
for TARGET_BRANCH in "${TARGET_BRANCHES[@]}"
do
if [ "$TARGET_BRANCH" == "7.17" ]; then
echo "Installing and configuring JDK11."
export OLD_PATH=$PATH
install_java_11
export PATH=$PWD/jdk-11.0.24+8/bin:$PATH
fi
git reset --hard HEAD # reset if any generated files appeared
# check if target branch exists
echo "Checking out $TARGET_BRANCH branch."
if git checkout "$TARGET_BRANCH"; then
build_logstash
report "$TARGET_BRANCH"
else
echo "$TARGET_BRANCH branch doesn't exist."
fi
if [ "$TARGET_BRANCH" == "7.17" ]; then
# reset state
echo "Removing JDK11 installation."
rm -rf jdk-11.0.24+8
export PATH=$OLD_PATH
fi
done

View file

@ -0,0 +1,14 @@
#!/bin/bash
# This script resolves latest version from VERSION_URL SNAPSHOTS based on given N.x (where N is a precise, ex 8.x)
# Why Snapshot? - the 7.latest and 8.latest branchs will be accurately places in snapshots, not in releases.
# Ensure you have set the ELASTIC_STACK_VERSION environment variable.
set -e
VERSION_URL="https://storage.googleapis.com/artifacts-api/snapshots/branches.json"
echo "Fetching versions from $VERSION_URL"
readarray -t TARGET_BRANCHES < <(curl --retry-all-errors --retry 5 --retry-delay 5 -fsSL $VERSION_URL | jq -r '.branches[]')
echo "${TARGET_BRANCHES[@]}"

View file

@ -0,0 +1,57 @@
agents:
provider: "gcp"
machineType: "n1-standard-4"
image: family/core-ubuntu-2204
steps:
- label: "DLQ rspec integration test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/dlq_rspec_tests.sh
retry:
automatic:
- limit: 3
- label: "es-output test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/es_output_tests.sh
retry:
automatic:
- limit: 3
- label: "es-input test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/es_input_tests.sh
retry:
automatic:
- limit: 3
- label: "es-filter test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/es_filter_tests.sh
retry:
automatic:
- limit: 3
- label: "elastic_integration filter test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/elastic_integration_filter_tests.sh
retry:
automatic:
- limit: 3
- label: "central pipeline management test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/cpm_tests.sh
# Legacy monitoring is disabled. Serverless does not support /_monitoring/bulk, hence the test always fails to ingest metrics.
retry:
automatic:
- limit: 3
- label: "Logstash legacy monitoring test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/monitoring_tests.sh
skip: true
# Kibana API is disabled as it is not available with the current configuration in QA
retry:
automatic:
- limit: 3
- label: "Kibana API test"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/kibana_api_tests.sh
skip: true
# Metricbeat stack monitoring is disabled
retry:
automatic:
- limit: 3
- label: "metricbeat test is disabled as metricbeat has not disabled /_ilm yet"
command: ./.buildkite/scripts/setup_java.sh && ./ci/serverless/metricbeat_monitoring_tests.sh
skip: true
retry:
automatic:
- limit: 3

View file

@ -0,0 +1,14 @@
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci"
cpu: "2"
memory: "4Gi"
ephemeralStorage: "64Gi"
steps:
# reports main, previous (ex: 7.latest) and current (ex: 8.latest) release branches to Snyk
- label: ":hammer: Report to Snyk"
command:
- .buildkite/scripts/snyk/report.sh
retry:
automatic:
- limit: 3

View file

@ -0,0 +1,77 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "200Gi"
steps:
- group: "Tier1 plugins test group"
key: "tier1_plugins"
steps:
- label: "Test input file plugin"
command: |
source .buildkite/scripts/common/vm-agent.sh
./ci/test_plugins.sh -p logstash-input-file
# Workaround for https://github.com/elastic/ingest-dev/issues/2676
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-4"
diskSizeGb: 120
- label: "Test rest of Tier1 inputs"
command: |
source .buildkite/scripts/common/vm-agent.sh
./ci/test_plugins.sh -p logstash-input-azure_event_hubs,logstash-input-beats,logstash-input-elasticsearch,logstash-input-generator,logstash-input-heartbeat,logstash-input-http,logstash-input-http_poller,logstash-input-redis,logstash-input-stdin,logstash-input-syslog,logstash-input-udp
# Workaround for https://github.com/elastic/ingest-dev/issues/2676
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-4"
diskSizeGb: 120
- label: "Test Tier1 filters"
command: ./ci/test_plugins.sh -t tier1 -k filter
- label: "Test Tier1 codecs"
command: ./ci/test_plugins.sh -t tier1 -k codec
- label: "Test Tier1 outputs"
command: ./ci/test_plugins.sh -t tier1 -k output
- label: "Test Tier1 integrations"
command: |
source .buildkite/scripts/common/vm-agent.sh
./ci/test_plugins.sh -t tier1 -k integration
# Workaround to avoid errors on chmod of files
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-4"
diskSizeGb: 120
- group: "Tier2 plugins test group"
key: "tier2_plugins"
steps:
- label: "Test Tier2 inputs"
command: ./ci/test_plugins.sh -t tier2 -k input
- label: "Test Tier2 filters"
command: ./ci/test_plugins.sh -t tier2 -k filter
- label: "Test Tier2 codecs"
command: |
source .buildkite/scripts/common/vm-agent.sh
./ci/test_plugins.sh -t tier2 -k codec
agents:
provider: gcp
imageProject: elastic-images-prod
image: family/platform-ingest-logstash-ubuntu-2204
machineType: "n2-standard-4"
diskSizeGb: 120
- label: "Test Tier2 outputs"
command: ./ci/test_plugins.sh -t tier2 -k output
- group: "Unsupported plugins test group"
key: "unsupported_plugins"
steps:
- label: "Test unsupported inputs"
command: ./ci/test_plugins.sh -t unsupported -k input

View file

@ -0,0 +1,5 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
steps:
- label: ":pipeline: Generate trigger steps for $PIPELINES_TO_TRIGGER"
command: ".buildkite/scripts/common/trigger-pipeline-generate-steps.sh"

View file

@ -0,0 +1,73 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
env:
DEFAULT_MATRIX_OS: "windows-2022"
DEFAULT_MATRIX_JDK: "adoptiumjdk_21"
steps:
- input: "Test Parameters"
if: build.source != "schedule" && build.source != "trigger_job"
fields:
- select: "Operating System"
key: "matrix-os"
hint: "The operating system variant(s) to run on:"
required: true
multiple: true
default: "${DEFAULT_MATRIX_OS}"
options:
- label: "Windows 2025"
value: "windows-2025"
- label: "Windows 2022"
value: "windows-2022"
- label: "Windows 2019"
value: "windows-2019"
- label: "Windows 2016"
value: "windows-2016"
- select: "Java"
key: "matrix-jdk"
hint: "The JDK to test with:"
required: true
multiple: true
default: "${DEFAULT_MATRIX_JDK}"
options:
- label: "Adoptium JDK 21 (Eclipse Temurin)"
value: "adoptiumjdk_21"
- label: "Adoptium JDK 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
- label: "OpenJDK 21"
value: "openjdk_21"
- label: "OpenJDK 17"
value: "openjdk_17"
- label: "Zulu 21"
value: "zulu_21"
- label: "Zulu 17"
value: "zulu_17"
- wait: ~
if: build.source != "schedule" && build.source != "trigger_job"
- command: |
set -euo pipefail
echo "--- Downloading prerequisites"
python3 -m pip install ruamel.yaml
echo "--- Printing generated dynamic steps"
export MATRIX_OSES="$(buildkite-agent meta-data get matrix-os --default=${DEFAULT_MATRIX_OS})"
export MATRIX_JDKS="$(buildkite-agent meta-data get matrix-jdk --default=${DEFAULT_MATRIX_JDK})"
set +eo pipefail
python3 .buildkite/scripts/jdk-matrix-tests/generate-steps.py >pipeline_steps.yml
if [[ $$? -ne 0 ]]; then
echo "^^^ +++"
echo "There was a problem rendering the pipeline steps."
cat pipeline_steps.yml
echo "Exiting now."
exit 1
else
set -eo pipefail
cat pipeline_steps.yml
fi
echo "--- Uploading steps to buildkite"
cat pipeline_steps.yml | buildkite-agent pipeline upload

42
.ci/Makefile Normal file
View file

@ -0,0 +1,42 @@
.SILENT:
MAKEFLAGS += --no-print-directory
.SHELLFLAGS = -euc
SHELL = /bin/bash
#######################
## Templates
#######################
## Mergify template
define MERGIFY_TMPL
- name: backport patches to $(BRANCH) branch
conditions:
- merged
- base=main
- label=$(BACKPORT_LABEL)
actions:
backport:
branches:
- "$(BRANCH)"
endef
# Add mergify entry for the new backport label
.PHONY: mergify
export MERGIFY_TMPL
mergify: BACKPORT_LABEL=$${BACKPORT_LABEL} BRANCH=$${BRANCH} PUSH_BRANCH=$${PUSH_BRANCH}
mergify:
@echo ">> mergify"
echo "$$MERGIFY_TMPL" >> ../.mergify.yml
git add ../.mergify.yml
git status
if [ ! -z "$$(git status --porcelain)" ]; then \
git commit -m "mergify: add $(BACKPORT_LABEL) rule"; \
git push origin $(PUSH_BRANCH) ; \
fi
# Create GitHub backport label
.PHONY: backport-label
backport-label: BACKPORT_LABEL=$${BACKPORT_LABEL}
backport-label:
@echo ">> backport-label"
gh label create $(BACKPORT_LABEL) --description "Automated backport with mergify" --color 0052cc --force

View file

@ -0,0 +1,2 @@
LS_BUILD_JAVA=adoptiumjdk_21
LS_RUNTIME_JAVA=adoptiumjdk_21

55
.fossa.yml Executable file
View file

@ -0,0 +1,55 @@
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more
version: 2
cli:
server: https://app.fossa.com
fetcher: custom
project: git@github.com:elastic/logstash.git
analyze:
modules:
- name: Logstash gems
type: bundler
strategy: lockfile
target: .
path: .
- name: benchmark-cli
type: gradle
target: 'benchmark-cli:'
path: .
- name: dependencies-report
type: gradle
target: 'dependencies-report:'
path: .
- name: logstash-core
type: gradle
target: 'logstash-core:'
path: .
- name: logstash-core-benchmarks
type: gradle
target: 'logstash-core-benchmarks:'
path: .
- name: logstash-integration-tests
type: gradle
target: 'logstash-integration-tests:'
path: .
- name: logstash-xpack
type: gradle
target: 'logstash-xpack:'
# path: .
# - name: docker
# type: pip
# target: docker
# path: docker
# - name: Gemfile
# type: gem
# target: qa
# path: qa
# - name: Gemfile
# type: gem
# target: qa/integration
# path: qa/integration
# - name: Gemfile
# type: gem
# target: tools/paquet
# path: tools/paquet

View file

@ -1,14 +0,0 @@
Please post all product and debugging questions on our [forum](https://discuss.elastic.co/c/logstash). Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here.
For security vulnerabilities please only send reports to security@elastic.co.
See https://www.elastic.co/community/security for more information.
Logstash Plugins are located in a different organization: https://github.com/logstash-plugins. For bugs on specific Logstash plugins, for example, if Redis Output has a defect, please open it in the respective Redis Output repository.
For all general issues, please provide the following details for fast resolution:
- Version:
- Operating System:
- Config File (if you have sensitive info, please remove it):
- Sample Data:
- Steps to Reproduce:

56
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View file

@ -0,0 +1,56 @@
---
name: Bug
about: "Report a confirmed bug. For unconfirmed bugs please
visit https://discuss.elastic.co/c/logstash"
labels: "bug,status:needs-triage"
---
<!--
GitHub is reserved for bug reports and feature requests; it is not the place
for general questions. If you have a question or an unconfirmed bug , please
visit the [forums](https://discuss.elastic.co/c/logstash). Please also
check your OS is [supported](https://www.elastic.co/support/matrix#show_os).
If it is not, the issue is likely to be closed.
Logstash Plugins are located in a different organization: [logstash-plugins](https://github.com/logstash-plugins). For bugs on specific Logstash plugins, for example, if Redis Output has a defect, please open it in the respective Redis Output repository.
For security vulnerabilities please only send reports to security@elastic.co.
See https://www.elastic.co/community/security for more information.
Please fill in the following details to help us reproduce the bug:
-->
**Logstash information**:
Please include the following information:
1. Logstash version (e.g. `bin/logstash --version`)
2. Logstash installation source (e.g. built from source, with a package manager: DEB/RPM, expanded from tar or zip archive, docker)
3. How is Logstash being run (e.g. as a service/service manager: systemd, upstart, etc. Via command line, docker/kubernetes)
**Plugins installed**: (`bin/logstash-plugin list --verbose`)
**JVM** (e.g. `java -version`):
If the affected version of Logstash is 7.9 (or earlier), or if it is NOT using the bundled JDK or using the 'no-jdk' version in 7.10 (or higher), please provide the following information:
1. JVM version (`java -version`)
2. JVM installation source (e.g. from the Operating System's package manager, from source, etc).
3. Value of the `LS_JAVA_HOME` environment variable if set.
**OS version** (`uname -a` if on a Unix-like system):
**Description of the problem including expected versus actual behavior**:
**Steps to reproduce**:
Please include a *minimal* but *complete* recreation of the problem,
including (e.g.) pipeline definition(s), settings, locale, etc. The easier
you make for us to reproduce it, the more likely that somebody will take the
time to look at it.
1.
2.
3.
**Provide logs (if relevant)**:

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Question
url: https://discuss.elastic.co/c/logstash
about: Ask (and answer) questions here.
- name: Security Vulnerability
url: https://www.elastic.co/community/security
about: Send security vulnerability reports to security@elastic.co.
- name: Plugin Issue
url: https://github.com/logstash-plugins
about: Plugins for Logstash do the heavy lifting when it comes to integrating with a variety of external technologies and services. If your issue has to do with a specific plugin, please file it in the appropriate repository.

26
.github/ISSUE_TEMPLATE/doc-request.md vendored Normal file
View file

@ -0,0 +1,26 @@
---
name: Documentation
about: Report a documentation issue
labels: "docs,status:needs-triage"
---
<!--
Please search [existing issues](https://github.com/elastic/logstash/issues?q=is%3Aopen+is%3Aissue+label%3Adocs). The issue may already exist.
-->
#### Tell us about the issue
<!--
What's the problem? Is information missing? Inaccurate? Just not clear?
Please include a link to the page (if applicable).
-->
**Description:**
**URL:**
Example: https://www.elastic.co/guide/en/logstash/current/introduction.html
**Anything else?**

View file

@ -0,0 +1,21 @@
---
name: Feature Request
about: Request a new feature or suggest an enhancement to an existing one
labels: "enhancement,status:needs-triage"
---
<!--
Please first search existing issues for the feature you are requesting;
it may already exist, even as a closed issue.
-->
<!--
Describe the feature.
Please give us as much context as possible about the feature. For example,
you could include a story about a time when you wanted to use the feature,
and also tell us what you had to do instead. The last part is helpful
because it gives us an idea of how much harder your life is without the
feature.
-->

25
.github/ISSUE_TEMPLATE/test-failure.md vendored Normal file
View file

@ -0,0 +1,25 @@
---
name: Test Failure
about: A test failure in CI
labels: "test failure"
---
<!--
Please fill out the following information, and ensure you have attempted
to reproduce locally
-->
**Build scan**:
**Repro line**:
**Reproduces locally?**:
**Applicable branches**:
**Failure history**:
<!--
Link to build stats and possible indication of when this started failing and how often it fails
-->
**Failure excerpt**:

95
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,95 @@
<!-- Type of change
Please label this PR with the release version and one of the following labels, depending on the scope of your change:
- bug
- enhancement
- breaking change
- doc
-->
## Release notes
<!-- Add content to appear in [Release Notes](https://www.elastic.co/guide/en/logstash/current/releasenotes.html), or add [rn:skip] to leave this PR out of release notes -->
## What does this PR do?
<!-- Mandatory
Explain here the changes you made on the PR. Please explain the WHAT: patterns used, algorithms implemented, design architecture, message processing, etc.
Example:
Expose 'xpack.monitoring.elasticsearch.proxy' in the docker environment variables and update logstash.yml to surface this config option.
This commit exposes the 'xpack.monitoring.elasticsearch.proxy' variable in the docker by adding it in env2yaml.go, which translates from
being an environment variable to a proper yaml config.
Additionally, this PR exposes this setting for both xpack monitoring & management to the logstash.yml file.
-->
## Why is it important/What is the impact to the user?
<!-- Mandatory
Explain here the WHY or the IMPACT to the user, or the rationale/motivation for the changes.
Example:
This PR fixes an issue that was preventing the docker image from using the proxy setting when sending xpack monitoring information.
and/or
This PR now allows the user to define the xpack monitoring proxy setting in the docker container.
-->
## Checklist
<!-- Mandatory
Add a checklist of things that are required to be reviewed in order to have the PR approved
List here all the items you have verified BEFORE sending this PR. Please DO NOT remove any item, striking through those that do not apply. (Just in case, strikethrough uses two tildes. ~~Scratch this.~~)
-->
- [ ] My code follows the style guidelines of this project
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have made corresponding change to the default configuration files (and/or docker env variables)
- [ ] I have added tests that prove my fix is effective or that my feature works
## Author's Checklist
<!-- Recommended
Add a checklist of things that are required to be reviewed in order to have the PR approved
-->
- [ ]
## How to test this PR locally
<!-- Recommended
Explain here how this PR will be tested by the reviewer: commands, dependencies, steps, etc.
-->
## Related issues
<!-- Recommended
Link related issues below. Insert the issue link or reference after the word "Closes" if merging this should automatically close it.
- Closes #123
- Relates #123
- Requires #123
- Superseeds #123
-->
-
## Use cases
<!-- Recommended
Explain here the different behaviors that this PR introduces or modifies in this project, user roles, environment configuration, etc.
If you are familiar with Gherkin test scenarios, we recommend its usage: https://cucumber.io/docs/gherkin/reference/
-->
## Screenshots
<!-- Optional
Add here screenshots about how the project will be changed after the PR is applied. They could be related to web pages, terminal, etc, or any other image you consider important to be shared with the team.
-->
## Logs
<!-- Recommended
Paste here output logs discovered while creating this PR, such as stack traces or integration logs, or any other output you consider important to be shared with the team.
-->

18
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,18 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directories:
- '/'
- '/.github/actions/*'
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
reviewers:
- "elastic/observablt-ci"
- "elastic/observablt-ci-contractors"
groups:
github-actions:
patterns:
- "*"

22
.github/workflows/backport-active.yml vendored Normal file
View file

@ -0,0 +1,22 @@
name: Backport to active branches
on:
pull_request_target:
types: [closed]
branches:
- main
permissions:
pull-requests: write
contents: read
jobs:
backport:
# Only run if the PR was merged (not just closed) and has one of the backport labels
if: |
github.event.pull_request.merged == true &&
contains(toJSON(github.event.pull_request.labels.*.name), 'backport-active-')
runs-on: ubuntu-latest
steps:
- uses: elastic/oblt-actions/github/backport-active@v1

View file

@ -0,0 +1,24 @@
name: Scan for vulnerabilities
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
jobs:
scan_image:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v4
- name: build tar distribution
run: ./gradlew clean assembleTarDistribution
- run: mkdir scan
- run: tar -zxf ../build/logstash-*.tar.gz
working-directory: ./scan
- name: scan image
uses: anchore/scan-action@v3
with:
path: "./scan"
fail-build: true
severity-cutoff: critical

19
.github/workflows/docs-build.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: docs-build
on:
push:
branches:
- main
pull_request_target: ~
merge_group: ~
jobs:
docs-preview:
uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
with:
path-pattern: docs/**
permissions:
deployments: write
id-token: write
contents: read
pull-requests: read

14
.github/workflows/docs-cleanup.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: docs-cleanup
on:
pull_request_target:
types:
- closed
jobs:
docs-preview:
uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@main
permissions:
contents: none
id-token: write
deployments: write

35
.github/workflows/gen_release_notes.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Release Notes Draft generator
on:
workflow_dispatch:
inputs:
branch:
type: string
required: true
default: "8.2"
last_release:
type: string
required: true
default: "8.2.2"
permissions:
contents: write
pull-requests: write
issues: write
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- run: git config --global user.email "43502315+logstashmachine@users.noreply.github.com"
- run: git config --global user.name "logstashmachine"
- name: Create Release Notes Draft
run: ./tools/release/generate_release_notes.rb ${{ github.event.inputs.branch }} ${{ github.event.inputs.last_release }} ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }}

69
.github/workflows/lint_docs.yml vendored Normal file
View file

@ -0,0 +1,69 @@
name: Lint the docs!
on:
pull_request:
branches: [ "main" ]
permissions:
pull-requests: write
contents: read
jobs:
lint-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.13.2
cache: npm
- name: Install docs-lint
run: npm install -g @elastic/docs-lint
- name: Install strip-ansi
run: npm install strip-ansi
- name: Run docs-lint
id: run_docs_lint
run: |
LINT=$(((docs-lint $GITHUB_WORKSPACE/docs --asciidoc) 2>&1) || true)
echo "$LINT"
LINT="${LINT//'%'/'%25'}"
LINT="${LINT//$'\n'/'%0A'}"
LINT="${LINT//$'\r'/'%0D'}"
LINT="${LINT//$'`'/'\`'}"
echo "::set-output name=LINT_RESULT::$LINT"
- name: Add PR comment
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const report = `${{ steps.run_docs_lint.outputs.LINT_RESULT }}`
if (report !== '') {
const { default: stripAnsi } = await import('/home/runner/work/docs-lint/docs-lint/node_modules/strip-ansi/index.js')
const cleanText = stripAnsi(report)
const errorWithContext = `**⚠️ Lint failed**\n~~~\n${cleanText}\n~~~`
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: errorWithContext
})
} else {
console.log("🎉 No errors!")
}
- name: Throw error if linter fails
uses: actions/github-script@v6
with:
script: |
const report = `${{ steps.run_docs_lint.outputs.LINT_RESULT }}`
if (report !== '') {
core.setFailed(report)
} else {
console.log("No errors!")
}

View file

@ -0,0 +1,23 @@
name: Add to project
on:
issues:
types:
- opened
jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- uses: octokit/graphql-action@v2.x
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:ID!,$contentid:ID!) {
addProjectV2ItemById(input:{projectId:$projectid contentId:$contentid}) {
clientMutationId
}
}
projectid: "PVT_kwDOAGc3Zs0SEg"
contentid: ${{ github.event.issue.node_id }}
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}

View file

@ -0,0 +1,23 @@
name: mergify backport labels copier
on:
pull_request:
types:
- opened
permissions:
contents: read
jobs:
mergify-backport-labels-copier:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'mergify/bp/')
permissions:
# Add GH labels
pull-requests: write
# See https://github.com/cli/cli/issues/6274
repository-projects: read
steps:
- uses: elastic/oblt-actions/mergify/labels-copier@v1
with:
excluded-labels-regex: "^backport-*"

View file

@ -0,0 +1,57 @@
name: Add Docs issue to Ingest project
on:
issues:
types:
- labeled
env:
INGEST_PROJECT_ID: 'PVT_kwDOAGc3Zs4AEzn4'
# GitHub labels for each team/area
DOCS_LABEL: 'Team:Docs'
# ID values for the Area property + its options
AREA_FIELD_ID: 'PVTSSF_lADOAGc3Zs4AEzn4zgEgZSo'
INGEST_DOCS_OPTION_ID: 'def2f8e6'
jobs:
add_to_ingest_project:
runs-on: ubuntu-latest
steps:
- uses: octokit/graphql-action@v2.x
id: add_to_project
if: github.event.label.name == env.DOCS_LABEL
with:
query: |
# Variables have to be snake cased because of https://github.com/octokit/graphql-action/issues/164
mutation AddToIngestProject($project_id: ID!, $content_id: ID!) {
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) {
item {
id
}
}
}
project_id: ${{ env.INGEST_PROJECT_ID }}
content_id: ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}
# `if` conditions can only be assigned as the "step" level, so there's no way to conditionally pass differing
# `areaId` values to our GraphQL mutation. Would be nice if there was support for dictionaries or something in
# GH actions to make this a lot more DRY
- uses: octokit/graphql-action@v2.x
id: set_data_processing_area
if: github.event.label.name == env.DOCS_LABEL
with:
query: |
mutation updateIngestArea($item_id: ID!, $project_id: ID!, $area_field_id: ID!, $area_id: String) {
updateProjectV2ItemFieldValue(
input: { itemId: $item_id, projectId: $project_id, fieldId: $area_field_id, value: { singleSelectOptionId: $area_id } }) {
clientMutationId
}
}
item_id: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }}
project_id: ${{ env.INGEST_PROJECT_ID }}
area_field_id: ${{ env.AREA_FIELD_ID }}
area_id: ${{ env.INGEST_DOCS_OPTION_ID }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}

View file

@ -0,0 +1,57 @@
name: Add Logstash issue to Logstash Ingest Project
on:
issues:
types:
- labeled
env:
LOGSTASH_PROJECT_ID: 'PVT_kwDOAGc3Zs4AMlnl'
# GitHub labels for each team/area
LOGSTASH_LABEL: 'Team:Logstash'
# ID values for the Area property + its options
AREA_FIELD_ID: 'PVTSSF_lADOAGc3Zs4AMlnlzgIB8yM'
DATA_PROCESSING_OPTION_ID: '41c049c0'
jobs:
add_to_ingest_project:
runs-on: ubuntu-latest
steps:
- uses: octokit/graphql-action@v2.x
id: add_to_logstash_project
if: github.event.label.name == env.LOGSTASH_LABEL
with:
query: |
# Variables have to be snake cased because of https://github.com/octokit/graphql-action/issues/164
mutation AddToIngestProject($project_id: ID!, $content_id: ID!) {
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) {
item {
id
}
}
}
project_id: ${{ env.LOGSTASH_PROJECT_ID }}
content_id: ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}
# `if` conditions can only be assigned as the "step" level, so there's no way to conditionally pass differing
# `areaId` values to our GraphQL mutation. Would be nice if there was support for dictionaries or something in
# GH actions to make this a lot more DRY
- uses: octokit/graphql-action@v2.x
id: set_data_processing_area
if: github.event.label.name == env.LOGSTASH_LABEL
with:
query: |
mutation updateIngestArea($item_id: ID!, $project_id: ID!, $area_field_id: ID!, $area_id: String) {
updateProjectV2ItemFieldValue(
input: { itemId: $item_id, projectId: $project_id, fieldId: $area_field_id, value: { singleSelectOptionId: $area_id } }) {
clientMutationId
}
}
item_id: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }}
project_id: ${{ env.LOGSTASH_PROJECT_ID }}
area_field_id: ${{ env.AREA_FIELD_ID }}
area_id: ${{ env.DATA_PROCESSING_OPTION_ID }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}

18
.github/workflows/pre-commit.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: pre-commit
on:
pull_request:
push:
branches:
- main
- 8.*
- 9.*
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: elastic/oblt-actions/pre-commit@v1

View file

@ -0,0 +1,76 @@
name: Add issue to Ingest or Logstash project
on:
issues:
types:
- labeled
env:
INGEST_PROJECT_ID: 'PVT_kwDOAGc3Zs4AEzn4'
LOGSTASH_PROJECT_ID: 'PVT_kwDOAGc3Zs4AMlnl'
# GitHub labels for each team/area
LOGSTASH_LABEL: 'Team:Logstash'
DOCS_LABEL: 'Team:Docs'
# ID values for the Area property + its options for Ingest Board
AREA_FIELD_ID: 'PVTSSF_lADOAGc3Zs4AEzn4zgEgZSo'
INGEST_DOCS_OPTION_ID: 'def2f8e6'
jobs:
add_to_ingest_project:
runs-on: ubuntu-latest
steps:
- uses: octokit/graphql-action@v2.x
id: add_to_ingest_project
if: github.event.label.name == env.DOCS_LABEL
with:
query: |
# Variables have to be snake cased because of https://github.com/octokit/graphql-action/issues/164
mutation AddToIngestProject($project_id: ID!, $content_id: ID!) {
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) {
item {
id
}
}
}
project_id: ${{ env.INGEST_PROJECT_ID }}
content_id: ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}
- uses: octokit/graphql-action@v2.x
id: add_to_logstash_project
if: github.event.label.name == env.LOGSTASH_LABEL
with:
query: |
# Variables have to be snake cased because of https://github.com/octokit/graphql-action/issues/164
mutation AddToLogstashProject($project_id: ID!, $content_id: ID!) {
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) {
item {
id
}
}
}
project_id: ${{ env.LOGSTASH_PROJECT_ID }}
content_id: ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}
# `if` conditions can only be assigned as the "step" level, so there's no way to conditionally pass differing
# `areaId` values to our GraphQL mutation. Would be nice if there was support for dictionaries or something in
# GH actions to make this a lot more DRY
- uses: octokit/graphql-action@v2.x
id: set_data_processing_area
if: github.event.label.name == env.DOCS_LABEL
with:
query: |
mutation updateIngestArea($item_id: ID!, $project_id: ID!, $area_field_id: ID!, $area_id: String) {
updateProjectV2ItemFieldValue(
input: { itemId: $item_id, projectId: $project_id, fieldId: $area_field_id, value: { singleSelectOptionId: $area_id } }) {
clientMutationId
}
}
item_id: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }}
project_id: ${{ env.INGEST_PROJECT_ID }}
area_field_id: ${{ env.AREA_FIELD_ID }}
area_id: ${{ env.INGEST_DOCS_OPTION_ID }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}

77
.github/workflows/version_bumps.yml vendored Normal file
View file

@ -0,0 +1,77 @@
name: Bump dependencies
on:
workflow_dispatch:
inputs:
branch:
description: 'Release Branch'
required: true
default: '8.4'
type: string
bump:
description: 'Bump type'
required: true
default: 'patch'
type: choice
options:
- "patch"
- "minor"
- "major"
permissions:
pull-requests: write
contents: write
jobs:
version_bumper:
name: Bump versions
runs-on: ubuntu-latest
env:
INPUTS_BRANCH: "${{ inputs.branch }}"
INPUTS_BUMP: "${{ inputs.bump }}"
BACKPORT_LABEL: "backport-${{ inputs.branch }}"
steps:
- name: Fetch logstash-core team member list
uses: tspascoal/get-user-teams-membership@57e9f42acd78f4d0f496b3be4368fc5f62696662 #v3.0.0
with:
username: ${{ github.actor }}
organization: elastic
team: logstash
GITHUB_TOKEN: ${{ secrets.READ_ORG_SECRET_JSVD }}
- name: Is user a core team member?
if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
run: exit 1
- name: checkout repo content
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.INPUTS_BRANCH }}
- run: git config --global user.email "43502315+logstashmachine@users.noreply.github.com"
- run: git config --global user.name "logstashmachine"
- run: ./gradlew clean installDefaultGems
- run: ./vendor/jruby/bin/jruby -S bundle update --all --${{ env.INPUTS_BUMP }} --strict
- run: mv Gemfile.lock Gemfile.jruby-*.lock.release
- run: echo "T=$(date +%s)" >> $GITHUB_ENV
- run: echo "BRANCH=update_lock_${T}" >> $GITHUB_ENV
- run: |
git checkout -b $BRANCH
git add .
git status
if [[ -z $(git status --porcelain) ]]; then echo "No changes. We're done."; exit 0; fi
git commit -m "Update ${{ env.INPUTS_BUMP }} plugin versions in gemfile lock" -a
git push origin $BRANCH
- name: Update mergify (minor only)
if: ${{ inputs.bump == 'minor' }}
continue-on-error: true
run: make -C .ci mergify BACKPORT_LABEL=$BACKPORT_LABEL BRANCH=$INPUTS_BRANCH PUSH_BRANCH=$BRANCH
- name: Create Pull Request
run: |
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X POST -d "{\"title\": \"bump lock file for ${{ env.INPUTS_BRANCH }}\",\"head\": \"${BRANCH}\",\"base\": \"${{ env.INPUTS_BRANCH }}\"}" https://api.github.com/repos/elastic/logstash/pulls
- name: Create GitHub backport label (Mergify) (minor only)
if: ${{ inputs.bump == 'minor' }}
continue-on-error: true
run: make -C .ci backport-label BACKPORT_LABEL=$BACKPORT_LABEL
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

9
.gitignore vendored
View file

@ -16,8 +16,9 @@ out
local
test/setup/elasticsearch/elasticsearch-*
vendor
!docker/ironbank/go/src/env2yaml/vendor
.sass-cache
data
/data
.buildpath
.project
.DS_Store
@ -57,3 +58,9 @@ logstash-core/versions-gem-copy.yml
logstash-core-plugin-api/versions-gem-copy.yml
config/logstash.keystore
html_docs
lib/pluginmanager/plugin_aliases.yml
logstash-core/src/main/resources/org/logstash/plugins/plugin_aliases.yml
spec/unit/plugin_manager/plugin_aliases.yml
logstash-core/src/test/resources/org/logstash/plugins/plugin_aliases.yml
qa/integration/fixtures/logs_rollover/log4j2.properties
ci/serverless/config/*.log

132
.mergify.yml Normal file
View file

@ -0,0 +1,132 @@
commands_restrictions:
backport:
conditions:
- or:
- sender-permission>=write
- sender=github-actions[bot]
defaults:
actions:
backport:
title: "[{{ destination_branch }}] (backport #{{ number }}) {{ title }}"
assignees:
- "{{ author }}"
labels:
- "backport"
pull_request_rules:
# - name: ask to resolve conflict
# conditions:
# - conflict
# actions:
# comment:
# message: |
# This pull request is now in conflicts. Could you fix it @{{author}}? 🙏
# To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
# ```
# git fetch upstream
# git checkout -b {{head}} upstream/{{head}}
# git merge upstream/{{base}}
# git push upstream {{head}}
# ```
- name: notify the backport policy
conditions:
- -label~=^backport
- base=main
actions:
comment:
message: |
This pull request does not have a backport label. Could you fix it @{{author}}? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:
* `backport-8./d` is the label to automatically backport to the `8./d` branch. `/d` is the digit.
* If no backport is necessary, please add the `backport-skip` label
- name: remove backport-skip label
conditions:
- label~=^backport-\d
actions:
label:
remove:
- backport-skip
- name: notify the backport has not been merged yet
conditions:
- -merged
- -closed
- author=mergify[bot]
- "#check-success>0"
- schedule=Mon-Mon 06:00-10:00[Europe/Paris]
actions:
comment:
message: |
This pull request has not been merged yet. Could you please review and merge it @{{ assignee | join(', @') }}? 🙏
- name: backport patches to 8.16 branch
conditions:
- merged
- base=main
- label=backport-8.16
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.16"
labels:
- "backport"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
- name: backport patches to 8.17 branch
conditions:
- merged
- base=main
- label=backport-8.17
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.17"
labels:
- "backport"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
- name: backport patches to 8.18 branch
conditions:
- merged
- base=main
- label=backport-8.18
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.18"
labels:
- "backport"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
- name: backport patches to 8.19 branch
conditions:
- merged
- base=main
- label=backport-8.19
actions:
backport:
branches:
- "8.19"
- name: backport patches to 9.0 branch
conditions:
- merged
- base=main
- label=backport-9.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "9.0"
labels:
- "backport"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"

6
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
args: ['--assume-in-merge']

237
.rubocop.yml Normal file
View file

@ -0,0 +1,237 @@
AllCops:
RubyInterpreters:
- ruby
- rake
- jruby
Include:
- '**/*.rb'
- '**/*.gemfile'
- '**/*.gemspec'
- '**/*.rake'
- '**/Gemfile'
- '**/Rakefile'
Exclude:
- 'node_modules/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
- '.git/**/*'
- 'build/**/*'
- 'config/**/*'
DisplayCopNames: true
UseCache: false
#################### Lint ###########################
##### Enabled Cops #####
Lint/DeprecatedClassMethods:
Enabled: true
Lint/ErbNewArguments:
Enabled: true
Lint/BigDecimalNew:
Enabled: true
#################### Layout ###########################
##### Enabled/Disabled Cops #####
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EmptyLineAfterMagicComment:
Enabled: true
Layout/EmptyLineAfterMultilineCondition:
Enabled: false
Layout/EmptyLineBetweenDefs:
EnabLEd: true
Layout/EmptyLines:
Enabled: true
Layout/EmptyLinesAroundAccessModifier:
Enabled: false
Layout/EmptyLinesAroundArguments:
Enabled: true
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/EmptyLinesAroundBeginBody:
Enabled: true
Layout/EmptyLinesAroundBlockBody:
Enabled: true
Layout/EmptyLinesAroundExceptionHandlingKeywords:
Enabled: true
Layout/EmptyLinesAroundMethodBody:
Enabled: true
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true
Layout/TrailingEmptyLines:
Enabled: true
Layout/SpaceAfterColon:
Enabled: true
Layout/SpaceAfterComma:
Enabled: true
Layout/SpaceAfterSemicolon:
Enabled: true
Layout/SpaceAroundBlockParameters:
Enabled: true
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true
Layout/SpaceAroundKeyword:
Enabled: true
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Layout/SpaceAroundOperators:
Enabled: true
Layout/SpaceBeforeBlockBraces:
Enabled: true
Layout/SpaceBeforeBrackets:
Enabled: true
Layout/SpaceBeforeComma:
Enabled: true
Layout/SpaceBeforeComment:
Enabled: true
Layout/SpaceBeforeFirstArg:
Enabled: true
Layout/SpaceBeforeSemicolon:
Enabled: true
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: true
EnforcedStyle: no_space
EnforcedStyleForEmptyBrackets: no_space
Layout/SpaceInsideArrayPercentLiteral:
Enabled: true # no offenses
Layout/SpaceInsideParens:
Enabled: true
EnforcedStyle: no_space
Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: true
Layout/SpaceInsideRangeLiteral:
Enabled: true # no offenses
Layout/SpaceInsideReferenceBrackets:
Enabled: true # no offenses
Layout/SpaceInsideStringInterpolation:
Enabled: true
EnforcedStyle: no_space
##### Need review #####
Layout/AccessModifierIndentation:
Enabled: false
Layout/ArgumentAlignment:
Enabled: false
Layout/ArrayAlignment:
Enabled: false
Layout/AssignmentIndentation:
Enabled: false
Layout/BeginEndAlignment:
Enabled: false
Layout/BlockAlignment:
Enabled: false
Layout/BlockEndNewline:
Enabled: false
Layout/CaseIndentation:
Enabled: false
Layout/ClassStructure:
Enabled: false
Layout/ClosingHeredocIndentation:
Enabled: false
Layout/ClosingParenthesisIndentation:
Enabled: false
Layout/CommentIndentation:
Enabled: false
Layout/ConditionPosition:
Enabled: false
Layout/DefEndAlignment:
Enabled: false
Layout/DotPosition:
Enabled: false
Layout/ElseAlignment:
Enabled: false
Layout/EmptyComment:
Enabled: false
Layout/EmptyLinesAroundClassBody:
Enabled: false
Layout/EndAlignment:
Enabled: false
Layout/EndOfLine:
Enabled: false
Layout/ExtraSpacing:
Enabled: false
Layout/FirstArgumentIndentation:
Enabled: false
Layout/FirstArrayElementIndentation:
Enabled: false
Layout/FirstArrayElementLineBreak:
Enabled: false
Layout/FirstHashElementIndentation:
Enabled: false
Layout/FirstHashElementLineBreak:
Enabled: false
Layout/FirstMethodArgumentLineBreak:
Enabled: false
Layout/FirstMethodParameterLineBreak:
Enabled: false
Layout/FirstParameterIndentation:
Enabled: false
Layout/HashAlignment:
Enabled: false
Layout/HeredocArgumentClosingParenthesis:
Enabled: false
Layout/HeredocIndentation:
Enabled: false
Layout/IndentationConsistency:
Enabled: false
Layout/IndentationStyle:
Enabled: false
Layout/IndentationWidth:
Enabled: false
Layout/InitialIndentation:
Enabled: false
Layout/LeadingCommentSpace:
Enabled: false
Layout/LeadingEmptyLines:
Enabled: false
Layout/LineContinuationLeadingSpace:
Enabled: false
Layout/LineContinuationSpacing:
Enabled: false
Layout/LineEndStringConcatenationIndentation:
Enabled: false
Layout/LineLength:
Enabled: false
Layout/MultilineArrayBraceLayout:
Enabled: false
Layout/MultilineArrayLineBreaks:
Enabled: false
Layout/MultilineAssignmentLayout:
Enabled: false
Layout/MultilineBlockLayout:
Enabled: false
Layout/MultilineHashBraceLayout:
Enabled: false
Layout/MultilineHashKeyLineBreaks:
Enabled: false
Layout/MultilineMethodArgumentLineBreaks:
Enabled: false
Layout/MultilineMethodCallBraceLayout:
Enabled: false
Layout/MultilineMethodCallIndentation:
Enabled: false
Layout/MultilineMethodDefinitionBraceLayout:
Enabled: false
Layout/MultilineMethodParameterLineBreaks:
Enabled: false
Layout/MultilineOperationIndentation:
Enabled: false
Layout/ParameterAlignment:
Enabled: false
Layout/RedundantLineBreak:
Enabled: false
Layout/RescueEnsureAlignment:
Enabled: false
Layout/SingleLineBlockChain:
Enabled: false
Layout/SpaceAfterMethodName:
Enabled: false
Layout/SpaceAfterNot:
Enabled: false
Layout/SpaceInLambdaLiteral:
Enabled: false
Layout/SpaceInsideBlockBraces:
Enabled: false
Layout/SpaceInsideHashLiteralBraces:
Enabled: false

View file

@ -1 +1 @@
jruby-9.1.12.0
jruby-9.4.9.0

View file

@ -3,6 +3,8 @@
All contributions are welcome: ideas, patches, documentation, bug reports,
complaints, etc!
If you want to be rewarded for your contributions, sign up for the [Elastic Contributor Program](https://www.elastic.co/community/contributor). Each time you make a valid contribution, youll earn points that increase your chances of winning prizes and being recognized as a top contributor.
Programming is not a required skill, and there are many ways to help out!
It is more important to us that you are able to contribute.
@ -12,7 +14,7 @@ That said, some basic guidelines, which you are free to ignore :)
Want to lurk about and see what others are doing with Logstash?
* The irc channel (#logstash on irc.freenode.org) is a good place for this
* The #logstash channel on Elastic Stack Community slack (https://elasticstack.slack.com/channels/logstash) is a good place to start.
* The [forum](https://discuss.elastic.co/c/logstash) is also
great for learning from others.
@ -21,12 +23,11 @@ Want to lurk about and see what others are doing with Logstash?
Have a problem you want Logstash to solve for you?
* You can ask a question in the [forum](https://discuss.elastic.co/c/logstash)
* Alternately, you are welcome to join the IRC channel #logstash on
irc.freenode.org and ask for help there!
* You are welcome to join Elastic Stack Community slack (https://elasticstack.slack.com) and ask for help on the #logstash channel.
## Have an Idea or Feature Request?
* File a ticket on [GitHub](https://github.com/elastic/logstash/issues). Please remember that GitHub is used only for issues and feature requests. If you have a general question, the [forum](https://discuss.elastic.co/c/logstash) or IRC would be the best place to ask.
* File a ticket on [GitHub](https://github.com/elastic/logstash/issues). Please remember that GitHub is used only for issues and feature requests. If you have a general question, the [forum](https://discuss.elastic.co/c/logstash) or Elastic Stack Community slack (https://elasticstack.slack.com) is the best place to ask.
## Something Not Working? Found a Bug?
@ -49,29 +50,69 @@ get in touch with our security team [here](https://www.elastic.co/community/secu
If you have a bugfix or new feature that you would like to contribute to Logstash, and you think it will take
more than a few minutes to produce the fix (ie; write code), it is worth discussing the change with the Logstash
users and developers first. You can reach us via [GitHub](https://github.com/elastic/logstash/issues), the [forum](https://discuss.elastic.co/c/logstash), or via IRC (#logstash on freenode irc)
users and developers first. You can reach us via [GitHub](https://github.com/elastic/logstash/issues), the [forum](https://discuss.elastic.co/c/logstash), or Elastic Stack Community slack (https://elasticstack.slack.com).
Please note that Pull Requests without tests and documentation may not be merged. If you would like to contribute but do not have
experience with writing tests, please ping us on IRC/forum or create a PR and ask our help.
experience with writing tests, please ping us on the forum or create a PR and ask for our help.
If you would like to contribute to Logstash, but don't know where to start, you can use the GitHub labels "adoptme"
and "low hanging fruit". Issues marked with these labels are relatively easy, and provides a good starting
If you would like to contribute to Logstash, but don't know where to start, you can use the GitHub labels "adoptme",
"low hanging fruit" and "good first issue". Issues marked with these labels are relatively easy, and provide a good starting
point to contribute to Logstash.
See: https://github.com/elastic/logstash/labels/adoptme
https://github.com/elastic/logstash/labels/low%20hanging%20fruit
See the following links:
* https://github.com/elastic/logstash/labels/adoptme
* https://github.com/elastic/logstash/labels/low%20hanging%20fruit
* https://github.com/elastic/logstash/labels/good%20first%20issue
Or go directly here for an exhaustive list: https://github.com/elastic/logstash/contribute
Sometimes during the development of Logstash core or plugins, configuration parameters for sensitive data such as password, API keys or SSL keyphrases need to be provided to the user.
To protect sensitive information leaking into the logs, follow the best practices below:
- Logstash core and plugin should flag any settings that may contain secrets. If your source changes are in Ruby, apply `:password` validation or wrap the object with `Logstash::Util::Password` object.
- A setting marked as secret should not disclose its value unless retrieved in a non-obvious way. If you are introducing a new class for sensitive object (check `Password.java` and `SecretVariable.java` classes before doing so), make sure to mask the sensitive info by overriding get value (or `toString()` of Java class) default methods.
- Logstash should not log secrets on any log level by default. Make sure you double-check the loggers if they are touching the objects carrying sensitive info.
- Logstash has a dedicated flag, disabled by default, that the raw configuration text be logged for debugging purposes only. Use of `config.debug` will log/display sensitive info in the debug logs, so beware of using it in Produciton.
As an example, suppose you have `my_auth` config which carries the sensitive key. Defining with `:password` validated protects `my_auth` being leaked in Logstash core logics.
```
:my_auth => { :validate => :password },
```
In the plugin level, make sure to wrap `my_auth` with `Password` object.
```
::LogStash::Util::Password.new(my_auth)
```
Using IntelliJ? See a detailed getting started guide [here](https://docs.google.com/document/d/1kqunARvYMrlfTEOgMpYHig0U-ZqCcMJfhvTtGt09iZg/pub).
## Breaking Changes
When introducing new behaviour, we favor implementing it in a non-breaking way that users can opt into, meaning users' existing configurations continue to work as they expect them to after upgrading Logstash.
But sometimes it is necessary to introduce "breaking changes," whether that is removing an option that doesn't make sense anymore, changing the default value of a setting, or reimplementing a major component differently for performance or safety reasons.
When we do so, we need to acknowledge the work we are placing on the rest of our users the next time they upgrade, and work to ensure that they can upgrade confidently.
Where possible, we:
1. first implement new behaviour in a way that users can explicitly opt into (MINOR),
2. commuicate the pending change in behaviour, including the introduction of deprecation warnings when old behaviour is used (MINOR, potentially along-side #1),
3. change the default to be new behaviour, communicate the breaking change, optionally allow users to opt out in favor of the old behaviour (MAJOR), and eventually
4. remove the old behaviour's implementation from the code-base (MAJOR, potentially along-side #3).
After a pull request is marked as a "breaking change," it becomes necessary to either:
- refactor into a non-breaking change targeted at next minor; OR
- split into non-breaking change targeted at next minor, plus breaking change targeted at next major
## Contributing to plugins
Check our [documentation](https://www.elastic.co/guide/en/logstash/current/contributing-to-logstash.html) on how to contribute to plugins or write your own!
Check the _Contributing Documentation and Code Changes_ section to prevent plugin sensitive info from leaking in the debug logs.
### Logstash Plugin Changelog Guidelines
This document provides guidelines on editing a logstash plugin's CHANGELOG file.
#### What's a CHANGELOG file?
### What's a CHANGELOG file?
According to [keepachangelog.com](https://keepachangelog.com/en/1.0.0/):
@ -107,14 +148,24 @@ then you should still create an entry in the changelog, using the word `Unreleas
Most code in logstash-plugins comes from self-contained changes in the form of pull requests, so each entry should:
1. be a summary of the Pull Request and contain a markdown link to it.
2. start with [BREAKING], when it denotes a breaking change.
* Note: Breaking changes should warrant a major version bump.
3. after [BREAKING], start with one of the following keywords:
`Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
4. keep multiple entries with the same keyword in the same changelog revision together.
1. Be a summary of the Pull Request and contain a markdown link to the PR.
2. Begin your entry with an introductory label if appropriate. Labels include:
`[DOC]`, `[BREAKING]`, `[SECURITY]`.
NOTE: Your PR may not need a label.
3. After the label, start with one of the following keywords:
`Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`.
4. Keep multiple entries with the same keyword in the same changelog revision together.
The meaning of the keywords is as follows (copied from [keepachangelog.com](https://keepachangelog.com/en/1.0.0/#how):
Labels (optional):
- **`[BREAKING]`** for a breaking change.
Note that breaking changes should warrant a major version bump.
- **`[DOC]`** for a change that affects only documentation, and not code.
- **`[SECURITY]`** for a security fix. If you're working on a security issue,
please make sure to follow the process outlined by our security team.
If you haven't done so already, please [get in touch with them](https://www.elastic.co/community/security) first.
Keywords (copied from [keepachangelog.com](https://keepachangelog.com/en/1.0.0/#how)):
- **`Added`** for new features.
- **`Changed`** for changes in existing functionality.
@ -135,6 +186,9 @@ Example:
- Changed default value of `execution_bugs` from 30 to 0 [#104](http://example.org)
- [BREAKING] Removed obsolete option `enable_telnet` option [#100](http://example.org)
## 3.3.3
- [DOC] Fixed incorrect formatting of code sample [#85](http://example.org)
## 3.3.2
- Fixed incorrect serialization of input data when encoding was `Emacs-Mule` [#84](http://example.org)
@ -196,4 +250,3 @@ Keep these in mind as both authors and reviewers of PRs:
* If no, ask for clarifications on the PR. This will usually lead to changes in the code such as renaming of variables/functions or extracting of functions or simply adding "why" inline comments. But first ask the author for clarifications before assuming any intent on their part.
* I must not focus on personal preferences or nitpicks. If I understand the code in the PR but simply would've implemented the same solution a different way that's great but its not feedback that belongs in the PR. Such feedback only serves to slow down progress for little to no gain.

View file

@ -1,59 +0,0 @@
FROM ubuntu:xenial
RUN apt-get update && \
apt-get install -y zlib1g-dev build-essential vim rake git curl libssl-dev libreadline-dev libyaml-dev \
libxml2-dev libxslt-dev openjdk-8-jdk-headless curl iputils-ping netcat && \
apt-get clean
WORKDIR /root
RUN adduser --disabled-password --gecos "" --home /home/logstash logstash && \
mkdir -p /usr/local/share/ruby-build && \
mkdir -p /opt/logstash && \
mkdir -p /opt/logstash/data && \
mkdir -p /mnt/host && \
chown logstash:logstash /opt/logstash
USER logstash
WORKDIR /home/logstash
# used by the purge policy
LABEL retention="keep"
ADD gradlew /opt/logstash/gradlew
ADD gradle/wrapper /opt/logstash/gradle/wrapper
ADD buildSrc /opt/logstash/buildSrc
RUN /opt/logstash/gradlew wrapper
ADD versions.yml /opt/logstash/versions.yml
ADD LICENSE.txt /opt/logstash/LICENSE.txt
ADD NOTICE.TXT /opt/logstash/NOTICE.TXT
ADD licenses /opt/logstash/licenses
ADD CONTRIBUTORS /opt/logstash/CONTRIBUTORS
ADD Gemfile.template /opt/logstash/Gemfile.template
ADD Rakefile /opt/logstash/Rakefile
ADD build.gradle /opt/logstash/build.gradle
ADD rakelib /opt/logstash/rakelib
ADD config /opt/logstash/config
ADD spec /opt/logstash/spec
ADD qa /opt/logstash/qa
ADD lib /opt/logstash/lib
ADD pkg /opt/logstash/pkg
ADD tools /opt/logstash/tools
ADD logstash-core /opt/logstash/logstash-core
ADD logstash-core-plugin-api /opt/logstash/logstash-core-plugin-api
ADD bin /opt/logstash/bin
ADD modules /opt/logstash/modules
ADD x-pack /opt/logstash/x-pack
ADD ci /opt/logstash/ci
ADD settings.gradle /opt/logstash/settings.gradle
USER root
RUN rm -rf build && \
mkdir -p build && \
chown -R logstash:logstash /opt/logstash
USER logstash
WORKDIR /opt/logstash
LABEL retention="prune"

View file

@ -1,22 +0,0 @@
#logstash-base image, use ci/docker_update_base_image.sh to push updates
FROM ubuntu:xenial
RUN apt-get update && \
apt-get install -y zlib1g-dev build-essential vim rake git curl libssl-dev libreadline-dev libyaml-dev \
libxml2-dev libxslt-dev openjdk-8-jdk-headless curl iputils-ping netcat && \
apt-get clean
WORKDIR /root
RUN adduser --disabled-password --gecos "" --home /home/logstash logstash && \
mkdir -p /usr/local/share/ruby-build && \
mkdir -p /opt/logstash && \
mkdir -p /mnt/host && \
chown logstash:logstash /opt/logstash
USER logstash
WORKDIR /home/logstash
RUN mkdir -p /opt/logstash/data
# used by the purge policy
LABEL retention="keep"

View file

@ -4,122 +4,46 @@
source "https://rubygems.org"
gem "logstash-core", :path => "./logstash-core"
gem "logstash-core-plugin-api", :path => "./logstash-core-plugin-api"
gem "paquet", "~> 0.2"
gem "ruby-progressbar", "~> 1"
gem "builder", "~> 3"
gem "ci_reporter_rspec", "~> 1", :group => :development
gem "rspec", "~> 3.5", :group => :development
gem "logstash-devutils", "~> 1", :group => :development
gem "benchmark-ips", :group => :development
gem "octokit", "~> 4", :group => :build
gem "stud", "~> 0.0.22", :group => :build
gem "rack-test", :require => "rack/test", :group => :development
gem "fpm", "~> 1.3.3", :group => :build
gem "rubyzip", "~> 1", :group => :build
gem "pleaserun", "~>0.0.28", require: false
gem "rake", "~> 13", require: false
gem "ruby-progressbar", "~> 1", require: false
gem "ruby-maven-libs", "~> 3", ">= 3.9.6.1"
gem "logstash-output-elasticsearch", ">= 11.14.0"
gem "polyglot", require: false
gem "treetop", require: false
gem "minitar", "~> 1", :group => :build
gem "childprocess", "~> 4", :group => :build
gem "fpm", "~> 1", ">= 1.14.1", :group => :build # compound due to bugfix https://github.com/jordansissel/fpm/pull/1856
gem "gems", "~> 1", :group => :build
gem "flores", "~> 0.0.6", :group => :development
gem "atomic", "~> 1"
gem "octokit", "~> 4.25", :group => :build
gem "rubyzip", "~> 1", :group => :build
gem "stud", "~> 0.0.22", :group => :build
# remove fileutils declaration when start using Ruby 3.2+, by default includes `fileutils-v1.7.0`
# (https://git.ruby-lang.org/ruby.git/commit/?h=ruby_3_2&id=05caafb4731c796890027cafedaac59dc108a23a)
# note that the reason to use 1.7.0 is due to https://github.com/logstash-plugins/logstash-integration-aws/issues/28
gem "fileutils", "~> 1.7"
gem "rubocop", :group => :development
# rubocop-ast 1.43.0 carries a dep on `prism` which requires native c extensions
gem 'rubocop-ast', '= 1.42.0', :group => :development
gem "belzebuth", :group => :development
gem "benchmark-ips", :group => :development
gem "ci_reporter_rspec", "~> 1", :group => :development
gem "flores", "~> 0.0.8", :group => :development
gem "json-schema", "~> 2", :group => :development
gem "pleaserun", "~>0.0.28"
gem "rake", "~> 12"
gem "logstash-devutils", "~> 2.6.0", :group => :development
gem "rack-test", :require => "rack/test", :group => :development
gem "rspec", "~> 3.5", :group => :development
gem "webmock", "~> 3", :group => :development
gem "logstash-codec-cef"
gem "logstash-codec-collectd"
gem "logstash-codec-dots"
gem "logstash-codec-edn"
gem "logstash-codec-edn_lines"
gem "logstash-codec-es_bulk"
gem "logstash-codec-fluent"
gem "logstash-codec-graphite"
gem "logstash-codec-json"
gem "logstash-codec-json_lines"
gem "logstash-codec-line"
gem "logstash-codec-msgpack"
gem "logstash-codec-multiline"
gem "logstash-codec-netflow"
gem "logstash-codec-plain"
gem "logstash-codec-rubydebug"
gem "logstash-filter-aggregate"
gem "logstash-filter-anonymize"
gem "logstash-filter-cidr"
gem "logstash-filter-clone"
gem "logstash-filter-csv"
gem "logstash-filter-date"
gem "logstash-filter-de_dot"
gem "logstash-filter-dissect"
gem "logstash-filter-dns"
gem "logstash-filter-drop"
gem "logstash-filter-elasticsearch"
gem "logstash-filter-fingerprint"
gem "logstash-filter-geoip"
gem "logstash-filter-grok"
gem "logstash-filter-http"
gem "logstash-filter-jdbc_static"
gem "logstash-filter-jdbc_streaming"
gem "logstash-filter-json"
gem "logstash-filter-kv"
gem "logstash-filter-memcached"
gem "logstash-filter-metrics"
gem "logstash-filter-mutate"
gem "logstash-filter-ruby"
gem "logstash-filter-sleep"
gem "logstash-filter-split"
gem "logstash-filter-syslog_pri"
gem "logstash-filter-throttle"
gem "logstash-filter-translate"
gem "logstash-filter-truncate"
gem "logstash-filter-urldecode"
gem "logstash-filter-useragent"
gem "logstash-filter-xml"
gem "logstash-input-beats"
gem "logstash-input-azure_event_hubs"
gem "logstash-input-dead_letter_queue"
gem "logstash-input-elasticsearch"
gem "logstash-input-exec"
gem "logstash-input-file"
gem "logstash-input-ganglia"
gem "logstash-input-gelf"
gem "logstash-input-generator"
gem "logstash-input-graphite"
gem "logstash-input-heartbeat"
gem "logstash-input-http"
gem "logstash-input-http_poller"
gem "logstash-input-imap"
gem "logstash-input-jdbc"
gem "logstash-input-kafka"
gem "logstash-input-pipe"
gem "logstash-input-rabbitmq"
gem "logstash-input-redis"
gem "logstash-input-s3"
gem "logstash-input-snmp"
gem "logstash-input-snmptrap"
gem "logstash-input-sqs"
gem "logstash-input-stdin"
gem "logstash-input-syslog"
gem "logstash-input-tcp"
gem "logstash-input-twitter"
gem "logstash-input-udp"
gem "logstash-input-unix"
gem "logstash-output-elastic_app_search"
gem "logstash-output-cloudwatch"
gem "logstash-output-csv"
gem "logstash-output-elasticsearch"
gem "logstash-output-email"
gem "logstash-output-file"
gem "logstash-output-graphite"
gem "logstash-output-http"
gem "logstash-output-kafka"
gem "logstash-output-lumberjack"
gem "logstash-output-nagios"
gem "logstash-output-null"
gem "logstash-output-pipe"
gem "logstash-output-rabbitmq"
gem "logstash-output-redis"
gem "logstash-output-s3"
gem "logstash-output-sns"
gem "logstash-output-sqs"
gem "logstash-output-stdout"
gem "logstash-output-tcp"
gem "logstash-output-udp"
gem "logstash-output-webhdfs"
gem "simplecov", "~> 0.22.0", :group => :development
gem "simplecov-json", require: false, :group => :development
gem "jar-dependencies", "= 0.4.1" # Gem::LoadError with jar-dependencies 0.4.2
gem "murmurhash3", "= 0.1.6" # Pins until version 0.1.7-java is released
gem "date", "= 3.3.3"
gem "thwait"
gem "bigdecimal", "~> 3.1"
gem "psych", "5.2.2"
gem "cgi", "0.3.7" # Pins until a new jruby version with updated cgi is released
gem "uri", "0.12.3" # Pins until a new jruby version with updated cgi is released

10780
NOTICE.TXT

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more