Compare commits

...

1126 commits

Author SHA1 Message Date
Edmo Vamerlatti Costa
e742b760cd
Bump version to 7.17.26 (#16588) 2024-10-22 10:52:45 +02:00
github-actions[bot]
d24e7f2b53
Release notes for 7.17.25 (#16587)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
2024-10-21 11:41:09 -04:00
github-actions[bot]
de7e0d04c8
bump lock file for 7.17 (#16559)
* Update patch plugin versions in gemfile lock

* Pin rexml to 3.2.6 to address compatibility issues with 3.2.9, as we do in main (see #16209)

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2024-10-16 10:25:36 +02:00
Dimitrios Liappis
0e19e42a4e
Pin CI container images to v0.4 for 7.17 branch (#16497)
Recently CI images got updated to Java 21 which breaks CI for the 7.17
branch.

This commit pins the CI container images to the older version for fix failures like https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/760

includes a cherry pick of https://github.com/elastic/logstash/pull/16499
2024-10-02 19:17:54 +03:00
kaisecheng
34c84f6f7e
bump core to 7.17.25 (#16438) 2024-09-10 10:55:34 +01:00
github-actions[bot]
9ea8a15af6
Release notes for 7.17.24 (#16415)
* Update release notes for 7.17.24

* release note

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2024-09-09 16:07:44 +01:00
João Duarte
d8a5f4977f
Update z_rubycheck.rake to no longer inject Xmx1g (#16420) 2024-09-05 13:59:40 +01:00
github-actions[bot]
3e07c3a021
bump lock file for 7.17 (#16412)
* Update patch plugin versions in gemfile lock

* add strscan license note

* update strscan license

* add license mapping

* pin rexml to 3.2.6

* remove strscan license note

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2024-09-03 20:40:51 +01:00
github-actions[bot]
bf220b6e12
Increase Jruby -Xmx to avoid OOM during zip task in DRA (#16408) (#16409)
Fix: #16406
(cherry picked from commit 6e93b30c7f)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-08-28 11:37:31 +01:00
Andrea Selva
0f43da15c8
Update bundled JDK (#16394) 2024-08-20 11:25:25 +02:00
Andrea Selva
dde697251f
Bump 7.17.24 (#16346) 2024-07-30 15:23:50 +01:00
github-actions[bot]
1fbfdc0d6d
Release notes for 7.17.23 (#16345)
* Update release notes for 7.17.23

* Refined release notes

* Apply suggestions from code review

---------

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>
2024-07-29 16:42:41 +01:00
github-actions[bot]
5b13f973d5
bump lock file for 7.17 (#16341)
* Update patch plugin versions in gemfile lock
* Force rexml from 3.2.9 back 3.2.6
* Added missed licenses
2024-07-23 09:03:29 +02:00
github-actions[bot]
2cf0717164
regenerate webserver test certificates (#16331) (#16334)
(cherry picked from commit c30aa1c7f5)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-07-17 10:45:23 +01:00
Dimitrios Liappis
f22b574b32
Remove Debian 10 from CI (#16300) (#16329)
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-15 17:54:29 +03:00
github-actions[bot]
9c201ecde4
Remove CentOS 7 from CI (#16293) (#16298)
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

(cherry picked from commit db06ec415a)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-07-04 17:16:14 +03:00
João Duarte
92a601ce24
move j2 template to erb in 7.17 (#16274)
This should simplify CI infrastructure by not requiring python.
2024-07-03 12:45:19 +01:00
github-actions[bot]
70be957098
Add retries to aarch64 CI pipeline (#16271) (#16273)
Add retries in the aarch64 CI pipeline to reduce noise from transient
network failures.

Closes https://github.com/elastic/ingest-dev/issues/3510

(cherry picked from commit 7080ec5427)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-07-01 14:32:03 +03:00
Andrea Selva
28cb00b6ed
Require kafka integration to 10.12 for 7.17 (#16256)
Bump gemlock to bundle logstash-integration-kafka =>10.12.1
2024-06-25 11:07:42 +02:00
kaisecheng
8b2c6de488
update ironbank UBI version (#16247)
ironbank update to the newest ubi version 8.10
2024-06-20 15:02:38 +01:00
Andrea Selva
185d800c08
Version bump for 7.17.23 (#16215) 2024-06-13 15:12:48 +02:00
github-actions[bot]
6faf0d7216
Release notes for 7.17.22 (#16184)
* Update release notes for 7.17.22

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-06-12 08:26:57 +02:00
github-actions[bot]
0ccc0c3ff1
[DOC] Remove reference to puppet LS module (#12356) (#16167)
As the module is not maintained since 2018 and it was community supported, I would like to remove it from the documentation.

(cherry picked from commit 53d9480176)

Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>
2024-05-16 14:25:00 -04:00
kaisecheng
c2ffe2f7b2
bump 7.17.22 (#16122) 2024-05-02 09:38:03 +01:00
github-actions[bot]
5791f5fc1c
Release notes for 7.17.21 (#16109)
* Update release notes for 7.17.21

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-05-01 23:40:47 +01:00
github-actions[bot]
acd3b87db9
Update patch plugin versions in gemfile lock (#16110)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2024-04-25 21:52:08 +01:00
github-actions[bot]
d1477d0adc
Release notes for 7.17.20 (#16067)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-04-08 10:59:58 -04:00
João Duarte
8cfc4a0911
bump version to 7.17.21 (#16070) 2024-04-08 13:26:29 +01:00
github-actions[bot]
3e412daaac
Update patch plugin versions in gemfile lock (#16061)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2024-04-05 16:50:53 +01:00
Andrea Selva
96dc9043e0
Bump 7.17.20 (#16023) 2024-03-26 09:22:45 +01:00
github-actions[bot]
5d974610e7
Release notes for 7.17.19 (#16016)
* Update release notes for 7.17.19
2024-03-25 09:39:10 +01:00
Ry Biesemeyer
fa3973df96
Bump ES output to include unicode-vs-compression fix (#16012) 2024-03-19 20:13:55 -07:00
github-actions[bot]
937b1c5968
Update patch plugin versions in gemfile lock (#16010)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2024-03-19 11:20:24 +01:00
github-actions[bot]
8c23b10fcd
Split java/ruby unit test steps on Windows (#15888) (#15994)
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

(cherry picked from commit c0c213d17e)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-03-11 11:20:12 +02:00
github-actions[bot]
c998741aa5
Fix the Bootstrap check test failure on Windows. (#15975) (#15991)
(cherry picked from commit 19637143e6)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-03-11 10:15:08 +02:00
github-actions[bot]
b908f6ea1a
Follow up to #15900 -- fix remaining acceptance tests (#15907) (#15953)
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

(cherry picked from commit 54f73e5d22)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-02-15 12:52:19 +02:00
github-actions[bot]
59b1915250
Fix packaging service check failures (#15946) (#15950)
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

(cherry picked from commit eedccea33f)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-02-15 11:13:33 +02:00
Andrea Selva
9da37e2022
Updates JDK bundled in Logstash (#15842) 2024-02-09 13:52:43 +01:00
github-actions[bot]
5d1eef89f3
introduce go.mod for env2yaml (#15921) (#15923)
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.

(cherry picked from commit 5c3e64d591)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-02-08 18:17:07 +00:00
Mashhur
46df43b677
Version bump to 7.17.19 (#15906) 2024-02-06 09:27:41 -08:00
Dimitrios Liappis
a6839e0c69
Fix service startup with acceptance tests (#15900) (#15905)
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

(cherry picked from commit b66dc7f460)
2024-02-06 18:17:06 +02:00
github-actions[bot]
cf3308f5d5
Add retries to acceptance/docker steps in BK (#15901) (#15903)
Similarly to #15874, this commit adds retries
to another group, the acceptance/docker to reduce
build noise from transient issues.

(cherry picked from commit 2fc3f4c21f)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-02-06 16:11:01 +02:00
github-actions[bot]
5a6bbae6b3
Add Debian 12 to CI (#15895) (#15899)
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

(cherry picked from commit fedcf58c48)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-02-06 09:15:30 +02:00
github-actions[bot]
5cab4c11b2
Release notes for 7.17.18 (#15892)
* Update release notes for 7.17.18

* Revise release note.

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
2024-02-05 13:50:05 -08:00
github-actions[bot]
3420d4c145
Allow running Java+Ruby tests on Windows separately (#15861) (#15887)
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
(cherry picked from commit 8ac55184b8)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-02-01 10:40:44 +02:00
github-actions[bot]
6a1ed267d4
Add retries to JDK matrix pipeline steps (#15877) (#15879)
This commit adds retries to the steps of the Linux + Windows JDK matrix
pipeline steps to avoid notification noise due to transient network
errors.

(cherry picked from commit 3b747d86b8)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-30 18:58:02 +02:00
github-actions[bot]
a44d4bf9f4
Add BK retries to exhaustive/compat steps (#15874) (#15876)
As a follow up to #15787 we also add Buildkite retries for the
exhaustive pipeline / compatibility group steps to prevent
failures due to flakiness.

(cherry picked from commit 88a32cca81)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-30 15:09:05 +02:00
github-actions[bot]
fdf8a22b8f
Remove Ubuntu 18.04 from CI jobs (#15855) (#15860)
Relates https://github.com/elastic/ingest-dev/issues/2849

(cherry picked from commit 3f5b44a1ad)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-26 17:41:21 +02:00
Ry Biesemeyer
b16011a151
bump to 7.17.18 (#15841) 2024-01-23 08:33:54 -08:00
Dimitrios Liappis
72900ae7c6
Fix IT tests after version bumps (#15827) (#15839)
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.

(cherry picked from commit d74fea4b55)
2024-01-23 16:41:19 +02:00
github-actions[bot]
2424d775f6
Release notes for 7.17.17 (#15831)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-01-22 17:55:02 -05:00
github-actions[bot]
a2f258c0fb
Fix acceptance/packaging upgrade test near a release (#15826) (#15830)
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

(cherry picked from commit 15e19a96c2)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-22 21:21:14 +02:00
github-actions[bot]
c0f13dfe3f
Annotate successful DRA builds with summary URL (#15820) (#15824)
This commit makes the generated DRA URL easily accessible via
a Buildkite annotation.

Closes https://github.com/elastic/ingest-dev/issues/2608

(cherry picked from commit c5cb1fe2ed)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-22 17:04:55 +02:00
github-actions[bot]
438a6cf6f9
Fix flaky logstash-plugin IT test (#15803) (#15818)
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

(cherry picked from commit fc09ad4112)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-18 15:33:20 +02:00
Dimitrios Liappis
289b61f184
Enable packaging tests in exhaustive pipeline (#15807) (#15781)
This commit adds the packaging tests (that were refactored in #15754
to not rely on Vagrant) in a new "acceptance" group.

One difference from #15781 is that we use ubuntu 2004 for building packages
(as done in DRA/7.17) due to https://github.com/jruby/jruby/pull/7611#issuecomment-1750387837

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

(cherry picked from commit 16c4d8827e)
2024-01-17 16:51:24 +02:00
Dimitrios Liappis
e74c0679fd
Refactor qa/acceptance tests to get away from vagrant (#15696) (#15754)
This commit modernizes the qa/acceptance (packaging) test framework by
moving away from Vagrant and having the tests operate locally.

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

(cherry picked from commit cebe4a7537)
2024-01-17 09:55:40 +02:00
github-actions[bot]
d397a4d978
Update patch plugin versions in gemfile lock (#15811)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2024-01-16 10:45:27 -08:00
github-actions[bot]
fe82d6b701
Add Docker acceptance to exhaustive BK pipeline (#15748) (#15800)
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

(cherry picked from commit fca1fccb66)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-12 09:25:36 +02:00
github-actions[bot]
a98b3550ad
Add retries to PR pipeline steps (#15787) (#15792)
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.

(cherry picked from commit 739e8a3ef0)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-11 16:57:47 +02:00
Andrea Selva
f254443dc6
Update Puma on 7.17 (#15774)
* Update Puma on 7.17
2024-01-10 11:27:37 +01:00
Dimitrios Liappis
5f2610ee2b
Run BK exhaustive pipeline when code is pushed (#15738) (#15772)
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 11:17:15 +02:00
github-actions[bot]
5f0838c0b6
Pin childprocess gem to major version 4 (#15758) (#15762)
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>
(cherry picked from commit 9f1d55c6a2)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-08 19:01:57 +02:00
github-actions[bot]
23071f575f
JUnit result annotation for Buildkite PR jobs (#15741) (#15746)
This commit adds annotations for Java unit tests (in the pull request pipeline) helping
identify failing unit tests quickly.

(cherry picked from commit 286088915f)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-04 17:49:32 +02:00
github-actions[bot]
82b2b9609b
Skip input step when triggering JDK matrix jobs (#15733) (#15736)
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

(cherry picked from commit a8b64a32e9)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-02 14:36:03 +02:00
github-actions[bot]
a25ba1c858
Don't block triggered JDK matrix Buildkite jobs (#15729) (#15732)
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.

(cherry picked from commit 82ac474b13)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-01-02 11:59:29 +02:00
github-actions[bot]
8cf1ce2762
[ci] Add testing phase to exhaustive tests suite (#15711) (#15718)
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

(cherry picked from commit 9538338abb)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-12-21 10:13:30 +02:00
github-actions[bot]
edd6c5acef
[ci] Reusable unit + IT test steps for Buildkite (#15708) (#15713)
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.

(cherry picked from commit 03d7b59f2a)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-12-20 18:50:37 +02:00
João Duarte
4b29dac252
bump to 7.17.17 (#15683) 2023-12-12 10:08:50 +00:00
github-actions[bot]
089bfe9e53
Release notes for 7.17.16 (#15659)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-12-07 09:13:45 -05:00
github-actions[bot]
a461023f5a
Shutdown DLQ segments flusher only if it has been started (#15649) (#15657)
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).

(cherry picked from commit eddd91454f)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2023-12-05 12:59:04 +01:00
github-actions[bot]
32ca361cd4
Update patch plugin versions in gemfile lock (#15652)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2023-12-04 15:50:44 +00:00
github-actions[bot]
06acff465a
[ci] Compatibility tests for Exhaustive suite (#15641) (#15646)
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

(cherry picked from commit d42b938f81)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-30 20:53:50 +02:00
Dimitrios Liappis
6b88748221
[ci] Switch to Adoptium JDK 11 for Jenkins CI (#15635)
This commit is a manual backport of #15628 on the 7.17 branch.
Since 7.17 uses Java 11, we switch to the adoptium variant, which is
still receiving updates (latest available is `11.0.21+9` as of now.)
2023-11-29 12:49:11 +02:00
github-actions[bot]
fff1b277b2
[ci] Switch to Adoptium distro for JDK 11 (#15629) (#15634)
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

(cherry picked from commit 6446bba962)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-29 12:21:19 +02:00
github-actions[bot]
807530b99a
[ci] Fix scheduled JDK matrix CI jobs (#15623) (#15626)
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

(cherry picked from commit f0019bf33c)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-28 16:32:52 +02:00
github-actions[bot]
1e61146288
[ci] Initial Exhaustive tests Buildkite pipeline (#15607) (#15616)
This commit adds a skeleton Buildkite pipeline for the Exhaustive tests
suite.

(cherry picked from commit db50983ab5)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-27 12:25:59 +02:00
github-actions[bot]
ad34b887f7
[ci] Use GCP prod image for Linux JDK matrix job (#15600) (#15603)
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

(cherry picked from commit e259e04e53)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-20 19:10:12 +02:00
Dimitrios Liappis
b2aad94c89
[ci] Add yaml language server to pipelines (#15590) (#15592)
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-20 17:23:47 +02:00
github-actions[bot]
04c6ae40ae
[ci] Support amazonlinux for JDK matrix pipeline (#15595) (#15597)
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

(cherry picked from commit 8fa3bd0d7f)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-20 12:10:19 +02:00
github-actions[bot]
440cfb464e
[ci] Fix image name for Rocky Linux 8 (#15584) (#15588)
Fix typo for image name of Rocky Linux 8 for JDK matrix jobs.

(cherry picked from commit ce63ea4a51)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-15 10:17:44 +02:00
github-actions[bot]
56812c359e
[ci] JDK matrix Buildkite pipelines (pt 2/Windows) (#15563) (#15569)
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

(cherry picked from commit 0ede19a0e1)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-13 18:51:16 +02:00
github-actions[bot]
7302a0067c
Release notes for 7.17.15 (#15573)
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-11-13 14:28:38 +00:00
João Duarte
176a2ca23f
bump version to 7.17.16 (#15575) 2023-11-13 13:55:17 +00:00
github-actions[bot]
44b6ec5016
[ci] JDK matrix Buildkite pipelines (part 1) (#15539) (#15556)
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

(cherry picked from commit 956bf483f2)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-09 11:18:27 +02:00
github-actions[bot]
45aa3584ad
[ci] Split JDK matrix pipelines per OS (#15534) (#15538)
This commit splits the generic Buildkite pipelines introduced
in #15520 for JDK tests to separate pipelines for Linux and Windows.

(cherry picked from commit 07147b3e40)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-07 15:47:56 +02:00
github-actions[bot]
bc96364877
[ci] Initial JDK matrix Buildkite pipeline (#15520) (#15523)
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

(cherry picked from commit ccc41d76ff)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-11-02 18:23:12 +02:00
github-actions[bot]
c998e4f091
[ci] aarch64 Buildkite pipeline part 2 (#15473) (#15506)
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

(cherry picked from commit c384190718)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-26 09:39:17 +03:00
github-actions[bot]
ffd026a806
[ci] re-enable Java unit tests on aarch64 pipeline (#15492) (#15495)
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.

(cherry picked from commit 16da966290)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-25 12:00:46 +03:00
github-actions[bot]
3d3b60ad51
[ci] aarch64 Buildkite pipeline part 1 (#15466) (#15482)
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
(cherry picked from commit 36656de4f0)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-24 09:24:57 +03:00
github-actions[bot]
9d56c7aa36
[ci] Initial aarch64 Buildkite pipeline (#15460) (#15469)
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

(cherry picked from commit 0083738cde)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-18 14:48:01 +03:00
github-actions[bot]
e3f4d9cb8a
[docs] Small typo fixes in README (#15429) (#15457)
Fix a few typos in the Logstash README.md

(cherry picked from commit 784ca0243e)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-16 18:33:53 +03:00
github-actions[bot]
f959972cda
Migrate remaining PR jobs to Buildkite #15444 (#15449)
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

(cherry picked from commit 555a8ff8e3)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-16 10:25:45 +03:00
github-actions[bot]
763a2d0048
[ci] Add PR it-tests (part 1+2) to Buildkite (#15438) (#15447)
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

(cherry picked from commit 816d7e6b2b)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-13 21:45:33 +03:00
github-actions[bot]
0529308ceb
[ci] Commit PR based Java unit tests for Buildkite (#15437) (#15443)
This commit adds Java unit tests (including sonar scans) to the
Buildkite pull request pipeline.

Relates: https://github.com/elastic/ingest-dev/issues/1721
(cherry picked from commit e285425d54)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-13 12:57:39 +03:00
Dimitrios Liappis
8ca4d205e3
[ci] Backport Buildkite PR pipeline to 7.17 (#15432)
This is a backport of the initial Pull Request pipeline for Buildkite.

While currently we haven't migrated all PR jobs from Jenkins, this is needed so PRs against non `main` branches don't fail this step (also giving us the possibility to test functionality against non `main` branches).

Relates:

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

## Release notes
[rn:skip]
2023-10-12 17:06:56 +03:00
Mashhur
3fd2a9c121
Bump core to 7.17.15 (#15423) 2023-10-10 10:16:03 -07:00
github-actions[bot]
34824fc464
Release notes for 7.17.14 (#15389)
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
2023-10-09 17:57:15 -04:00
Dimitrios Liappis
f6f88d691b
[ci] Build 7.17 DRA using Ubuntu 20.04 (#15398)
We discovered[^1] that JRuby 9.2 and 9.3 have an issue when using
FileUtils with Glibc >2.34 (e.g. on Ubuntu 22.04).

This commit switches to Ubuntu 20.04 VM images for building DRA
artifacts with branch 7.17.

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

[^1]: https://github.com/jruby/jruby/pull/7611#issuecomment-1750387837
2023-10-06 20:54:50 +03:00
Dimitrios Liappis
c85ec893aa
[ci] Backport Buildkite DRA pipeline+scripts to 7.17 (#15393)
This is a backport of the DRA pipeline and related scripts from:

- #15366
- #15365
- #15356
- #15352
- #15344
- #15343
- #15337
- #15312

Note that it's a manual backport because some PRs (e.g. #15312) contain files (`catalog-info.yaml`) that should only
live on the `main` branch.
2023-10-06 09:42:16 +03:00
github-actions[bot]
bec46248d0
Update patch plugin versions in gemfile lock (#15388)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2023-10-04 12:31:42 -07:00
Andrea Selva
694ef69c45
Updates installDefaultGems task to replace Xerces (#15357)
Replaces the Xerces version shipped with Nokogiri
2023-09-28 16:49:41 +02:00
github-actions[bot]
b5d03c5e8e
fix NPE when getting native thread id (#15301) (#15322)
This commit adds null guard to get the native thread when constructing pipeline report

Fix: #15300
(cherry picked from commit cd78558121)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2023-09-14 21:03:04 +01:00
João Duarte
449b771e05
Update .ruby-version to jruby-9.2.20.1 (#15309) 2023-09-07 14:30:08 +01:00
Andrea Selva
5c93249735
Bump 7.17.14 (#15292) 2023-09-05 13:18:34 +01:00
github-actions[bot]
e2047573fa
Release notes for 7.17.13 (#15289)
* Update release notes for 7.17.13
---------

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>
2023-09-04 21:52:58 +01:00
github-actions[bot]
5da87b98ca
Update patch plugin versions in gemfile lock (#15285)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2023-08-29 14:22:03 +02:00
Andrea Selva
73a43a9b78
Update Puma on 7.17 (#15274) 2023-08-23 08:35:36 +02:00
Rob Bavey
81e5ddb04a
Version Bump to 7.17.13 (#15218) 2023-07-25 09:12:04 -04:00
João Duarte
8ba25a9d9e
Update JDK to 11.0.20+8 (#15216) 2023-07-25 10:13:32 +01:00
github-actions[bot]
fce9da92dd
Release notes for 7.17.12 (#15199)
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: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
2023-07-24 19:20:00 -04:00
github-actions[bot]
3a4bd272c8
Fix typo that caused subtitle not to show (#15202) (#15203)
(cherry picked from commit b082e519c0)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2023-07-20 13:09:30 -04:00
Mashhur
fb45b171b8
Upgrade dependencies, remove deprecated dependencies. (#15134)
* upgrades logstash-mixin-aws to 5.1.0
* removes unused aws-sdk-v1 dependency.
* upgrades json version to 2.6.3
* upgrades fpm to 1.14.1 where 13.x versions.
2023-07-18 11:16:55 +01:00
github-actions[bot]
6ac076092e
specs: assert presence of logging without risking NoMethodError (#14633) (#14719)
* specs: assert presence of logging without risking NoMethodError

* Update qa/integration/specs/monitoring_api_spec.rb

(cherry picked from commit 9460d4d7fc)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2023-07-18 10:48:53 +01:00
github-actions[bot]
8fac9131b1
Update patch plugin versions in gemfile lock (#15187)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2023-07-18 10:48:07 +01:00
Edmo Vamerlatti Costa
55b39e17f9
Add release flag on the Gradle CompileJava task (#15178)
This commit adds the --release (JEP 247) option to Gradle's CompileJava task, with the same targetCompatibility major version value.
2023-07-17 14:36:49 +02:00
github-actions[bot]
c2cb579eba
Add initial PQ sizing doc (#15033) (#15171)
Add storage sizing guidance for Persistent Queues.

Co-authored-by: Karen Metts <karen.metts@elastic.co>
Co-authored-by: Joao Duarte <joao@elastic.co>
(cherry picked from commit c2bbed8266)
2023-07-14 15:23:06 -04:00
Rob Bavey
985afee003
Version Bump to 7.17.12 (#15128) 2023-06-29 09:20:58 -04:00
github-actions[bot]
b4f2694554
Release notes for 7.17.11 (#15107)
* Update release notes for 7.17.11


---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2023-06-28 12:50:18 -04:00
github-actions[bot]
9c4c3c10a9
Update patch plugin versions in gemfile lock (#15101)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2023-06-21 09:37:36 -04:00
João Duarte
edade46bcb
bump to 7.17.11 (#15036) 2023-05-02 09:53:39 +01:00
github-actions[bot]
06ae8240b0
Release notes for 7.17.10 (#15026)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-04-27 12:59:55 +01:00
Andrea Selva
ccfbe0f1c7
Updated JDK to 11.0.19 (#15016) 2023-04-20 16:34:09 +01:00
kaisecheng
71d64a96a2
fix missing method worker_threads_draining? in ruby pipeline (#15013)
This commit adds the missing method `worker_threads_draining?` to ruby pipeline which is added in #13934 to java pipeline for log msg improvement

Fixed: #15010
2023-04-20 11:20:00 +01:00
github-actions[bot]
0e5d0a9eb9
Update patch plugin versions in gemfile lock (#15005)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2023-04-18 17:39:07 +01:00
João Duarte
e22404b9f2
pin murmurhash3 to 0.1.6 until 0.1.7-java is out (#15004) 2023-04-18 17:34:50 +01:00
kaisecheng
1a5ef6ad13
pin snakeyaml to 1.33 (#14960)
Co-authored-by: Mashhur Sattorov <mashhur.sattorov@elastic.co>
2023-03-14 13:06:08 +00:00
github-actions[bot]
a8bca85b75
Release notes for 7.17.9 (#14858)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-02-02 09:26:47 -05:00
João Duarte
bbe9f80cde
bump to 7.17.10 (#14866) 2023-02-02 12:07:16 +00:00
Andrea Selva
1f111758bc
Fix version lock for Murmurhash3 to the gem for Java runtime (#14857) 2023-01-24 21:55:22 +00:00
Andrea Selva
d2192f2d01
[Backport 7.17] Pin Murmursh3 to 0.1.6 #14832 (#14856) 2023-01-24 17:39:07 +00:00
Andrea Selva
35e7901bf5
Updates bundled JDK to 11.0.18+10 (#14850) 2023-01-24 17:15:22 +00:00
github-actions[bot]
62f5dbffa1
Update patch plugin versions in gemfile lock for 7.17.9 (#14854)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2023-01-24 17:14:58 +00:00
kaisecheng
cb52164cde
bump core version (#14804) 2022-12-08 14:50:51 +00:00
github-actions[bot]
6180be5a43
Release notes for 7.17.8 (#14798)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-12-07 22:55:11 +00:00
Andrea Selva
12c22f7c2c
Backport PR #14782 to 7.17: Cover all #system invokation with exit code checking, eventually failing the execution of Rake task #14799
Covers all invocations of system Ruby method inside artifcts.rake script to check the exit status and eventually raise an exception.
2022-12-01 15:44:24 +01:00
github-actions[bot]
4366546d28
Update patch plugin versions in gemfile lock (#14796)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2022-11-30 16:04:54 +00:00
github-actions[bot]
fd3ffc1548
Backport PR #14786 to 7.17: Avoid to create and upload AARCH64 Docker images for UBI8 #14790
On ARM architecture UBI8 Docker images aren't created, so avoid to create empty tar.gz files.

(cherry picked from commit 7a39d97055)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-11-29 15:17:45 +01:00
github-actions[bot]
dac65a439e
Backport PR #14780 to 7.17: [DRA] Avoid to loose err code on docker save #14785
* [DRA] Force docker save to save directly on file instead of pipe to another command loosing the execution error code

(cherry picked from commit 2e5e49d10d)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-11-29 13:56:54 +01:00
github-actions[bot]
3822b60890
fix: calculated inflight_count from in-flight batches (#14760) (#14766)
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.

(cherry picked from commit 4941c25f32)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-11-18 06:36:36 -08:00
Rob Bavey
69ce6ebdb8
Backport PR#14605 to 7.17: Fix DLQ fails to start due to read 1 byte file (#14752)
Note this is a manual cherry-pick backport, as it did not backport cleanly. This backport includes some changed/additional code to
the original PR:

* Added additional null check in seekToNextEvent that was previously not present in 7.17, but is required for this PR
* Filter is added, but surrounding code is slightly different, but the intent is the same.

**Backport PR #14605 to 8.5 branch, original message:**

---

<!-- 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
-->

<!-- 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 -->

Fix DLQ fails to start due to read 1 byte file

<!-- 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.
-->

This commit ignores DLQ files that contain only the version number. These files have no content and should be skipped.

Mapping 1 byte DLQ files to buffer causes java.lang.IllegalArgumentException: newPosition < 0: (-1 < 0)
User is unable to start the pipeline using dead_letter_queue input

<!-- 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.
-->

<!-- 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

<!-- Recommended
Add a checklist of things that are required to be reviewed in order to have the PR approved
-->
- [x] manually test the 1 byte file and can start Logstash

<!-- Recommended
Explain here how this PR will be tested by the reviewer: commands, dependencies, steps, etc.
-->

follow the reproducer of #14599

<!-- 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
-->
- Fixed: #14599

<!-- 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/
-->

<!-- 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.
-->

<!-- 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.
-->
2022-11-16 09:21:00 -05:00
github-actions[bot]
a6db1b0db5
Backport PR #14738 to 7.17: [Doc] Document the usage of LS_JAVA_OPTS environment variable #14750
* [Doc] Document the usage of LS_JAVA_OPTS environment variable

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
(cherry picked from commit 9242105c3c)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-11-15 09:45:09 +01:00
github-actions[bot]
810e005aab
Backport PR #14727 to 7.17: Avoid the wrapping of LogstashMessageFactory with log4j's MessageFactory adapter #14742
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.

(cherry picked from commit 05bfaff799)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-11-09 11:47:03 +01:00
Andrea Selva
3a8076b066
Update bundled JDK to 11.0.17+8 (#14729) 2022-11-03 15:11:54 +01:00
github-actions[bot]
4e49539f06
DRA: Build dockerfiles for release (#14730) (#14732)
(cherry picked from commit 1dead06cdd)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-11-03 09:23:47 -04:00
github-actions[bot]
38642484d5
DRA: uploading missing docker-build-context files (#14722) (#14725)
(cherry picked from commit ef6852b687)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-11-02 18:57:50 -04:00
github-actions[bot]
a2d0da3f5a
DRA - Fix docker image build (#14706) (#14707)
Fix the docker image building and upload process:
 * Builds ubi8 on x86_64.
 * Uploads ironbank and ubi8 context files from x86_64 only.

(cherry picked from commit 2e8bd20cf5)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-26 11:23:15 -04:00
github-actions[bot]
2fa7c0d7f7
Backport PR #14703 to 7.17: Adds upload of missed docker docker-build-context.tar.gz artifacts #14704
Updates the dra_docker.sh script to upload also docker-build-context.tar.gz files

(cherry picked from commit 6ad5690a8c)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-26 12:17:24 +02:00
github-actions[bot]
e2735bd29f
DRA - Fix error reporting (#14698) (#14700)
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>
(cherry picked from commit 17d0bb5ffb)
2022-10-25 18:40:01 -04:00
kaisecheng
b884ffbc71
bump core (#14691) 2022-10-25 10:42:15 +01:00
github-actions[bot]
53da859769
DRA - generalize docker image building (#14670) (#14689)
* Generalize docker image building
* Rename and add ability to pass the architecture as a parameter
* Handle ARCH env variable

(cherry picked from commit 6ba5cc112f)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-24 21:23:19 -04:00
github-actions[bot]
6a8b525514
DRA - fix dra_upload syntax, breaking builds (#14685) (#14686)
Fix dra_upload.sh syntax that's breaking the build.

(cherry picked from commit 9584d1332b)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-22 13:04:53 -04:00
github-actions[bot]
50a0500512
Backport PR #14677 to 7.17: [DRA] Don't download Darwin arrch64 for 7.17 #14678
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.

(cherry picked from commit 9c7b7b7454)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-20 17:18:29 +02:00
github-actions[bot]
b7f5962070
Release notes for 7.17.7 (#14623)
Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2022-10-18 10:08:11 -04:00
Andres Rodriguez
5c30a394af
Manually backport #14654, #14657, #14659 (#14665)
* 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.
* 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.
* Fix sourcing on dra_upload (#14659). Fix sourcing on dra_upload.sh
2022-10-17 18:30:18 -04:00
github-actions[bot]
a441638474
DRA: Handle env variables better (#14644) (#14653)
* 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>
(cherry picked from commit db6a7bc619)
2022-10-13 14:04:04 -04:00
github-actions[bot]
2369e16fc1
Backport PR #14645 to 7.17: Avoid to pass SNAPSHOT particle to the version passed to release-manager #14649
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

(cherry picked from commit b8792107ad)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-13 12:54:18 +02:00
github-actions[bot]
3c98813855
Backport PR #14646 to 7.17: Follow up PR of #14645, adds version qualifier to the plain version #14650
(cherry picked from commit cb76c685b7)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-13 12:52:54 +02:00
github-actions[bot]
f3fdcb3d80
dra_upload.sh: Leave artifacts under build/ (#14639) (#14641)
Do not move out artifacts from the build/ former to ensure the upload doesn't fail.

(cherry picked from commit 363adad3b6)

Co-authored-by: Andres Rodriguez <andres.lazo@elastic.co>
2022-10-12 14:41:45 -04:00
github-actions[bot]
3d85ea439d
Backport PR #14636 to 7.17: Fix/dra use another technique to extract branch name #14638
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

(cherry picked from commit 11ecaaea5a)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-12 14:56:24 +02:00
github-actions[bot]
60765f5ad1
Backport PR #14626 to 7.17: Re-added execution rights to dra_upload.sh #14635
Re-apply execution permission to DRA upload script

(cherry picked from commit 63d5658015)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-12 11:27:24 +02:00
github-actions[bot]
b38e374164
api: source pipelines that are fully-loaded (#14595) (#14622)
* 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

(cherry picked from commit de49eba22a)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2022-10-11 20:53:40 -07:00
github-actions[bot]
f6d40866a7
Backport PR #14619 to 7.17: Switch branch slector from major.minor to read the current branch name #14625
Switch branch selector from major.minor to read the current branch name

(cherry picked from commit ff8afb2293)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-11 20:10:03 +02:00
github-actions[bot]
428cd00f9d
Backport PR #14600 to 7.17: Updates DRA scripts to build snapshot artifacts #14621
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>
(cherry picked from commit d8d690079a)
2022-10-11 18:16:36 +02:00
github-actions[bot]
7a516879f8
Update patch plugin versions in gemfile lock (#14618)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2022-10-11 16:20:47 +01:00
github-actions[bot]
eff28defc1
Backport PR #14589 to 7.17: DRA - Update scripts to use the version qualifier in stack_version
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>
(cherry picked from commit 3075029b27)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-11 09:45:38 +02:00
github-actions[bot]
0728acd6ef
Extract the branch name passed to release-manager from version file (#14592) (#14610)
* 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>
(cherry picked from commit d3b92ec20c)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-10-10 14:08:35 +02:00
Andrea Selva
fcebc84826
Avoid to upload not created artifacts for Darwin AARCH64 in 7.17 (#14596) 2022-10-05 13:42:02 +02:00
Andrea Selva
1fdde71842
Some ARM machines doesn't have openjdk11 so resort to the jdk11 alias to be machines portable (#14593) 2022-10-04 16:55:58 +02:00
Andrea Selva
fbf746b8a8
Backport dra 7.17 (#14588)
This is a **not clean backport** of the following PRs to `8.5` branch:

- Introduces a bash script to build all the artifacts and dependencies report. #14522
- Save docker images as tar.gz files move the CSV dependency report in the path that's expected by release-manager #14552 
- Split ci scripts into ARM and x86 ones #14567
- Uses the gsutil tool to upload all the generated artifacts into an intermediate collector bucket. #14568 
- Collect all artifacts created and upload to GCP with release-manager #14584
2022-10-04 09:50:41 +02:00
github-actions[bot]
525fd342f1
Fix debug output for bin/logstash-plugin (#14132) (#14144)
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
(cherry picked from commit 02c2aec710)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-09-26 14:54:06 -04:00
Andrea Selva
015e85169f
Add monitoring.cluster_uuid as Docker env setting(#14425) (#14497)
Fix env2yaml tool to expose monitoring.cluster_uuid as Docker environment variable

Co-authored-by: Boris Djurdjevic <boris@djurdjevic.ch>
2022-09-06 12:17:31 +02:00
github-actions[bot]
fa35bb8f97
fix SettingsImpl to remove hardcoded checkpointRetry (#14487) (#14494)
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
(cherry picked from commit 3a78621109)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-09-05 17:06:40 +01:00
Karen Metts
38574bd6ee
Doc: Update release notes with security notice [7.17] (#14467) 2022-08-24 13:09:27 -04:00
Rob Bavey
82d13eb441
Version bump for 7.17.7 (#14464) 2022-08-24 08:19:17 -04:00
github-actions[bot]
361279da1f
Release notes for 7.17.6 (#14462)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-08-23 21:14:04 -04:00
github-actions[bot]
780cefc825
bump lock file for 7.17 (#14461)
* Update patch plugin versions in gemfile lock
* Add updates to sinatra to lockfile

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-08-22 17:33:59 -04:00
github-actions[bot]
2bf294f292
remove sinatra constraint (#14446) (#14451)
(cherry picked from commit 24c675ccd8)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-08-17 11:19:01 +01:00
github-actions[bot]
ee24f3ce38
update flores dependency to at least 0.0.8 (#14437) (#14449)
(cherry picked from commit 4cb900ce7e)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-08-17 09:58:15 +01:00
João Duarte
b7344f43ec
bump jdk to 11.0.16+8 (#14430) 2022-08-12 06:47:33 +01:00
github-actions[bot]
44b1913a15
pin bundler 2.3.18 to avoid bug in .19 (#14394) (#14404)
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

(cherry picked from commit 8aa62dc441)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-08-02 16:54:41 +02:00
github-actions[bot]
c8419c2097
Fix broken link to image (#14343) (#14344)
(cherry picked from commit 1ddd4ccd83)

Co-authored-by: Cleydyr Bezerra de Albuquerque <cleydyr.bezerradealbuquerque@elastic.co>
2022-07-12 16:47:28 +01:00
github-actions[bot]
a7ad660155
Fix artifact path for integration with ubireleaser (#14319) (#14320)
<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/

(cherry picked from commit 79c36c5ac2)

Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
2022-06-30 16:24:29 +01:00
github-actions[bot]
7f9b477bad
Support ironbank docker build (#14298) (#14306)
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>
(cherry picked from commit dfb109843d)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-06-28 19:14:05 +01:00
Ry Biesemeyer
6f0bcb45dc
Bump for 7.17.6 (#14309)
* bump to 7.17.6

* bump version of logstash itself in gemfile.lock.release

* Update docs/static/releasenotes.asciidoc

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

* Update docs/static/releasenotes.asciidoc

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

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-06-28 08:11:05 -07:00
Logstash Machine
8fe63b3884
Release notes for 7.17.5 (#14303)
* Update release notes for 7.17.5

* humanize the 7.17.5 release notes

* Apply suggestions from code review

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-06-27 12:20:50 -07:00
github-actions[bot]
c9b3046f3c
make retries in pip and go get extra shell compatible (#14282) (#14294)
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.

(cherry picked from commit ce27e08eac)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-06-24 12:31:23 +01:00
github-actions[bot]
054f53edd3
improve resiliency of make venv and golang Dockerfile with retries (#14239) (#14277)
This helps with transient network problems by not failing at the first try.

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

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-06-24 12:29:54 +01:00
github-actions[bot]
81f5b1f842
Backport PR #14283 to 7.17: Increase Gradle network timeouts to increment resiliency on network issues #14287
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.

(cherry picked from commit 080c2f6253)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-06-21 15:51:11 +02:00
github-actions[bot]
30f020f5f6
Fix pq size checking to not stop the pipeline (#14258) (#14267)
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>
(cherry picked from commit c725aabb49)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-06-16 13:32:10 +01:00
github-actions[bot]
6b2b4460a0
Fix exception of i18n in logstash-keystore (#14246) (#14249)
This PR adds the load of i18n to LogStash::Settings to fix uninitialized constant I18n exception when using `logstash-keystore`

(cherry picked from commit d63b6ae564)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-06-13 12:59:40 -07:00
github-actions[bot]
cd9fb4c39e
update jdk to 11.0.15+10 (#14152) (#14226)
This commit re-adds the update to jdk 11.0.15+10 originally made in #14031

(cherry picked from commit ea1690d5ba)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-06-07 12:21:03 -04:00
github-actions[bot]
b5e72822ef
Switch adoptopenjdk url to adoptium (#14098) (#14222)
* 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
(cherry picked from commit 9e2c87a1ab)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-06-07 11:10:35 -04:00
github-actions[bot]
6db9b083ac
Handle out-of-date firstUnackedPageNum in head checkpoint (#14147) (#14174)
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>
(cherry picked from commit 7f36665c09)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-05-30 20:39:33 +01:00
github-actions[bot]
27c512fb17
This commit avoids unnecessary thread sync of PQ notFull state. (#14129) (#14142)
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

(cherry picked from commit da68ff3803)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-05-25 14:45:26 +01:00
kaisecheng
a6cd4bf949
bump core version (#14063) 2022-05-24 13:57:07 +01:00
Logstash Machine
24bef99622
Release notes draft for 7.17.4 (#14124)
* Update release notes for 7.17.4

* update release note

Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-ubuntu-1604-lts-1652877190169841117.c.elastic-ci-prod.internal>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2022-05-23 11:02:25 +01:00
github-actions[bot]
94b5f982c8
[Doc] queue.max_bytes for all queues (#14128) (#14140)
* bring back the details of PQ size checking

(cherry picked from commit 205cf43213)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-05-20 10:38:12 +01:00
github-actions[bot]
d2240e072c
Doc: Update settings file doc to call out queue type (#14127) (#14135)
* [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.
(cherry picked from commit a6e418adf7)

Co-authored-by: Nicole Albee <2642763+a03nikki@users.noreply.github.com>
2022-05-19 21:13:08 -04:00
github-actions[bot]
3332e28d16
bump lock file for 7.17 (#14122)
* Update patch plugin versions in gemfile lock

* revert logstashmachine license change

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2022-05-18 13:29:30 +01:00
github-actions[bot]
6ca4697dc8
Backport PR #14113 to 7.17: deps: pin concurrent-ruby pending removal of TimerTask (#14119)
* deps: pin concurrent-ruby pending removal of TimerTask (#14113)

(cherry picked from commit 06bca0150f)

* pin concurrent-ruby to 1.1.9

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2022-05-18 11:38:48 +01:00
Andrea Selva
7de598490d
Backport PR #14093 to 7.17:Fix of DLQ stream position retrieval
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-17 15:36:26 +02:00
kaisecheng
bd39da7b2c
[7.17] Allow metrics update when PQ draining (#13935) | fix monitoring api integration test with draining queue (#14106) (#14108)
* 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

(cherry picked from commit 0af9fb0d5f)

* 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

(cherry picked from commit 7641b076f4)
2022-05-17 10:40:42 +01:00
github-actions[bot]
1cd6341188
Ensure pipelines.yaml is loaded safely (#13883) (#14091)
(cherry picked from commit 1f93672b73)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-05-16 22:04:43 +01:00
github-actions[bot]
2c1771f89f
[Doc] PQ and DLQ do not support NFS (#14095) (#14100)
* [Doc] PQ and DLQ do not support NFS
Fixed: #12097

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 90e7c8864e)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-05-16 16:17:46 +01:00
github-actions[bot]
81a3489843
Refactor: more logging of PQ behavior (#14065) (#14077)
(cherry picked from commit 45b7da638f)
2022-05-11 12:58:06 +02:00
Rob Bavey
8b2f41fc83
Add jdk.io.File.enableADS=true to JVM options (#14086)
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: #14066
2022-05-10 12:38:15 -04:00
kaisecheng
64a7a71094
Hide Shutdown Watcher stall message when PQ draining (#13934) (#14084)
Hide shutdown stall message when queue is draining
Fixed: #9544

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
(cherry picked from commit 41cb3d3680)
2022-05-10 15:29:40 +01:00
Logstash Machine
56d0bc72bd
Release notes for 7.17.4 (#14035)
* Update release notes for 7.17.4

Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-debian-9-1651052841408258358.c.elastic-ci-prod.internal>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-05-02 14:56:02 +01:00
github-actions[bot]
c814c8fdd0
Fix geoip database download does not respect http_proxy setting (#14048) (#14053)
This commit adds `http_proxy` to geoip database download option to respect proxy setting

Fixed: #14047
(cherry picked from commit 1c851bb15c)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-04-29 17:00:27 +01:00
github-actions[bot]
fe5172bf20
Fix stopped pipeline unable to be deleted in registry (#14018) (#14033)
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
(cherry picked from commit e8cd0d3039)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-04-27 16:30:35 +01:00
github-actions[bot]
788c72b67e
Further improve check on "running pipelines" after SIGHUP (#13995) (#14040)
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>
(cherry picked from commit 1291b5edcc)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-04-27 15:44:08 +01:00
github-actions[bot]
8079f0a434
Fix reload of pipelines via SIGHUP (#13994) (#14038)
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

(cherry picked from commit 7b2bec2e7a)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-04-27 14:54:42 +01:00
github-actions[bot]
2b0193c5a3
Update patch plugin versions in gemfile lock (#14029)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2022-04-26 12:11:33 +01:00
github-actions[bot]
f4a928e0fc
ensure puma is at least 5.6.2 (#13944) (#14025)
(cherry picked from commit 96f7e2949d)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-04-26 10:40:14 +01:00
kaisecheng
08d51f40ac
[7.17] PQ size check for multiple pipelines (#13877) | Fix window CI for PQ size checking (#13981) (#13989)
* 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
# Conflicts:
#	logstash-core/lib/logstash/runner.rb

* 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-21 10:18:55 +01:00
github-actions[bot]
07f4292275
Updates the LogstashService launcher to use the JDK specified (#13946) (#13947)
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.

(cherry picked from commit d2739a875c)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-04-20 13:31:42 +01:00
João Duarte
5cf174cd0d
Bump version to 7.17.4 (#14004) 2022-04-20 13:00:07 +01:00
Logstash Machine
6bb0758909
Release notes for 7.17.3 (#13985)
* Update release notes for 7.17.3

* Update releasenotes.asciidoc

* Update docs/static/releasenotes.asciidoc

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

Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-ubuntu-1804-lts-1649756278313218066.c.elastic-ci-prod.internal>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-04-19 09:20:23 -05:00
Karol Bucek
0e0723a230
Deps: unpin jruby-openssl in logstash-core (#13958) 2022-04-12 11:20:31 +01:00
github-actions[bot]
2c253c563e
Backport PR #13689 to 7.17: Update failing policy in Central Management fetcher and license checker if hit ES down node (#13925)
* 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>
(cherry picked from commit c544ecb380)

* Covered all calls to ES with retryable

* Mocked logger interaction in test after wrapping the client calls with retryable

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-04-12 11:19:51 +01:00
João Duarte
475c7c8940
Bump Logstash version to 7.17.3 (#13965) 2022-03-31 18:11:55 +01:00
Logstash Machine
43b1261cf0
Release notes for 7.17.2 (#13932)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-opensuse-15-1-1648138023535464121.c.elastic-ci-prod.internal>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-03-30 20:57:29 +01:00
github-actions[bot]
7474ce9275
[DOC] precedence between environment variables and yml in docker (#12198) (#13949)
Backport PR #12198 to 7.17 branch

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

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-03-29 17:38:06 +01:00
github-actions[bot]
8c8eac0e45
bump lock file for 7.17 (#13927)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-03-24 16:06:14 +00:00
github-actions[bot]
86ed160086
add backoff to checkpoint write (#13902) (#13931)
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

(cherry picked from commit 1a5030bd63)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-03-24 15:39:22 +00:00
github-actions[bot]
7df02cc828
Update Jackson databind in ingest-converter tool (#13900) (#13917)
Backport PR #13900 to 7.17 branch

(cherry picked from commit 32675c1a88)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-03-18 13:10:05 +00:00
João Duarte
898da5f41b 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 11:47:33 +00:00
github-actions[bot]
59a30d8b39
[Doc] update queue.max_bytes and queue.page_capacity (#13833) (#13910)
Fixed: #8650, #10718

Backport PR #13833 to 7.17 branch

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit d71553e5d7)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-03-18 11:05:27 +00:00
Karol Bucek
3300df77b0
Deps: unpin jruby-openssl in logstash-core (#13903) 2022-03-17 18:00:14 +01:00
Andrea Selva
67dea141ca
Quotes java executable path in case it contains spaces (#13881) (#13893)
Updates all Windows batch scripts used as CLI tools to quotes the %JAVACMD% to avoid path problems when the path contains spaces.

(cherry picked from commit a8bd90c22d)
2022-03-14 19:04:53 +01:00
João Duarte
e06efed623
bump jdk to 11.0.14.1+1 (#13687) (#13870)
(cherry picked from commit eec3f22bb2)
2022-03-08 14:52:09 +00:00
Ry Biesemeyer
011cc5ba7a
i18n: alias logstash.runner.configuration.* under logstash.agent.configuration (#13244) (#13843)
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>
(cherry picked from commit 8bec0e658a)
2022-03-07 11:05:20 -08:00
Ry Biesemeyer
a491462e69
api: avoid 5xx when stats/events not yet populated (#13424) (#13845)
* 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>
(cherry picked from commit a6c0e75b53)
2022-03-07 11:04:18 -08:00
Ry Biesemeyer
5d0ad6ea38
pipeline-info: increase safety of transforming stats (#13345) (#13850)
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.

(cherry picked from commit e9455ca81e)
2022-03-07 11:02:18 -08:00
João Duarte
f0fa13d188
speed up artifact file listing (#13862) (#13865)
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.

(cherry picked from commit edfbabf2fc)
2022-03-07 18:58:40 +00:00
Andrea Selva
a7893d8bb6
[Backport 7.17]Fix Logstash cli tools to use the selected JDK under Windows (#13839) (#13863)
* 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.

(cherry picked from commit 0084492494)

* Fixed the case for JAVA_HOME selection path
2022-03-07 17:22:10 +01:00
Ry Biesemeyer
6fe6bc1054
Backport PR #13715 to 7.17: artifacts: omit openssl_pkcs8_pure specs from built artifacts (#13852)
* 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>
(cherry picked from commit 0369ba208d)

* Update releasenotes.asciidoc (#13701)

Fixed OS name. Ubuntu instead of Ununtu.

Co-authored-by: Cris da Rocha <cdarocha.astro@gmail.com>
2022-03-04 17:33:49 -08:00
Ry Biesemeyer
fb68365e45
geoip-db: support http_proxy environment variable (#13410) (#13841)
(cherry picked from commit 022072c437)
2022-03-04 11:00:36 -08:00
Karol Bucek
4f6419fd1c
Build: avoid doing a redundant bundle install (#13820) (#13824)
(cherry picked from commit c3d2f5750f)
2022-03-01 17:41:20 +01:00
Karol Bucek
6f447440fe
Feat: conservative plugin (dependency) updates by default (#13794) (#13804)
(cherry picked from commit 67fd99b5b6)
2022-02-28 22:34:02 +00:00
kaisecheng
f46c9faa21
bump core version to 7.17.2 (#13817) 2022-02-28 14:15:36 +00:00
Logstash Machine
60688f2377
Release notes draft for 7.17.1 (#13813)
* Update release notes for 7.17.1

* copy from 8.0.1 release note

Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-ubuntu-1804-lts-1645618372441025592.c.elastic-ci-prod.internal>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2022-02-24 10:21:39 +00:00
kaisecheng
c5dcd54426
Bump Gemfile lock for 7.17.1 (#13805) 2022-02-22 09:52:20 +00:00
kaisecheng
f47db585ec
pin jruby-openssl in logstash 7.17.1 as a recent update causes a gem load error #13785 (#13806) 2022-02-21 15:44:47 +00:00
Karol Bucek
f80999c6b2
Deps: pin sinatra due (2.2.0) incompatibilities (#13784) (#13788)
Backport PR #13784 to 7.17
2022-02-16 16:37:38 +01:00
Karen Metts
45c8442f59
Doc:Update qa readme with BUILD_JAVA_HOME setting info [7.17] (#13780)
Backports #11985 to 7.17
Co-authored-by: Rob Bavey rob.bavey@elastic.co
2022-02-15 20:25:42 -05:00
kaisecheng
cddcf18ca3
fix pqrepair log4j setting (#13726) (#13768)
added logger for pqrepair to print log in console
Fixed: #13725
2022-02-15 16:03:16 +00:00
kaisecheng
5197b340aa
Unpin bundler, fix gem installer tests (#13762) (#13776)
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
# Conflicts:
#	build.gradle

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-02-15 15:52:09 +00:00
kaisecheng
205faa6b64
[7.17] handle fully acked 0 byte PQ pages (#13692) (#13761)
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-15 14:38:45 +00:00
Andrea Selva
0db25a80b5
[backport 7.17]Publish CPU percentage also non Unix systems (#13727) (#13732)
Clean backport of #13727 to branch `7.17.`

----
Original comment:

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

(cherry picked from commit d8f4784d69)
2022-02-08 18:14:22 +01:00
kaisecheng
5fca46e638
pqcheck pqrepair handle .tmp checkpoint (#13721) (#13731)
* pqcheck skip checking checkpoint.*.tmp
* pqrepair delete checkpoint.*.tmp

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-02-08 12:24:24 +00:00
Cris da Rocha
2c515750fd
Update releasenotes.asciidoc (#13701)
Fixed OS name. Ubuntu instead of Ununtu.
2022-02-02 10:28:50 -05:00
Andrea Selva
380089cdec
Bump for next 7.17.1 (#13695) 2022-02-01 16:17:49 +01:00
Logstash Machine
4113c6b424
Release notes draft for 7.17.0 (#13690)
* Update release notes for 7.17.0

* humanize the generated release notes for 7.17.0

* release-notes: improve tense continuity and wording

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

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-01-31 10:46:57 -08:00
Karen Metts
455995c32a
Doc: Add placeholder for 7.17.0 release notes (#13688) 2022-01-27 13:16:35 -05:00
kaisecheng
4cfe698391
Revert "[DOC] Clarify the scope of environment variable expansion (#13299)" (#13679) (#13683)
This reverts commit 096eb7ac48.
2022-01-27 10:24:32 +00:00
Ry Biesemeyer
e971d17ddb
Update patch plugin versions in gemfile lock (#13680) 2022-01-26 09:14:30 +01:00
kaisecheng
d2a98a0b77
Support env variable in condition (#13608) (#13678)
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 16:22:37 -08:00
Ry Biesemeyer
bdf2748e16
bump dependency patches again for in-flight 7.17.0 (#13676) 2022-01-25 12:20:02 -08:00
Andrea Selva
289ea89b2d
[Backport 7.17] Test fix, switch to plugin with less dependencies (#13672) (#13674)
Clean backport of #13672 to 7.17 branch

----

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.

(cherry picked from commit 7bb56e46dd)
2022-01-25 16:33:31 +01:00
Ry Biesemeyer
319e67dceb
logging: move init into environment's settings post-processor (#13221) (#13663)
* 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

(cherry picked from commit 2a5e54cd21)
2022-01-24 08:53:09 -08:00
Ry Biesemeyer
8d057881ae
stats api: startup resilience when stats are partially formed (#13645) (#13660)
(cherry picked from commit 4b430a5f69)
2022-01-24 07:39:31 -08:00
Ry Biesemeyer
fe4827132b
[Backport 7.17] Fix unit test under Windows (#13656) (#13665)
Backport #13656 to branch 7.17

----

Use the System.lineSeparator instead of "\n" to make the test portable across platforms

(cherry picked from commit 3fdc4c3aa7)

Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
2022-01-24 10:05:55 +01:00
Ry Biesemeyer
22e2e52d9c
Backport PR #13612 to 7.17: [Docs] Add pipeline.ecs_compatibility to the list (#13638)
* [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>
(cherry picked from commit e11d0364d4)

* Rephrase docs for --pipeline.ecs_compatibility flag for 7.x perspective

Co-authored-by: Toby Sutor <55087308+toby-sutor@users.noreply.github.com>
2022-01-20 10:52:26 -08:00
Ry Biesemeyer
c8e2bef09b
field-reference: cap RUBY_CACHE to 10k entries (#13642) (#13655)
* 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

(cherry picked from commit ca501acdcf)
2022-01-20 09:18:43 -08:00
Karen Metts
3c0b948a85
[DOC] Clarify scope of queue settings 7.17 (#13651)
Backports #12955 to 8.0

Author: Luca Belluccini <luca.belluccini@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
2022-01-20 11:42:13 -05:00
Andrea Selva
779a4d5f13
[Backport 7.17] Fix Ruby port check execution in kafka_setup.sh (#13631) (#13640)
Clean backport of #13631 to 7.17

Original message:

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)

(cherry picked from commit 93f37b9609)
2022-01-20 08:58:19 +01:00
Andrea Selva
9c4fdf8892
[Backport 7.17] Fix/gems not found in integration test after plugin install (#13641) (#13643)
Clean backport of #13641 to 7.17

Original message:

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`).

(cherry picked from commit 640ba8489f)
2022-01-20 08:56:52 +01:00
Ry Biesemeyer
89b3b54a85
bump dependencies for 7.17.0 (#13647) 2022-01-20 08:14:13 +01:00
Ry Biesemeyer
abadc329e1
ecs: docs and comments syncing for 7.last (#13626) 2022-01-18 16:35:07 -08:00
Ry Biesemeyer
36c5e2a097
Backport PR #13525 to 7.17: fix: respect LS_JAVA_OPTS environment even when optionsfile missing (#13635)
* 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>
(cherry picked from commit 2a248b2ea0)

* backport: spec silencing noise
2022-01-18 10:10:39 -08:00
Rob Bavey
779e081c94
[Backport PR#13604 to 7.17] Fix 2 failing tests on Windows (#13629)
Backport PR#13604 to 7.17 branch. Original message:

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-18 09:52:51 -05:00
Andrea Selva
920e821932
[Backport 7.17]Add info log of JVM flags used to configure Logstash (#13531) (#13632)
Logs the JVM flags and options used to launch Logstash.

(cherry picked from commit d4bdcc936d)
----
Original message:

 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:55:36 +01:00
Andrea Selva
dc4368e0c6
[backport 7.17]Avoid to increment event.out conter for dropped events (#13593) (#13624)
Clean backport of #13593 to 7.17 branch

----

Original message:

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.

(cherry picked from commit b6da829f4f)
2022-01-17 09:38:12 +01:00
Ry Biesemeyer
ddb1ed17c2
Product origin headers to Logstash-controlled Elasticsearch clients (#13563) (#13623)
* add product origin header to license checks

* add origin header to Central Management config fetcher

* add origin header to ES output for Monitoring pipeline

(cherry picked from commit 2892964ba1)
2022-01-14 08:10:28 -08:00
Karen Metts
5b8e61595b
Doc: Forward 7.16.2 and 7.16.2 release notes to 7.17 (#13611) 2022-01-13 14:02:39 -05:00
Andrea Selva
236cbcaade
[backport 7.17] Avoid to itereate with each_index (#13603) (#13609)
Clean backport of #13603 to branch 7.17
(cherry picked from commit e27fdeb252)

----
Original commit message:

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:59:33 +01:00
kaisecheng
d1e2816c47
Fix unknown type warning of geoip metrics (#13382) (#13602)
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 13:44:47 +00:00
Andrea Selva
0407e9383b
Adds license definitions for faraday-multipart and faraday-retry (#13592) (#13594)
Clean backport of #13592 to 7.17
(cherry picked from commit bc760c5c07)
2022-01-10 15:19:47 +01:00
Ry Biesemeyer
e48a0810e6
docs: sprintf vs UTC nature of @timestamp field (#13576) (#13590)
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
(cherry picked from commit ef40bb0643)
2022-01-06 15:52:07 -08:00
Rob Bavey
958d968e7a
Update lockfile for 7.17.0 (#13582) 2022-01-06 10:17:15 -05:00
kaisecheng
c77994f438
Fix logstash-plugin install command to install non default plugin (#13405) (#13587)
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 14:52:25 +00:00
Andrea Selva
18a5865063
Removed unused CI files (#13575)
This is a backport of #12538 to 7.17

This is not clean backport because #12538 results in empty commit due to the changes already committed into main with PR #13344, which is not backported because it removes the Java 8 testing.
2022-01-04 15:08:23 +01:00
kaisecheng
267545d993
Bump log4j dependency to 2.17.1 (#13564) (#13566)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-12-29 15:03:39 +00:00
kaisecheng
2bc03c8c0a
update lock file for 7.17.0 (#13550) 2021-12-18 19:10:25 +00:00
Andres Rodriguez
c9940c78e7
Bump log4j dependency to 2.17.0 (#13547)
(cherry picked from commit 2cf6675f53)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-12-18 13:16:12 -05:00
Karen Metts
18c30527c4
Doc: Add anchor to bundled jdk info 7.17 (#13542)
Backports #13535 to 7.17
2021-12-17 19:18:12 -05:00
Karen Metts
5fad50496b
Doc: remove PQ on input for Output Isolator 7.17 (#13539)
Backports #13537 to 7.17

The Output Isolator Pattern doesn't need a persisted queue on the input
pipeline to work. It just needs one on every output pipeline.

Authored-by: Toby McLaughlin <toby@jarpy.net>
2021-12-17 18:28:57 -05:00
Rob Bavey
2d831b85bd
Backport #13442 to 7.17. Update logstash docker to use ubuntu 20.04 base image (#13529)
Backport #13442 to 7.17 branch. Original message:

* 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>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-12-16 10:35:51 -05:00
Karol Bucek
47038d7ec9
Chore: bump version to 7.17.0 (snapshot) (#13527) 2021-12-16 12:18:45 +01:00
Ry Biesemeyer
06361b5161
Bump log4j version to 2.16.0 per CVE-2021-45046 (#13518) (#13521)
To err on the side of caution it'd be preferable to use log4j 2.16.0 due to CVE-2021-45046

(cherry picked from commit bf0b122b37)

Co-authored-by: thex12 <thex12@users.noreply.github.com>
2021-12-15 21:42:16 -08:00
Karen Metts
c3b0bb4224
Doc: Add dependency fix to 7.16.1 release notes (#13516) 2021-12-14 15:50:13 -05:00
Karen Metts
7875e243f7
Doc: Add filter known issue to 7.16.1 release notes (#13513) 2021-12-14 13:15:49 -05:00
João Duarte
beaf49a54e
bump to version 7.16.2 (#13508) 2021-12-13 18:13:47 +00:00
Logstash Machine
59c275474e
Release notes for 7.16.1 (#13503)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-12-13 15:58:56 +00:00
Rob Bavey
b2d1d11381
Updated lockfile for 7.16.1 (#13499)
* Updated lockfile for 7.16.1

* Keep elasticsearch client as per 7.16.0

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

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-12-10 18:08:00 -05:00
Rob Bavey
0da0f8e124
Backport #13494 to 7.16. bump log4j version to 2.15.0 (#13496)
Backport #13494 to 7.16 branch

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-12-10 15:37:02 -05:00
Karol Bucek
5e3c2ac745
Deps: bump lock file for 7.16.1 (#13483) 2021-12-08 18:35:10 +01:00
Karol Bucek
d737554758
Backport PR #13481 to 7.16: Fix: delegating from deprecated setting (#13484) 2021-12-08 14:34:02 +01:00
Karol Bucek
d492c4ed32
Release: bump version to 7.16.1 (#13476) 2021-12-07 16:21:31 +01:00
Logstash Machine
c228710041
Release notes for 7.16.0 (#13436)
Co-authored-by: Karol Bucek <kares@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>
2021-12-07 11:41:48 +01:00
João Duarte
022e8ff5e0
bump jruby to 9.2.20.1 (#13468) (#13469) 2021-12-02 12:45:30 +00:00
Karol Bucek
90b32f17c7
Backport PR #13447 to 7.16: Fix: patch Puma around a JRuby ARM64 bug (#13454)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 32690cb96f)
2021-12-01 07:05:44 +01:00
Rob Bavey
3b3f116e76
Backport PR#13014 to 7.16: Docker integration tests stability improvements (#13446)
Backport PR#13014 to 7.16 branch. Original message:

* 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>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-11-24 09:53:26 +00:00
João Duarte
ffd5d02604
Update bundled JDK to 11.0.13+8 (#13437) (#13440)
(cherry picked from commit a921f96be4)
2021-11-23 16:20:46 +00:00
Karol Bucek
fcf7fa87ba
Forward Port: Release notes for 7.15.2 (#13435)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-11-23 10:45:20 +01:00
Karol Bucek
2c965533bc
Forward Port: Release notes for 7.15.1 (#13434)
Co-authored-by: Karen Metts <karen.metts@elastic.co>
2021-11-23 10:22:15 +01:00
Karen Metts
1f9f78274b
Doc: Expand PQ content for pipeline-pipeline (#13422)
Backports #13319 to 7.16
2021-11-18 20:57:42 -05:00
Ry Biesemeyer
003dbb0c8b
propagate master/main branch rename for geoip filter (7.16) (#13413) 2021-11-17 06:57:53 -08:00
Andrea Selva
f6c379e2df
[Backport 7.16] Fixes a usage of deprecated 'http.enabled' to the new 'api.enabled' (#13380) (#13408)
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>
(cherry picked from commit 88c80ebb19)
2021-11-16 18:18:58 +01:00
Rob Bavey
ff99fbe8f1
Backport PR #13369 to 7.16: Add java version parameterization to Logstash builds (#13386)
Backport PR #13369 to 7.16 branch. Original message:

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-04 09:57:02 -04:00
Karen Metts
354210663d
Doc: Update central management license info (#13374)
Backports #13368 to 7.16
2021-11-02 16:37:03 -04:00
Rob Bavey
292b2ebb57
Backport PR #13351 to 7.16: Fix bundler handling of 'without' (#13362)
Backport PR #13351 to 7.16 branch. Original message:

* 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 18:36:14 -04:00
Rob Bavey
c612afa5ef
Add deprecation warnings for JAVA_HOME/older versions of Java (#13358)
* 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.
2021-10-26 18:35:17 -04:00
Rob Bavey
7952046eb8
Soften deprecation language and point module deprecations to agent in… (#13338)
* Soften deprecation language and point module deprecations to agent integrations

* Remove extra `and`

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

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-10-26 09:39:42 -04:00
Karol Bucek
1ee7a17015
Deps: upgrade jruby-openssl to 0.11.0 (#13359)
to properly support alt-chain certificate verification in plugins (S3, RSS)
2021-10-26 14:43:02 +02:00
Karol Bucek
ad4277b9d5
Deps: fix broken gem lock due puma requirement (#13348) 2021-10-20 15:48:06 +02:00
Karol Bucek
328e772e92
Deps: bump update gems for 7.16.0 (#13337) 2021-10-20 14:24:29 +02:00
Ry Biesemeyer
b9fb174aaa
Pre-freeze Deprecations/Alignment (#13346)
* ecs: remove warning when opting-in per-pipeline or globally

* ecs: align with v8 for version after v1

* add deprecation warning for Ruby Execution, removed in #12517
2021-10-19 16:48:49 -07:00
Ry Biesemeyer
0603651ba7
Secure API (Backport to 7.x) (#13342)
* 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:37 -07:00
Rob Bavey
0f8296870b
Backport PR #13339 to 7.x: Temporarily pin racc to 1.5.2 to fix build (#13340)
Backport PR #13339 to 7.x branch. Original message:

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 12:15:09 -04:00
Andrea Selva
7202c5860e
Updates the clauses used to filter out from stderr captured messages (#13336)
Fixes an integration test that expects some output on the stderr.
With PR #13207 was added a deprecation notice to inform the user about the removal of support for JAVA_HOME. This notice is present only on 7.x and that console output needs to be removed in a test that verify installation of plugins.
2021-10-19 10:41:12 +02:00
Andrea Selva
2e6ed1d7e4
Fixes to build and run Logstah on JDK 17 (#13306) (#13331)
Backport #13306 to branch 7.x

(cherry picked from commit 7395641a43)

----

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 16:38:38 +02:00
Andrea Selva
1c80c86cdd
Update JDK matrix to include JDK17: OpenJDK, AdoptiumJDK and Zulu (#13307) (#13330)
Clean backport of #13307 to branch 7.x
(cherry picked from commit 949b4a0cef)
2021-10-18 16:37:46 +02:00
Rob Bavey
a2d45ccee6
Backport PR #13316 to 7.x: Fix Elasticsearch integration test to use specified JDK (#13323)
Backport PR #13316 to 7.x branch. Original message:

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 15:22:50 -04:00
Karen Metts
e1b3445ad1
Doc: Add link to pq info from troubleshooting topic (#13327)
Backports #13320 to 7.x
Fixes: #13158
Related: #13173
2021-10-15 15:13:40 -04:00
Karen Metts
26e01b8b50
Doc: Fix templating error in integration plugin header (#13325)
Backports #13324 to 7.x
2021-10-15 14:05:39 -04:00
Karen Metts
6f781e6ab4
Doc: Expand content for memqueue (#13317) (#13321)
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2021-10-14 20:03:49 -04:00
João Duarte
a46efe4df8
[DOC] Clarify the scope of environment variable expansion (#13299) (#13311)
Environment variable expansion only works in plugin parameters, not in conditionals.
For more on this limitation see https://github.com/elastic/logstash/issues/5115

(cherry picked from commit 096eb7ac48)
2021-10-13 14:23:27 +01:00
João Duarte
6983129f47
don't require mutate filter on remove_spec (#13292) (#13309)
(cherry picked from commit f70350ba12)
2021-10-13 14:22:49 +01:00
Andres Rodriguez
fcbfdc87eb
Add pipeline.ordered setting for docker image (#13304)
Adds the pipeline.ordered setting to env2yml.go for the docker image.

Closes: #13293
(cherry picked from commit 9f45087d80)
2021-10-07 16:54:55 -04:00
kaisecheng
f59bd179dc
fix plugin installation script (#13289) (#13290)
This commit requires `set`, as bundler #expand_logstash_mixin_dependencies call `to_set`
Fixed: #13281
2021-10-07 17:13:29 +02:00
Karen Metts
d7b5e17841
Doc: Fix list formatting (#13296)
Backports #13294 to 7.x
2021-10-07 10:15:55 -04:00
Karen Metts
360e8fca12
Doc: Rework PQ content (#13284)
Backports #13173 to 7.x

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-10-06 19:59:45 -04:00
Karen Metts
7495df6ae8
Doc: Remove outdated info and folder (#13282)
Backports #13259 to 7.x
2021-10-06 12:37:45 -04:00
kaisecheng
6af35b5b9c
Replace Faraday to Manticore to get rid of jruby-openssl verification error of Let's Encrypt cross-signed DST Root CA X3 (#13273) (#13279)
Fixed: #13278
2021-10-06 12:16:41 +02:00
Karen Metts
c3fcf2d5f6
Doc: Add topic and expand info for in-memory queue (#13276)
Backports #13246 to 7.x

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-10-05 18:41:31 -04:00
kaisecheng
e3eede52e1
Fix plugin manager test that fail to fetch dependency (#13270) (#13271)
remove broken endpoint
Fixed: #13218
2021-10-05 14:09:58 +02:00
kaisecheng
f675a39841
unlock ecs_compatibility_support version in plugin update (#13218) (#13268)
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 15:33:56 +02:00
Karen Metts
7481112610
Doc: Add shared attribute for messaging ecs default info (#13265)
Backports #13083 to 7.x
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-10-01 16:30:01 -04:00
kaisecheng
1f61038456
update golang image to 1.17.1(#13260) (#13262)
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 19:29:33 +02:00
kaisecheng
2be6cb326b
avoid duplication of heading and index entry in release notes (#13192) (#13254)
Fixed: #13192
2021-09-29 14:37:46 +02:00
kaisecheng
77a6af1ba1
geoip integrate air-gapped bootstrap script (#13104) (#13251)
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-28 16:23:51 +02:00
Rob Bavey
aeb3dc2cf3
Backport PR#13248 to 7.x: Fix kafka download link for integration tests (#13250)
Backport PR #13248 to 7.x branch. Original Message:

Fix kafka download link for integration tests

(cherry picked from commit aa1aa8e)
2021-09-27 12:17:11 -04:00
kaisecheng
ae80fd27a3
Forward port of 7.15.0 release notes to 7.x (#13239)
Co-authored-by: Logstash Machine <43502315+logstashmachine@users.noreply.github.com>
2021-09-22 15:37:09 +01:00
Karen Metts
d3b92d58cd
Doc: Add note and example for date math in conditionals (#13242)
Backports #13199 to 7.x
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-09-21 15:40:39 -04:00
Andrea Selva
eb776ca411
Forward port of 7.14.2 release notes to 7.x (#13235) 2021-09-21 10:33:45 +02:00
kaisecheng
050eb98f0b
fix geoip external DB shutdown nil exception (#13224) (#13225)
Fixed: #13208
2021-09-15 15:30:52 +01:00
Andrea Selva
82993fa6f1
[backport 7.x] Use LS_JAVA_HOME in favor of JAVA_HOME #12725 (#13213)
Backport of #13204 #13207 to 7.x branch, introduces the LS_JAVA_HOME as preferred environment variable over JAVA_HOME which is deprecated.
2021-09-08 15:20:34 +02:00
Andrea Selva
959248ac4d
[backport 7.x] Gradle 7 updates, issue #13177 (#13212)
This commit is a backport of three PRs #13182 #13183 #13184
Mainly it switched the Gradle to version 7 and applies fixes to make it run.
2021-09-08 15:16:52 +02:00
Andrea Selva
a27e109bd4
[backport 7.x] Added rexml notice to license list (#13209) (#13210)
(cherry picked from commit 6ed2eea890)
2021-09-07 17:30:21 +02:00
Andrea Selva
6b6b3f37b0
Forward port of 7.14.1 release notes, from PR #13174 (#13189) 2021-09-01 12:46:34 +02:00
Andrea Selva
c49d5f0152
[backport 7.x] Update bundled JDK to 11.0.12+7 (#13185) (#13186)
Clean backport of #13185 to branch 7.x
(cherry picked from commit ebb9e04d14)
2021-08-31 17:39:19 +02:00
kaisecheng
3e9cc40142
add the missing logstash config supported by env2yaml for docker (#13178) (#13180)
Fixed: #13138
2021-08-30 18:09:03 +01:00
Karol Bucek
6a56b96f9b
Backport #13164: Test: improve monitoring api logging asserts (#13169) 2021-08-25 18:51:00 +02:00
Karol Bucek
8763e51f86
Backport #13036 to 7.x: Refactor: avoid global mutex on ecs_compatibility (#13163) 2021-08-24 12:57:57 +02:00
Rob Bavey
adb149c66d
Remove dependency:bundler task (#13146)
Already done on master in #12017, this is unnecessary as it is already being done
by installBundler.
2021-08-18 11:17:36 -04:00
Rob Bavey
c36e475abf
Bump version to 7.16.0 (#13147) 2021-08-18 10:56:46 -04:00
Rob Bavey
2ac869a9c4
Backport PR #13015 to 7.x: Bundler: freeze lockfile on run, and "norm… (#13140)
* Backport PR #13015 to 7.x: Bundler: freeze lockfile on run, and "normalize" platform on plugin changes

Backport PR #13015 to 7.x branch. Original Message:

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.

* 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

(cherry picked from commit 4707cb)

* Remove code pinning bundler to ~> 1.17
2021-08-17 20:31:26 -04:00
Rob Bavey
cc06c5d8f5
Backport PR #13005 to 7.x: update fpm to allow pkg creation on jdk11+jruby 9.2 (#13005) (#13144)
Backport PR #13005 to 7.x branch. Original Message:

* 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

(cherry picked from commit 7390b64)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-08-17 18:21:42 -04:00
Karen Metts
811020b83b
Doc: Forwardport aarch64 support note (#13132) to 7.x release notes (#13137) 2021-08-16 18:06:43 -04:00
Andrea Selva
24314350ab
[bacport 7.x] Update Snakeyaml version to 1.29 (#13129) (#13134)
Snakeyaml is used only in the build chain, and it's not packaged with Logstash

(cherry picked from commit a7f6c01a3a)
2021-08-16 14:29:07 +02:00
Karen Metts
b59e97c99c
Release notes for 7.14.0 (#13133)
Forwardports 7.14.0 release notes (#13089) to 7.x branch
2021-08-13 19:56:29 -04:00
Andrea Selva
84dbf3e310
[backport 7.x] Added faraday-* and ruby2_keywords notices to licences list (#13126) (#13128)
(cherry picked from commit 542dce81a7)
2021-08-13 14:13:58 +02:00
Karol Bucek
af82b3c87d
Backport Docs: fix java filter unit test link (#13123)
Fixes #11519

Co-authored-by: Fabien Baligand <fbaligand@gmail.com>
2021-08-10 20:25:56 +02:00
Karen Metts
725799d201
Doc: Enhance and expand DLQ docs 7.x (#13099)
Backports: #12959
Fixes: #12923
Related: #10493
2021-07-22 16:44:17 -04:00
Karen Metts
e0908f55a9
Doc: Fix typo and adjust keystore text 7.x #13095 2021-07-21 10:54:54 -04:00
Ry Biesemeyer
e779535ae7
doc: add pipeline.ecs_compatibility docs (#12421) (#13091)
(cherry picked from commit 4056cb1b9a)
2021-07-20 15:17:17 -07:00
Andrea Selva
05a826a58b
Forward port of 7.13.4 release notes to 7.x (#13086)
Forward port of 7.13.4 release notes to 7.x

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-07-20 18:29:16 +02:00
Karen Metts
fb98ca807e
Doc: Add kafka schema registry setting to troubleshooting (#13077)
Backports #13073 to 7.x
2021-07-14 14:00:49 -04:00
Rob Bavey
3c5f7d5e9b
Backport PR #13071 to 7.x: [Test] Fix Unix acceptance tests (#13074)
Backport PR #13071 to 7.x branch. Original message:

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 11:36:57 -04:00
Andrea Selva
f33522f521
[backport 7.x]Move retrieval of Stack version from Gradle's configuration to execution (#13042) (#13066)
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

(cherry picked from commit cef339ce57)
2021-07-13 08:53:19 +02:00
Karen Metts
09bdd51b25
Doc: Include Windows and Unix commands to run basic pipeline (#13062)
Update getting-started-with-logstash.asciidoc (#12706)
Single quotations cause errors, should be double quotes for Windows
Co-authored-by: Megan Humphreys <catonice@gmail.com>

Adds framework for showing both windows and unix examples.
Doc: Add unix command for running basic pipeline (#12714)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-07-09 18:24:52 -04:00
Karen Metts
aa71171f7e
Release notes for 7.13.3 (#13031) (#13057)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-07-07 14:20:02 -04:00
Karol Bucek
49c04d7e5f
Docs: keep elastic_app_search output meta-data (#13048) (#13054) 2021-07-07 09:08:00 +02:00
Andrea Selva
0ac470f3cf
Fix LS benchmarking tool to work with releases >= 7.10.0 (#13052) (#13053)
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.

(cherry picked from commit b722360ebd)
2021-07-06 16:31:55 +02:00
João Duarte
ed73015d9a
bump version to 7.15.0 (#13035) 2021-06-30 19:59:36 +01:00
Andrea Selva
2ce40ced1b
Emergency revert to make bump 7.15.0 (#13037)
Revert "Change Gradle's :logstash-integration-tests:integrationTests task to depends on copyES (#12847) (#12868)"

This reverts commit 5287e7740e.
2021-06-30 19:24:36 +01:00
Andrea Selva
c081985782
Add unit test to grant that production aliases correspond to a published RubyGem (#12993) (#13009)
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

(cherry picked from commit a5f3153a8f)
2021-06-28 16:54:08 +02:00
Karol Bucek
c30559269e
Feat: event factory support (#13017) (#13025)
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 11:31:02 +02:00
Karen Metts
a5f3434015
Doc: Add geoip database API to node stats (#13024)
Backports #13019 to 7.x
2021-06-24 08:59:31 -04:00
kaisecheng
5616462233
Add geoip database metrics to /node/stats API (#13004) (#13020)
This PR adds geoip database status, last update timestamp, download stats counter to Node Stats API
2021-06-23 19:57:25 +02:00
Ry Biesemeyer
873e2c7396
Backport PR #12830 to 7.x: ecs-compatibility docs (#13016)
* noop: avoid declaring default value in config file

(cherry picked from commit f8fe4b6907)

* docs: ecs compatibility from 7.x perspective

Co-authored-by: Karen Metts <karen.metts@elastic.co>
(cherry picked from commit 69702ca8f8)

* ecs docs: pr feedback a11y link text

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

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-06-22 20:02:11 -07:00
Rob Bavey
6d3446d262
Backport PR #13008 to 7.x: Fix UBI source URL (#13011)
Backport PR #13008 to 7.x branch. Original message:

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

Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
2021-06-22 12:43:12 -04:00
Ry Biesemeyer
4dcc69d97c
ispec: fix cross-spec leak from fatal error integration specs (#13002) (#13013)
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.

(cherry picked from commit 6032e5ff64)
2021-06-21 10:59:51 -07:00
Andrea Selva
2c84a5d672
Fix logstash.bat not setting exit code (#12948) (#13007)
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).

(cherry picked from commit 1f9ef97836)

Co-authored-by: Dion Williams <dionrhys1@gmail.com>
2021-06-21 14:37:31 +02:00
Andrea Selva
75d616eba7
Use the OS separator to invoke gradlew from Rake script (#13000) (#13006)
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.

(cherry picked from commit d2c68fc0f9)
2021-06-21 12:06:38 +02:00
Andrea Selva
1059bd91f3
Fix Reflections stack traces when process yml files in classpath and debug is enabled (#12991) (#13003)
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

(cherry picked from commit a6e9a6bcfd)
2021-06-18 14:25:30 +02:00
Andrea Selva
db726ab6f0
Fix/log4j routing to avoid create spurious file (#12965) (#12999)
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.

(cherry picked from commit 1d6a3e4bb3)
2021-06-18 08:31:49 +02:00
Andrea Selva
f063d86c31
Added test to cover the installation of aliased plugins (#12967) (#12998)
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.

(cherry picked from commit cafbf03158)
2021-06-17 17:01:14 +02:00
Andrea Selva
138b60c839
Explicitate the type of log format in appender's names (#12964) (#12997)
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.

(cherry picked from commit a0774c4e76)
2021-06-17 14:21:24 +02:00
Andrea Selva
adcb0da91e
Fix acceptance test when run artifact:all (#12975) (#12996)
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.

(cherry picked from commit 3eaff3612d)
2021-06-17 11:50:38 +02:00
kaisecheng
72e8dc8d9c
fix database manager with multiple pipelines (#12862) (#12995)
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 10:44:18 +02:00
Andrea Selva
854fad6339
Avoid hard-coded plugin alias definitions (#12841) (#12960)
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

(cherry picked from commit 446dc7d906)
2021-06-16 17:34:46 +02:00
Karol Bucek
35ce0eed13
[7.x] Deps: update JRuby to 9.2.19.0 (#12989) (#12990) 2021-06-16 12:04:05 +02:00
Karen Metts
7d4b2ff313
Doc: Add tip for checking for existing field (#12987)
Backports #12899

Co-authored-by: Sebastian <gentunian@users.noreply.github.com>
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2021-06-15 14:13:50 -04:00
Karen Metts
d0d4cae733
Release notes draft for 7.13.2 to 7.x (#12982)
Forwardports #12981 to 7.x

Co-authored-by: Logstash Machine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-centos-7-1623415853715328646.c.elastic-ci-prod.internal>
2021-06-14 16:35:37 -04:00
Karen Metts
9997cee388
Doc: Remove unused tagged regions (#12979)
Backports #12976 to 7.x
2021-06-10 15:38:08 -04:00
Karol Bucek
419b1dc988
Backport PR #12791 to 7.x: Deps: update JRuby to 9.2.18.0 (#12971)
Backport PR #12791 to 7.x branch. Original message:

Version bump of JRuby.

+ Fix: a missing require in bootstrap

(cherry picked from commit ee6038afec)
2021-06-10 07:24:17 +02:00
Karol Bucek
9cf722d30b
Test: handle a RGs warning from packing output (#12974)
in preparation for JRuby 9.2.18.0 which includes a RGs update
2021-06-10 06:41:01 +02:00
Andrea Selva
adb7f678ef
Backport PR #12962 Fix dependency on plugin_alias.yml during rake artifacts:all (#12963)
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'.

(cherry picked from commit 8e62e8a01c)
2021-06-04 14:45:21 +02:00
Andrea Selva
d9e21549c2
Refactoring of JavaKeyStore.getKeyStorePassword method to simplify if conditions (#12952) (#12961)
Streamline the flow of logic avoiding nesting of if-s to make evident the good path vs the error conditions.

(cherry picked from commit aa8305f1d4)
2021-06-03 14:07:34 +02:00
kaisecheng
6766a87825
Release notes for 7.13.1 (#12946) (#12957)
* Update release notes for 7.13.1

Co-authored-by: Karen Metts <karen.metts@elastic.co>
2021-06-03 10:42:50 +02:00
Andrea Selva
f93b30cca4
Use the JVM specified in the CI matrix environment also to run spawned proccesses (#12945) (#12953)
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>
(cherry picked from commit fa9adb4b86)
2021-06-01 14:21:13 +02:00
Karen Metts
0a1bb2fd0b
Internal: Update messaging in release notes script (#12949) (#12950) 2021-05-28 11:32:26 -04:00
Rob Bavey
f0ba6ea5c3
Backport PR #12925 to 7.x: Add logstash-integration-elastic_enterprise_search to plugins-metadata.json (#12934)
Backport PR #12925 to 7.x. Original Message:

* 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

(cherry picked from commit a935261eeb)
2021-05-27 09:40:19 -04:00
Karen Metts
5ff415c492
Doc: Expand definition and fix typo(#12937)
Backports #12936 to 7.x
2021-05-26 15:18:06 -04:00
Karen Metts
270616f34a
Forwardport release notes for 7.13.0 to 7.x branch (#12932)
Forwardports #12842

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-05-26 10:14:09 -04:00
kaisecheng
ec8d182ebb
Geoip disable database manager (#12905) (#12906) 2021-05-14 10:39:37 +02:00
Andrea Selva
f8551a05cf
Update bundled JDK to 11.0.11+9 (#12881) (#12882)
(cherry picked from commit 4f63701d6d)
2021-05-13 11:52:48 +02:00
João Duarte
7f934db2ca
fix ubi8 docker image creation by skipping yum clean metadata (#12902) (#12903)
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

(cherry picked from commit d1b12ded1d)
2021-05-12 15:10:49 +01:00
Rob Bavey
e5e41f85c4
[backport 7.x] [Build] On aarch64 docker build, install noarch version of bind-license first (#12891) (#12900)
Backport PR #12891 to 7.x branch. Original message:

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-12 10:12:56 +01:00
Karen Metts
4f58cb3bf5
Doc: Update contributing steps and guidelines (#12895)
Backports #12879 to 7.x
2021-05-11 15:01:52 -04:00
Karen Metts
3b552afebe
Comment out config examples that no longer work (#12892)
Backports #10671
Co-authored-by: dedemorton <dede.morton@elastic.co>
2021-05-11 14:10:57 -04:00
kaisecheng
6a338c675c
Geoip use cc indefinitely (#12888) (#12889)
This PR allows using CC database indefinitely if Logstash hasn't used EULA database ever
Fixed: #12859
2021-05-11 18:08:11 +02:00
kaisecheng
68b8fd3a48
change download path for geoip plugin (#12863) (#12875)
The database was downloaded in plugin/vendor
This PR changes the working directory to `path.data`
2021-05-10 14:28:44 +02:00
Andrea Selva
b33692e417
Update elasticsearch gem dependency requirements (#11258) (#12874)
Update Elasticsearch minimum version requirement to ~>7 also on the 7.x branch.
Relates to #11258

(cherry picked from commit ef9b0d2db5)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-05-06 16:22:00 +02:00
Andrea Selva
5287e7740e
Change Gradle's :logstash-integration-tests:integrationTests task to depends on copyES (#12847) (#12868)
The integrationTests start instances of Elasticsearch so they need it to be present and unpacked in build/ folder before start.

(cherry picked from commit 149ee41a8b)
2021-05-03 12:43:09 +02:00
Karen Metts
6c0f3c6020
Doc: Keystore must be accessible to logstash user (#12864)
Backports  #12775
Updates docs to propagate change to other branches. The original was a direct commit to the 7.10 branch.
2021-04-30 18:04:39 -04:00
kaisecheng
44493835cf
bump core version to 7.14.0 (#12839) 2021-04-21 14:35:56 +02:00
Andrea Selva
0bc53b4b8a
Adapted install/uninstall/list PluginManager's command to respect the alised plugins (#12821) (#12836)
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>
(cherry picked from commit 1e08341e1e)
2021-04-20 23:43:47 +02:00
Andrea Selva
4086d427c0
[Backport 7.x] plugin alias handling in logstash-core (#12835)
Introcuce the concept of alias for a plugin (#12796) and removes static part from PluginRegistry to avoid static initializer (#12799)

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 23:39:03 +02:00
Ry Biesemeyer
5644ac1c9b
updated distributor pattern section (#12813)
The conditionals in the distributor pattern section are not correct, as string comparisons require quotes around the value being compared against. Added quotes around them to fix this.

(cherry picked from commit 34429ee0f2)

Co-authored-by: Ahil PonArul <29006086+turnUpTheChill@users.noreply.github.com>
2021-04-15 16:01:36 -07:00
kaisecheng
3c27f8ab40
GeoIP database copy all files from .tgz alongside database (#12824) (#12826)
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 15:20:20 +02:00
Karol Bucek
fab5dd8da8
Backport PR #12801 to 7.x: Docs: note on quoted field references (#12817)
see GH-5591

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-04-14 11:26:46 +02:00
Andrea Selva
5a9048c4df
Fix Date class clash when used in pipelines with Date filter and GeoIP and pin open-ssl to 0.10.5 (#12811) (#12812)
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

(cherry picked from commit 6f55066b17)
2021-04-13 15:20:12 +02:00
kaisecheng
b852daf202
Allow plugin manager uninstall plugin regardless of working directory (#12786) (#12808)
Fixed: #10781
2021-04-08 18:25:58 +02:00
Karol Bucek
a914a7c134
Backport PR #12784 (#12805) to 7.x: Fix: logstash-keystore failing with an error (#12803)
* 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

(cherry picked from commit e8e393bdc7)

* Test: let's do the cleanup for every test
2021-04-08 18:19:01 +02:00
Andres Rodriguez
3dca252b65
[Backport] Set correct permissions for /usr/share/logstash on pkg installs (#12788)
Set the correct ownership of /usr/share/logstash on DEB & RPM installs, following FHS guidelines.

Fixes: #12771
Backports: #12782. cherry picked from commit c4cb8f4f12)
2021-03-31 16:46:19 -04:00
kaisecheng
965c839e74
[7.x] Geoip database service (#12675) | GeoIP clean up database after new download (#12689) | fix broken test case of term of service (#12715) | change domain and endpoint of GeoIP database service (#12727) | GeoIP database add license file (#12777)
GeoIP database service license change

Fixed: #12560
2021-03-26 10:23:37 +01:00
Karol Bucek
d8055b8311
Build: avoid leaking memory from generate_plugins_version (#12763) (#12772)
(cherry picked from commit cc615da80c)
2021-03-24 20:13:30 +01:00
Karen Metts
a197fd4327
Doc: Forwardport release notes for 7.12.0 to 7.x branch (#12770)
Add placeholder and coming tag for 7.12.0 release notes

Generate and update release notes for 7.12.0
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

Doc: Rework security update in release notes 
Add link to CVE
2021-03-24 13:42:51 -04:00
Karen Metts
b81b053d45
Forwardport release notes for 7.11.2 to 7.x branch #12742
Forwardports #12726
2021-03-24 10:26:30 -04:00
Karen Metts
6118de1a48
Doc: Change protocol from HTTP to HTTPS for 7.x #12730
Backports #12730 to 7.x

Co-authored-by: Roshan Poudel <rowshanpoudel@gmail.com>
2021-03-16 15:49:32 -04:00
Ry Biesemeyer
cecd774bce
internal-monitoring: use configured ssl verification mode (#12749) (#12750)
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.

(cherry picked from commit d5becc0082)
2021-03-16 12:10:35 -07:00
Karol Bucek
fafb7d3104
Backport PR #12724 to 7.x: Deps: update log4j2 to latest and ship log4j 1.2 bridge (#12744)
Expected to improve logging experience for libraries stuck with Log4J 1.2 logging.
2021-03-11 12:42:41 +01:00
Rob Bavey
9a4c0ea79c
Backport PR #12736 to 7.x: Fix Benchmarking tool (#12738)
Backport PR #12736 to 7.x branch. Original message:

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 13:48:00 -05:00
Karen Metts
1066eab70e
Docs: Replace relative paths with docs-root attributes (#12719) (#12731)
Backports #12719 to 7.x
2021-03-08 16:13:32 -05:00
Rob Bavey
5a24847a28
Backport PR #12728 to 7.x: [Build] Fix version script when VERSION_QUALIFIER is empty string (#12729)
Backport PR #12728 to 7.x branch

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 10:43:04 -05:00
Karol Bucek
01b2f14337
Backport PR #12720 to 7.x: Deps: update slf4j to latest 1.7.30 (#12723) 2021-03-04 13:39:39 +01:00
João Duarte
06bee93154
update jruby to 9.2.16.0 (#12699) (#12721)
fix define_method+super calls due to jruby/jruby#6571

(cherry picked from commit 9643a33b99)
2021-03-04 10:10:57 +00:00
Andrea Selva
87af46f161
Temporarly silenced an x-pack monitoring test, waiting to be fixed the root cause issue #12712 (PR #12718)
The fail cause is documented  in issue #12711 

(cherry picked from commit bca169f348)
2021-03-04 11:06:11 +01:00
Andrea Selva
1fad4753c1
Removed OpenJDK15 in CI matrix testing (#12710)
Add AdoptOpenJDK15 and Zulu15 to CI matrix

(cherry picked from commit 0d6666b1da)
2021-03-03 15:51:05 +01:00
João Duarte
7fee8c3a3b
cleanup bundler exclusions during jruby unpacking (#12692) (#12702)
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.

(cherry picked from commit f0c18e89d0)
2021-03-01 11:01:48 +00:00
João Duarte
91b2884842
update jdk to 11.0.10+9 (#12693) (#12700)
(cherry picked from commit ac2f5ef903)
2021-03-01 11:00:54 +00:00
Rob Bavey
a61a827bb1
[7x backport] Fix Elasticsearch/DLQ integration test flakiness (#12695)
Clean backport of #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-23 16:05:18 -05:00
andsel
bc56c2068e Add some javadocs comments to the classes
Removes never used class org.logstash.execution.queue.LegacyMemoryQueueWriter

(cherry picked from commit 9a63ec2705)
2021-02-22 07:03:54 -08:00
Karen Metts
a9e4ba6073
Release notes for 7.11.1 (#12674) (#12691)
Co-authored-by: Karen Metts <karen.metts@elastic.co>
Co-authored-by: Logstash Machine <43502315+logstashmachine@users.noreply.github.com>
2021-02-19 18:43:26 -05:00
João Duarte
4a42592b35
bump 7.x branch to 7.13.0 (#12682)
* remove information about snapshot builds

This information has been outdated for some time but we haven't had any reports about them, which points to them not being useful while requiring maintenance after every release.
2021-02-18 15:12:07 +00:00
andsel
567487fdce Make integration test fail if 'offline' tool can't be compiled
(cherry picked from commit 042d0d466b)
2021-02-18 02:53:12 -08:00
andsel
275abab171 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.

(cherry picked from commit 91996cf2a2)
2021-02-16 09:39:26 -08:00
andsel
4e82485d39 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

(cherry picked from commit 79d8f47437)
2021-02-15 08:43:42 -08:00
João Duarte
7608deecfb
Forward port of release notes to 7.x (#12596 & #12648) (#12647)
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
Co-authored-by: Joao Duarte <jsvduarte@gmail.com>
2021-02-09 15:48:00 +00:00
Rob Bavey
de3ee98f87
[7x backport] Update dockerfile template to allow selection of architecture by env (#12641)
Clean backport of #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-04 11:34:25 -05:00
andsel
c96ae0d4bd 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 09:45:48 -08:00
kaisecheng
8abfc50d08
Fix showing deprecation warning of command line flags (#12592) (#12640)
Fix missing deprecation warning. Store the deprecation message in memory and remove them once it shows to users

Fixed: #12587
2021-02-03 16:01:11 +01:00
Rob Bavey
71b7061b48
[7x backport] Update docker container tests to handle jvm option parser (#12635)
Clean backport of #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-03 09:25:22 -05:00
kaisecheng
cb35193f7c
remove CMS from jvm options in java 14 (#12638) (#12639) 2021-02-03 13:08:22 +01:00
Rob Bavey
656c2bfd42
7x Fix sub second config.reload.interval (#12611)
Clean backport of #12589

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-02-02 11:59:56 -05:00
kaisecheng
73154014cb
enable agent to stop pipeline by pipeline_id (#12582) (#12616)
* 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-02-02 15:37:17 +01:00
andsel
ed7fb06a36 [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 02:19:20 -08:00
andsel
7e03ce1f58 Update CI to run on OpenJDK15 2021-02-02 02:18:29 -08:00
João Duarte
b3bcf29d73
use correct headers api for redirects in plugin manager http client (#12626) (#12628)
* fix plugin installation QA test

(cherry picked from commit 7c4bd8f875)
2021-02-01 16:08:21 +00:00
João Duarte
91c27cd731
fix url for kafka and bump to 2.7.0 (#12617) (#12619)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
(cherry picked from commit 0337835f67)
2021-01-30 17:33:17 +00:00
Karen Metts
0cddeefd99
Doc: Clarify minimum privileges for logstash_writer role (#12613) (#12623)
Backports: #12613
Fixes: #12612
2021-01-29 15:14:49 -05:00
Joao Duarte
d0f1ed4c71 Revert "replace with_clean_env with with_unbundled_env (#12615) (#12618)"
This reverts commit ff3cf929fa.

Because we're still on bundler 1.x here..
2021-01-29 17:56:58 +00:00
João Duarte
ff3cf929fa
replace with_clean_env with with_unbundled_env (#12615) (#12618)
(cherry picked from commit 023e11a8e2)
2021-01-29 17:35:47 +00:00
João Duarte
796f7f83b4
bump jrjackson to 0.4.14 and jackson-databind to 2.9.10.8 (#12603) (#12608)
(cherry picked from commit 57b81b2625)
2021-01-27 14:15:44 +00:00
João Duarte
f64a601326
[windows] fix launch of logstash.bat when folder contains spaces (#12585) (#12599)
(cherry picked from commit 128e992c57)
2021-01-26 11:23:32 +00:00
andsel
2e4845df36 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 06:50:13 -08:00
andsel
b0c81338f3 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
- print a warn message if it detects an scripted log4j configuration and continue the execution (#12591)
2021-01-25 05:46:27 -08:00
Joao Duarte
87297c5c7f [forwardport 7.x] Release notes for 7.10.2 (#12553) 2021-01-13 17:29:08 +00:00
Karol Bucek
53e73e9ccc
Fix: make sure LS exits when running into fatal errors (#12559)
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

Back-port of #12470
2021-01-13 06:45:16 +01:00
andsel
98d3ac9d00 Moved ingest-converter tool from Javascript to Java, preserving the same behaviour (#12524)
(cherry picked from commit aa3576d74d)
2021-01-11 23:57:58 -08:00
Ry Biesemeyer
e2f2255fa5 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 18:35:19 +00:00
Karen Metts
c5941e6340
Doc: Add info on contributor program
Backports #12543 to 7.x
2021-01-04 16:09:59 -05:00
Rob Bavey
a5dbc8d2a2
Update license dependency information (#12544)
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 15:59:21 -05:00
andsel
05ec149b39 Enable javadoc lint only for files that contains javadoc comments, avoid warning for missing javadoc comments on everything else
(cherry picked from commit d176e608bd)
2020-12-21 08:18:07 -08:00
Ry Biesemeyer
7704bc78d0
Bump 7.12 (#12525) 2020-12-16 06:59:28 -08:00
Ry Biesemeyer
8746cdeda4
plugin: adds :validate => :field_reference (#12459) (#12521)
* 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-15 07:13:46 -08:00
andsel
06418b8631 Fix error due to missing variable when listitng tasks and no architecture is externally specified with -Pos_arch=
(cherry picked from commit 7144a3f7cf)
2020-12-10 07:09:11 -08:00
andsel
8550059a2a Forward port of 7.10.1 release notes to 7.x 2020-12-09 01:29:54 -08:00
Rob Bavey
0588d51056
[7x_backport] Add UBI8 image specific labels back to the docker image (#12502)
Clean backport of #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 16:12:39 -05:00
Ry Biesemeyer
7457bc9038 REE: output reload interval as nanos instead of object
fixes a warning about an unsupported gauge type, matches the behaviour
on JEE.
2020-12-02 12:22:25 -08:00
andsel
8539d3fb9b Moved LogStash::Util::TimeValue to Java
(cherry picked from commit 1a62dc79e0)
2020-11-30 06:36:18 -08:00
andsel
872d25b9f6 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

(cherry picked from commit fa3891953d)
2020-11-30 03:04:56 -08:00
andsel
f50cc38ea6 [Doc] expanded the description of how to obtain the logger's names form Java and Ruby class names
(cherry picked from commit 7db4692044)
2020-11-25 23:45:36 -08:00
andsel
fee5c72022 Fix an API break, a Ruby's ArgumentError should be raised.
Reestablished Ruby specs to test moved code.

(cherry picked from commit 09f995776e)
2020-11-25 03:07:43 -08:00
andsel
e9aabdc3f1 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.

(cherry picked from commit 14570d5d86)
2020-11-25 02:32:48 -08:00
Colin Surprenant
45099c1b54 remove evaluation dir from JRuby bundled did_you_mean gem 2020-11-23 19:22:28 +00:00
andsel
f37d9a462c 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.

(cherry picked from commit ca81a8f4a3)
2020-11-19 08:57:51 -08:00
andsel
747c38d6db Move code of CloudSettingAuth to Java
- moved the class's code
- moved spec tests to JUnit tests

(cherry picked from commit b0920eb6ff)
2020-11-18 23:50:31 -08:00
Rob Bavey
44fa849852
[7x backport] Fix docker image metadata (#12450)
Clean backport of #12447, #12452

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.

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 16:10:48 -05:00
andsel
b1e5c4f257 Moved CloudSettingId class and tests to Java
(cherry picked from commit 2545fa45ba)
2020-11-16 00:36:16 -08:00
Karen Metts
cf7e2e308e
[Forward] Doc:Release notes 7.10.0 to 7.x (#12433)
Co-authored-by: andsel <selva.andre@gmail.com>
2020-11-12 14:02:30 -05:00
andsel
88ceb5ccfc Added console prints in ingest-converter for not recognized processor definitions.
Adds console output for
- 'if' condition in 'set' processor
- unrecognized processor, like join

(cherry picked from commit 690bade81f)
2020-11-10 23:58:15 -08:00
Rob Bavey
68f9ba899c
[7x backport] Add more information to UnexpectedTypeException (#12429)
Clean backport of #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 10:35:29 -05:00
kaisecheng
aba562e887
[backport 7x] hash function of pipeline config with metadata (#12425)
add metadata in the hash function

Fixed #12387
2020-11-09 15:36:50 +01:00
kaisecheng
1ea4837b71
[backport 7x] delete pipeline in registry (#12419)
deletes the pipeline in the pipelines_registry if it is terminated and is removed in the source

Fixed: #12414
2020-11-09 13:21:40 +01:00
Karen Metts
5037fd23e9
[Backport] Doc: Add bundled JDK info (#12417)
Document options and impacts of bundled JDK

Backports: #12369
2020-11-05 12:45:57 -05:00
kaisecheng
d473e0b7cf
[backport 7x] Doc: wildcards in xpack.management.pipeline.id (#12416)
Backports: #12396
Fixes: #12366
2020-11-05 17:34:14 +01:00
Rob Bavey
92f304a132
[7.x backport] Add addresses to p2pipeline input and output plugin metrics (#12413)
Clean backport of #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 16:09:22 -05:00
kaisecheng
958ffa71f0
add wildcard support in xpack pipeline id (#12370) (#12407)
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

Fixed: #10558
2020-11-03 18:51:52 +01:00
Karen Metts
54505a9b41
[Backport]Doc:Restructure troubleshooting docs and add plugin tracing (#12405)
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

Backports: #12270
Fixes: #12228
2020-11-02 16:28:06 -05:00
Karen Metts
50428785cf
[Backport][Doc]Relocate logstash-to-cloud info for increased visibility (#12400)
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

Backports #11884 to 7.x
2020-10-30 16:23:58 -04:00
kaisecheng
c96543b010
[7x backport] document system indices api privilege (#12393)
backport #12388 #12391
2020-10-29 09:49:52 +01:00
Rob Bavey
a02b7e13c5
[7x backport] Update jrjackon and databind versions
Clean backport of #12385
2020-10-26 15:00:26 -04:00
andsel
350bb28b06 In QA test, when Logstash package with bundled JDK is installed on RedHat it has to check also the architecture
(cherry picked from commit a6fbc6c260)
2020-10-21 08:58:53 -07:00
andsel
582f886276 Forward of 7.9.3 release notes 2020-10-21 07:58:35 -07:00
Rob Bavey
bf1238dec2
[7x backport] Add optional sourceURL to license report CSV (#12362)
Clean backport of #12346

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-20 11:00:05 -04:00
Karol Bucek
a693fa3bf4
Build: properly isolate integration (test) env setup (#12364)
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-12301)
2020-10-20 09:00:01 +02:00
Rob Bavey
0727260c71
[7x backport] Handle Windows delete pending files (#12337)
Clean backport of #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 17:11:58 -04:00
Colin Surprenant
69e6200a7b
stop inputs upon a worker error before terminating the pipeline (#12342)
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 17:06:25 -04:00
Karen Metts
0b18b79cce
Doc: Clarify use of queue max bytes setting (#12341)
Queue max bytes only applies to persistent queues
Forwardports: #12334 to 7.x

Co-authored-by: rsdrakh <33121848+rsdrakh@users.noreply.github.com>
2020-10-13 15:38:15 -04:00
Rob Bavey
80db07d36d
[7x backport] env2yaml syntax error (#12322)
Clean backport of #12320

`pipeline.ecs_compatibility` setting was missing a comma after its definition
2020-10-07 14:46:53 -04:00
Rob Bavey
708c156c1b
[7x backport] Write DLQ entries to temp file first (#12304) (#12318)
Clean backport of #12304

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 14:37:49 -04:00
Rob Bavey
a6a31ec428
[7x backport] Remove redundant shouldRunAfter (#12316)
Clean backport of #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:38:50 -04:00
andsel
5ad7bbb03b Bump 7.11 2020-10-07 06:11:55 -07:00
kaisecheng
a93d454688 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:27:28 +02:00
Ry Biesemeyer
c606e9f5b1
ECS Compatibility 7.x Backport (#12308)
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 08:33:11 -07:00
Rob Bavey
ccbc5691cb
Docker Build: Add ability to detect/set build architecture (#12303)
Clean backport of #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 13:38:09 -04:00
Rob Bavey
19d8a170e0
fix dependency issue, jruby-openssl, of integration test (#12301)
Backport of #12300

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2020-10-05 09:03:35 -04:00
Rob Bavey
23141e8f7e
Add RedHat Univeral Base Image license information (#12296)
Clean backport of #12287
2020-10-02 15:47:25 -04:00
Rob Bavey
97028a0320
Update license information (#12294)
Generate new notice file
2020-10-01 09:34:00 -04:00
andsel
9668b9ec5c 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 05:59:29 -07:00
Rob Bavey
813e059a9d 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-30 05:44:42 -07:00
Karen Metts
f9f998313e
Doc:Increase visibility of offline plugin support (#12283) (#12284)
Elevates visibility of Offline Plugin Management section so that air gapped users
don't have to struggle through instructions that require an internet connection.

Backports: #12283
Related: #12280
2020-09-29 17:20:21 -04:00
Rob Bavey
16e0f85af8
7.9.2 Release Notes (#12272)
* Add JDK 15 compatibility notice
* Add more information to app_search missed dependency fixed issue

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2020-09-24 10:41:27 -04:00
Karen Metts
b287ec72e2
Doc:Clarify how Bulk API interacts with DLQ (#12209) (#12268)
Documents both HTTP success and HTTP failure scenarios.
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>

Backports #12209
2020-09-23 14:10:18 -04:00
Rob Bavey
9472d89363
[7x backport] Update ubi8-minimal to pull from elastic docker registry (#12258)
Clean backport of #12253
2020-09-22 14:19:48 -04:00
andsel
d792d4dd43 Added elastic-app-search and jwt license definition and notices 2020-09-17 09:39:09 +00:00
Rob Bavey
1684c8529f
[7x backport]Fix docker image certification (#12248)
Clean backport of #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-16 09:13:58 -04:00
Karen Metts
2fb348e053
[DOC] Logging settings can affect performances (#12246) (#12247)
Logging settings can affect performances
Backports #12246 to 7.x branch

Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>
2020-09-15 16:51:29 -04:00
Karen Metts
1f345a2653
Doc:Forwardport Release notes 7.9.1 to 7.x (#12240)
* Release notes for 7.9.1 (#12220)
* Doc:Fix release notes formatting for consistency (#12224)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2020-09-14 16:45:09 -04:00
Rob Bavey
68ac9477d5
[7.x backport] Fix keystore thread safety (#12235)
Clean backport of #12233

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-11 14:26:43 -04:00
andsel
c0d9b025e5 Fix to implement the blank? method that doesn't exists for String, is added by Rails framework 2020-09-04 14:29:03 +00:00
Karen Metts
07e8400f27
Doc:Add redirect from multiline filter to multiline codec (#12208) (#12217)
Add filebeat module use case

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2020-09-02 11:49:55 -04:00
Colin Surprenant
c1dc474868 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 19:07:00 +00:00
Rob Bavey
ad631e464e Add test for ordered pipeline flushing fix 2020-08-26 19:07:00 +00:00
Julien Mailleret
713fbfbf14 fix ubi8 docker build context
This commit fixes a typo in the name of the docker build context for ubi8 images.
2020-08-26 15:16:50 +00:00
Andres Rodriguez
a755eb5470 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 13:18:01 -07:00
Colin Surprenant
75411cfe0b ensure input plugin close is called upon termination or pipeline reload 2020-08-21 15:08:20 +00:00
Drew Boswell
4ef0204098 add ssl verification_mode to env2yaml 2020-08-21 14:28:12 +00:00
Karen Metts
0fd5d3a032 Doc:Add note that stdin input doesn't allow config reloading 2020-08-20 22:15:32 +00:00
Rob Bavey
7b8335c542 Limit locale changes to ubi8 container 2020-08-20 14:35:48 +00:00
Rob Bavey
0772e72fa8 Minor fixes to acceptance and docker test scripts 2020-08-20 14:35:48 +00:00
Rob Bavey
ef1352ef53 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 14:35:48 +00:00
Karen Metts
7637fa3f37
Release notes 7.9.0 (#12179) (#12188)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2020-08-18 15:52:58 -04:00
Ry Biesemeyer
854a31756e 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 18:11:47 +00:00
Ry Biesemeyer
b2961deaee test: no-op refactor to avoid repeating implementation in test 2020-08-06 18:11:47 +00:00
Ry Biesemeyer
6f421e56da perf: fix memoization of PipelineConfig#configString() 2020-08-06 18:11:47 +00:00
Joao Duarte
1013a80b38 allow skipping pr creation in version bump script 2020-08-06 15:15:09 +00:00
Karen Metts
762d48e312 Doc:Adjust link for integration plugin header file 2020-08-06 14:16:01 +00:00
Joao Duarte
f736d9c860 bump jruby to 9.2.13.0 2020-08-05 14:49:21 +00:00
Ry Biesemeyer
04a3852428 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 09:24:59 +00:00
Karen Metts
2c9cf09e88 Doc:Fix name of monitoring settings 2020-08-04 00:21:18 +00:00
Rob Bavey
e8385738c5
7x Introduce integration tests for docker images (#12157)
Clean backport of #12135

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-08-03 09:43:09 -04:00
Karen Metts
2e7ba7b417 Doc:Add monitoring and management to API key security content 2020-07-31 22:21:43 +00:00
andsel
7df59fbe76 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 09:22:28 +00:00
andsel
dcca6c2c61 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 09:21:38 +00:00
Karen Metts
2aa5cadd44 Doc:Fix link to monitoring docs and tag optional features 2020-07-29 23:31:52 +00:00
Ry Biesemeyer
dbf43f9bd9 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 21:21:55 +00:00
Karen Metts
69ba072ef3
Doc:Forwardport 7.8.1 release notes (#12092) to 7.x #12142
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: Colin Surprenant <colin.surprenant@gmail.com>
2020-07-27 14:47:55 -04:00
Rob Bavey
702f872eff 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 19:48:58 +00:00
Joao Duarte
e7db1ae16c 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 08:38:06 +00:00
João Duarte
d78635ca4f Document use of keystore values in pipelines.yml 2020-07-22 20:43:56 +00:00
Karen Metts
3135831538 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 19:23:34 +00:00
Karen Metts
6546bb3ba5
Doc:Fine tune 7.8 release notes (#12122)
Forwardport 7.8.0 release notes updates from #12050 to 7.x branch
2020-07-17 20:31:43 -04:00
Joao Duarte
dc412713ef add ci script setup dependencies
This script can be useful for preparing the environment for
services like code scanners.
2020-07-16 09:09:53 +00:00
Joao Duarte
51b5217826 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 10:13:37 +00:00
João Duarte
c05ccd739f
bump version to 7.10.0 (#12111) 2020-07-15 10:05:11 +01:00
Karen Metts
8ec9d4e6d0
[Doc]Release notes for 7.8 (#12033) (#12037)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2020-07-14 17:57:10 -04:00
Colin Surprenant
556865ee88 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 21:54:10 +00:00
Colin Surprenant
05dbba780f 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 21:48:44 +00:00
Colin Surprenant
9f7cc64ee8 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 21:48:44 +00:00
Rob Bavey
b2c652bf9d 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 20:39:00 +00:00
Karen Metts
8e750ccd08 Doc:Add info on reserved fields in events Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com> Fixes: 11946 2020-07-13 19:25:34 +00:00
Rob Bavey
7a4b81363b 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 17:49:23 +00:00
Rob Bavey
efbdd8d27c Fix gradle typo
Inadvertent extra character causes aarch64 builds to fail.
2020-07-13 13:31:53 +00:00
Karen Metts
6719163863 Doc:Replace outdated pipeline viewer screenshot 2020-07-09 14:31:32 +00:00
Joao Duarte
b02978fd41 add dependency notice for amazing_print 2020-07-09 09:33:03 +00:00
DeDe Morton
16b2ce7350 Change links to refactored Beats getting started docs 2020-07-08 17:28:18 +00:00
Rob Bavey
40f99249e6 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 13:01:41 +00:00
Joao Duarte
85a572a077 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 11:57:39 +00:00
João Duarte
d99ac24c7f
bump gradle to 6.5.1 (#12085) 2020-07-06 15:02:36 +01:00
Joao Duarte
8da85f4384 ensure 'starting logstash' log entry happens first 2020-07-06 14:02:13 +00:00
Joao Duarte
9fdef56b10 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 13:42:31 +00:00
Joao Duarte
482727650b 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 16:43:01 +00:00
Rob Bavey
5a20843c8c
[7x backport] Add wait functionality to stop_es integration test helper function (#12067)
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.

Clean backport of #12061
2020-07-02 11:35:45 -04:00
Joao Duarte
6f30d81c9d 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 10:13:56 +00:00
Joao Duarte
c4834e55ee 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 10:11:30 +00:00
Joao Duarte
29d7dcef94 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 20:16:50 +00:00
Joao Duarte
bf7041fa28 test improved cache reuse during generation 2020-07-01 08:58:08 +00:00
Joao Duarte
3a5f6860a7 fix tests related to compiler cache due to reduced class generation 2020-07-01 08:58:08 +00:00
Joao Duarte
1413c62c48 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 08:58:08 +00:00
Ry Biesemeyer
e01c66c9bd 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 08:58:08 +00:00
Colin Surprenant
40a807d4e6 do not call agent.converge_state_and_update before agent.execute 2020-06-30 18:14:26 +00:00
Colin Surprenant
c2e4e4f185 release queue dir lock upon exceptions while opening queue 2020-06-30 17:42:49 +00:00
Karen Metts
8eddbd608b Doc:Add deprecation notice to legacy collection
Resolves: #11979
2020-06-26 22:52:39 +00:00
Ry Biesemeyer
a63e534481 Standardize on en-GB "behavioUr" for this doc
Backport of #12051 to 7.x
2020-06-26 21:45:17 +00:00
Karen Metts
4951f4e751 Doc: Create section for cross-plugin functionality and add space delimiters
Backport of #12051 to 7.x
2020-06-26 21:45:17 +00:00
Ry Biesemeyer
0efbc0488a 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

Backport of #12051 to 7.x
2020-06-26 21:45:17 +00:00
Joao Duarte
838c54879b improve test for cache difference 2020-06-26 16:50:36 +00:00
Karen Metts
27117a345a Doc:Add info on using api keys for access Co-authored-by: João Duarte <jsvd@users.noreply.github.com> 2020-06-26 15:24:50 +00:00
andsel
fe105710b5 Fix: missed 'equal' part in time comparison test
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

Backport of #11862 to 7.x
2020-06-26 13:27:30 +00:00
vijairaj
734ec04186 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:16:56 +01:00
Colin Surprenant
659ef33f72 Backport #12009 to 7.x branch, bugfix in pipeline reload
fix Settings equality test which broke the PipelineConfig equality
2020-06-26 03:07:15 -07:00
Ry Biesemeyer
41272371a5
support Environment and Keystore substitutions in password-type plugin options (#11783)
Backport of #11774 to 7.x

Resolves: https://github.com/elastic/logstash/pull/10583

Co-authored-by: Tyler Gregory <td.g@icloud.com>
2020-06-26 10:46:26 +01:00
João Duarte
8de6cecc34 Improve warning about UDP/TCP not having app level acks 2020-06-26 10:41:12 +01:00
Andrew Pan
126056f3a7 Update local.rb for pipe file (#11109)
Load pipe file for process communication

Co-authored-by: Andrew Pan <px2557@foxmail.com>
2020-06-26 10:37:23 +01:00
Colin Milhaupt
24ac6800c8 Update proxy_support.rb
Backport of #9787 to 7.x
2020-06-26 09:29:58 +00:00
Andrea Selva
3e380bf10f
Backport of PR #11457 to 7.x (#12057)
Simplified if..else if in PluginFactory for Java plugins part, moved to template method pattern
2020-06-26 10:09:08 +01:00
andsel
c6795731f1 Backport to 7.x of PR #11824
Refactor: move PipelineConfig from Ruby to Java

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-06-26 00:20:43 -07:00
andsel
72f4e2f8e2 Backport of PR #11773 to branch 7.x
Backports a PR that moved code out of LogStash::Compiler to org.logstash.config.ir.ConfigCompiler
2020-06-25 09:05:23 -07:00
Colin Surprenant
d767848394 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 13:09:33 +00:00
Karol Bucek
35d2b391aa 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 09:39:28 +00:00
Rob Bavey
6c50eda135 [7x_backport] Add link conversion from Markdown to AsciiDoctor (#11508)
Backport of #11508 to convert links from Markdown to AsciiDoctor while generating
release notes.
2020-06-17 11:52:18 -07:00
Lisa Cawley
018550f863
[DOCS] Fixes Stack Overview links (#12025) (#12026) 2020-06-17 07:27:42 -07:00
Rob Bavey
af54d95df8 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 15:11:59 +00:00
Rob Bavey
1a0d5c961f 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 13:32:16 +00:00
Karen Metts
b5528c5ffa Doc:Add link to JVM section of support matrix
Add link to support matrix as official word on supported versions.
2020-06-12 15:00:15 +00:00
Joao Duarte
7f58596643 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 14:48:05 +00:00
Rob Bavey
addcb8a0a7
Retrieve branch version of Filebeat via gradle (#12011)
Clean backport of #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-12 09:27:18 -04:00
Joao Duarte
8d53676aac retry on failed gradlew wrapper command in Dockerfile 2020-06-12 09:18:11 +00:00
Colin Surprenant
58b6e4d1c6 add commented out options for api_key in logstash.yml 2020-06-10 20:49:41 +00:00
Karen Metts
6832040d28 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 20:18:14 +00:00
Karen Metts
9bb792a0d6 Incorporate review comments
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
610abaaf99 Wording tweak
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
335032dc3f Expand event ordering
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
9597ab1eea Add content for pipeline ordering and init time
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
9aec969045 Add section for conceptual info
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Rob Bavey
c23360fc44 Add java8 to test matrix 2020-06-09 19:03:06 +00:00
Joao Duarte
33b6059aab 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 18:00:33 +00:00
Joao Duarte
ecbc7aa150 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 16:59:10 +00:00
Joao Duarte
3248317eac upgrade google-java-format to 1.8 2020-06-09 16:58:36 +00:00
Joao Duarte
e5f1e613ef update log4j script routes definition
fixes the change introduced with https://issues.apache.org/jira/browse/LOG4J2-2647
2020-06-09 13:26:30 +00:00
Joao Duarte
216fa60b23 update log4j dependency to 2.13.3 2020-06-09 13:26:30 +00:00
Joao Duarte
8b44f37a06 update commons-codec to 1.14 2020-06-09 13:26:30 +00:00
Rob Bavey
2deb5c02ad Fix prepare_offline_spec.rb test
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.

Fixes #11933
2020-06-08 15:22:42 +00:00
Rob Bavey
ace1dd1318 [7x backport] Escape test fixture service scripts
Backport of #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 '&&'

This commit deviates from the original commit by not setting @setup_script
and @teardown_script variable with the Shellwords escape, as this was removed
in a subsequent commit (#11944)
2020-06-08 07:50:52 -07:00
Rob Bavey
20a30f823a 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 14:36:31 +00:00
Andres Rodriguez
efc31ff842 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 12:17:19 -07:00
Karen Metts
3fcd117b84 Doc:Add section to security docs for API keys 2020-06-05 18:17:06 +00:00
andsel
8b6c524702 better specification of the behaviour of in operator in various contexts 2020-06-05 15:18:19 +00:00
andsel
d4e82663f6 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 14:49:51 +00:00
andsel
24d60b81c2 Exposed again the pipelines queue.data and queue.capacity subdocuments for _node/stats
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.

Fixes #11970
2020-06-05 13:39:08 +00:00
andsel
f3f6ca049f 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

Fixes #11970
2020-06-05 13:39:08 +00:00
andsel
326b1c1ed1 Pass FEATURE_FLAG as Docker environment variable
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.

Fixes #11970
2020-06-05 13:39:08 +00:00
Andres Rodriguez
709602d9c0 [7x backport] 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-05 06:34:29 -07:00
Rob Bavey
4ab9e9c4f0 [7x backport] 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

Backport of #11971
2020-06-05 06:34:29 -07:00
Rob Bavey
e810f96e6a Use BUILD_JAVA_HOME FOR JAVA_HOME in xpack integration tests 2020-06-04 14:33:51 +00:00
Karen Metts
a278276ecf
Forwardport: Add 7.7.1 release notes to 7.x branch (#11964)
Forwardports #11954 to 7.x
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2020-06-03 11:58:20 -04:00
Colin Surprenant
5e62c96c19
add support for api_key authentication in xpack management and monitoring. (#11953)
7.x backport of #11864
2020-06-03 10:57:36 -04:00
Rob Bavey
fa75ac2780 Disable flaky multiReceiveRecordsDurationInMillis test
Relates #11956
2020-06-02 21:00:43 +00:00
Rob Bavey
85e5057788
[7.x backport] Fix service script execution when path includes && (#11944) (#11948)
Backport of #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-02 10:45:01 -04:00
Colin Surprenant
94f282c880 display Java pipeline initialization time
Fixes #11749
2020-06-01 20:23:04 +00:00
Rob Bavey
b28fa3e7df Set beats permission checking to strict=false
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.

Fixes #11949
2020-06-01 18:40:41 +00:00
Rob Bavey
1ed6523e83 Fix typo
Fixes #11942
2020-05-29 16:46:52 +00:00
Rob Bavey
8cce2091d3 Switch 'no nc' port checker to ruby
Use ruby to test for port, rather than just sleeping

Fixes #11942
2020-05-29 16:46:52 +00:00
Rob Bavey
e4a5134760 Enable fallback to sleep if nc not installed
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 sleep if `nc` is not available - it is not installed
on Jenkins centos worker nodes.

Fixes #11942
2020-05-29 16:46:52 +00:00
Rob Bavey
b2da4449a5
Use task avoidance API in gradle scripts (#11914) (#11943)
* 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 11:52:01 -04:00
Joao Duarte
aeb46de6cc emit deprecation entry for netflow and azure modules
point users towards the beats modules instead
2020-05-29 14:43:40 +00:00
Andrea Selva
c5b6a853d6
Introduced JDK environment variable to explicitly pass the JAVA_HOME to use and defined .ci/ with OS and JDK preferences (#11934) 2020-05-27 16:48:39 +02:00
Rob Bavey
84dd62a0a1 Ignore flaky testTimeCallable test
Flaky test issue #11925
2020-05-26 17:28:17 +00:00
Rob Bavey
ffcba6faf9 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 14:19:56 +00:00
Karen Metts
1c4df35e0c 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-19 00:28:45 +00:00
Karen Metts
24987d4fdd Doc:Add deprecation notice for azure module 2020-05-18 22:39:42 +00:00
Joao Duarte
881099c39f 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
ecdf8715e7 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
Karol Bucek
1cc1ce390a 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
Karen Metts
b3fd033e27 Doc:Expand and clarify guidance for jvm settings
Change fixed heap size recommendation to a percentage.
Note that large configs may require more stack space

Fixes: #11605 #11842

Fixes #11867
2020-05-06 21:39:49 +00:00
Joao Duarte
f31d9193c3 bump version to 7.9.0 2020-05-06 10:23:50 +01:00
Karen Metts
2217e34783 Doc:Rename internal collection to legacy collection
Fixes #11858
2020-05-05 17:42:24 +00:00
Joao Duarte
18f1444316 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
Karen Metts
4b8797bd9f
[doc] missing role for config management integration (#10341) (#11856)
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>

Co-authored-by: Edu González de la Herrán <25320357+eedugon@users.noreply.github.com>
2020-04-30 14:28:30 -04:00
Rob Bavey
8f142fc8bc 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
Rob Bavey
ba78c05e0d
[7.x] Backport JDK Unit Testing Matrices (#11839)
* Defined the versions of JDK to use in test build separated by OS (#11768)

* Added JDK 11 and 14 to Unix testing matrix (#11801)

- OpenJDK14 AdoptOpenJDK11 Zulu11
- OpenJDK14 AdoptOpenJDK14 Zulu14

Close #11801

Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
2020-04-28 09:31:57 -04:00
Rob Bavey
51431af405 Added warning message if OperatingSystemMXBean not available
Also corrected spacing after code review comments.

Fixes #11786
2020-04-24 14:39:54 +00:00
Rob Bavey
caa40036bc 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.

Fixes #11786
2020-04-24 14:39:54 +00:00
Colin Surprenant
62154e0ad6 depend on the elasticsearch output plugin >= 10.4.2
Fixes #11830
2020-04-23 17:59:11 +00:00
Colin Surprenant
770d9b2719 remove plugin internal validation call
Fixes #11818
2020-04-23 17:44:19 +00:00
Joao Duarte
c73544f1ed reinstate x-pack.monitoring settings in logstash.yml 2020-04-23 09:38:48 +01:00
Karen Metts
65bca0ca6c Review comments
Fixes #11823
2020-04-22 20:51:02 +00:00
Karen Metts
cbc6209b75 Remove new internal collection
Fixes #11823
2020-04-22 20:51:02 +00:00
Karen Metts
5dbe95bfae Incorporate review comments
Fixes #11823
2020-04-22 20:51:02 +00:00
Karen Metts
cf890d0df7 Add experimental tags for internal collection
Fixes #11823
2020-04-22 20:51:02 +00:00
Karen Metts
beec172e22 Remove known issue
Fixes #11825
2020-04-22 17:44:59 +00:00
Ry Biesemeyer
252b711184 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
Karen Metts
3fbe846b8b
[Doc]Release notes: Add known issue for monitoring settings (#11816) (#11821)
* Add known issue for monitoring settings

* Incorporate review comments
2020-04-21 13:42:57 -04:00
Joao Duarte
c0db7f4350 dont use qualifier or snapshot in logstash core version
Fixes #11813
2020-04-21 16:50:58 +00:00
André Letterer
3962b05aca Update benchmark.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
5a0e10b2a8 Update pqrepair.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
9198afd368 Update pqcheck.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
6bbf54ab43 Update benchmark.bat
Fixes #11754
2020-04-21 16:36:26 +00:00
André Letterer
ba89b217e5 tools convert to batch files (#11753)
Fixes #11754
2020-04-21 16:36:26 +00:00
Ry Biesemeyer
e06d2195d0 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
59e4ac8b86 add proxy support (central management & monitoring)
Fixes #11799
2020-04-20 13:35:36 +00:00
Rob Bavey
33efbf3871 Update kafka version for integration tests.
Fixes #11806
2020-04-17 21:00:07 +00:00
Karen Metts
8b223093cb
Release Notes for 7.7 (continued) (#11762) (#11805)
* [WIP] Release notes for 7.7.0

Co-Authored-By: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2020-04-17 16:41:35 -04:00
Karen Metts
da7de67ed7 More review comments
Fixes #11789
2020-04-16 21:06:04 +00:00
Karen Metts
7b68aee7f3 Incorporate review comments
Fixes #11789
2020-04-16 21:06:03 +00:00
Karen Metts
b67ffceb53 Doc updates for internal collectors
Fixes #11789
2020-04-16 21:06:03 +00:00
Karol Bucek
ee2d819d44 Fix: cloud_id not propagating from monitoring config
Fixes #11800
2020-04-16 18:52:42 +00:00
Joao Duarte
21b1ef531e add rootProject.name
Fixes #11400
2020-04-15 14:55:35 +00:00
Joao Duarte
54f5ac14f3 update guava and httpclient dependencies
Fixes #11791
2020-04-15 13:49:54 +00:00
Karen Metts
28ae8fa21f Add redirects page
Fixes #11790
2020-04-15 13:45:04 +00:00
Karen Metts
6eebf24d50 Fix typo in pipeline ordered description
Fixes #11763
2020-04-14 21:39:20 +00:00
Karen Metts
dfe5cc5ee7 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>

Fixes #11787
2020-04-14 20:12:28 +00:00
Rob Bavey
ba7fd0cedc Handle Boolean Edges
Fixes #11779
2020-04-13 20:09:27 +00:00
Rob Bavey
2e545c75e4 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
a8fca3c07f 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

Fixes #11782
2020-04-13 20:00:48 +00:00
Karen Metts
73a8808b19 Update description in logstash.yml
Fixes #11771
2020-04-13 18:44:59 +00:00
Karen Metts
3b4dd6c5ac Note that unit qualifier is required for config.reload.interval
Fixes #11771
2020-04-13 18:44:59 +00:00
Rob Bavey
c00c3da95a Incorporate review comments
Fixes #11777
2020-04-13 14:11:07 +00:00
Rob Bavey
d33195750e Fix hard coded constraint on pipeline name for metrics
Fixes #11777
2020-04-13 14:11:07 +00:00
Joao Duarte
a6c92efef4 remove :cluster_uuids gauge
Fixes #11628
2020-04-13 08:36:32 +00:00
Ry Biesemeyer
f2701dc703 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
Joao Duarte
085868595f release notes script add version in plugin entries
Fixes #11769
2020-04-09 12:55:57 +00:00
João Duarte
deeede9824 update benchmark cli dependencies (#11766)
also use jackson version in benchmark-cli from versions.yml
2020-04-08 14:55:59 +01:00
Rob Bavey
0eb2f54de2
Update gradle version to 6.3 (#11742) (#11761)
* Backport of #11742. Not a clean backport as 7.x had not previously been upgraded to 5.6.4 as master had been.

* 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-08 09:00:34 -04:00
Karen Metts
9b732a2cbe Incorporate review comments
Fixes #11716
2020-04-03 17:02:23 +00:00
Karen Metts
0a4aa8b491 Add guidelines for setting jvm heap size
Fixes #11716
2020-04-03 17:02:23 +00:00
Colin Surprenant
f4b9349145 simplify batch classes, do not compute JE empty batches, refactor RE worker loop (#11746)
7.x clean backport or #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:29:37 -04:00
Luca Belluccini
bd7d5b9b0f Better wording thanks to Andrea Selva
Fixes #11685
2020-04-01 13:09:13 +00:00
Luca Belluccini
9d789292f3 Clarify behavior in case of PQ full & isolator pattern
Fixes #11685
2020-04-01 13:09:13 +00:00
Karol Bucek
d56a0739dc 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
Rob Bavey
85f0f87a31 Update to release notes based on review
Fixes #11705
2020-03-30 19:08:31 +00:00
Rob Bavey
448c9c6533 7.6.2 Release notes
Fixes #11705
2020-03-30 19:08:31 +00:00
Colin Surprenant
0aae62ace2
separate filter & output execution, rebatch after filter when ordered (#11726)
7.8 clean backport of #11710
2020-03-30 10:49:22 -04:00
Karol Bucek
baf60a9840 Updated: JRuby to 9.2.11.1
Fixes #11723
2020-03-26 11:35:02 +00:00
andsel
e77a2985c3 Start dev cycle for 7.8.0
Fixes #11719
2020-03-25 13:15:03 +00:00
Karen Metts
1c964a27a5 Expand section on force reloading config
Fixes #11699
2020-03-18 13:12:33 +00:00
Colin Surprenant
758bc5c620
support quoted plugin option key (#11693)
7.7 clean backport of #11688
2020-03-16 16:58:56 -04:00
andsel
ae3002d7d4 minor, used the correct placeholder
Fixes #11691
2020-03-16 16:35:04 +00:00
Mark Ramotowski
81a96546d3 Fixed typo in guage metric of unknown type log.
Fixes #11689
2020-03-16 09:19:28 +00:00
j-yama
ff471bbb97 Add sudo into the rpm import of GPG-KEY
Fixes #11684
2020-03-16 06:54:02 +00:00
Andres Rodriguez
89aaebb61b
Revert "Adaptations to internal collector to send data directly to monitoring cluster Close 11573 (#11641)" (#11687)
This reverts commit 7116d39b9f.
2020-03-13 12:07:45 -04:00
Andrea Selva
7116d39b9f
Adaptations to internal collector to send data directly to monitoring cluster Close 11573 (#11641)
Added check on HTTP server before asking for monitoring data in unit test
Fixes #11541
2020-03-13 11:16:24 -04:00
andsel
d90616fdee Added clarification that configuration force reload doesn't work on WinOS
Fixes #11520
2020-03-13 08:40:47 +00:00
Karen Metts
c731596c7c Change default threads for azure module
Fixes #11664
2020-03-12 22:36:07 +00:00
Joao Duarte
b19db959af ensure mavencentral is always used before plugins.gradle.org
Fixes #11682
2020-03-12 12:04:54 +00:00
andsel
d901616373 Adaptations to internal collector to send data directly to monitoring cluster Close 11573 Added check on HTTP server before asking for monitoring data in unit test Fixes #11541
Fixes #11641
2020-03-12 09:25:38 +00:00
Karen Metts
8c11a95f9f Update troubleshooting.asciidoc
Fixes #11545
2020-03-11 14:23:47 +00:00
andsel
0a88578ef1 Removed errored CLI flag description
Fixes #11545
2020-03-11 14:23:47 +00:00
andsel
d057e8bae0 Minor, added suggestion to switch on the log per pipeline
Fixes #11545
2020-03-11 14:23:46 +00:00
Karen Metts
7549824fcb Add tips for troubleshooting a pipeline
Fixes #11545
2020-03-11 14:23:46 +00:00
João Duarte
1fc169b7f6 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:54:32 +00:00
Kris Reberger
4412073adf 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
9ef44b4c16 Wording tweak for more emphasis
Fixes #10717
2020-03-10 21:22:03 +00:00
Ryan Earle
f06b66db83 Update logging.asciidoc
Fixes #10717
2020-03-10 21:22:03 +00:00
meshkov
a2ebac33ca Update offline-plugins.asciidoc
Fixes #10912
2020-03-10 21:02:33 +00:00
Jonathan Bride
d02e957718 Fix grammar in enable_metric filter option
Description was a run-on sentence, so split into two.

Fixes #10841
2020-03-10 19:30:58 +00:00
0xflotus
14a504f7b1 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
16e5f6280b 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
e64c6f3129
Backport changes from 11544 (#11665) 2020-03-06 18:20:59 -05:00
Karol Bucek
ce4493653c 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
229487c38e
[DOCS] Updates security API examples (#10752) (#11660) 2020-03-05 16:56:59 -08:00
Karol Bucek
b7a5f76859 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
d3d765a455 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
Karol Bucek
7706866fb0 Fix: broken --help due sinatra 2.x upgrade
Fixes #11634
2020-03-03 21:00:10 +00:00
João Duarte
593235c162 Update rack dependency on docgen project
Fixes #11644
2020-03-03 13:57:35 +00:00
Joao Duarte
c00362868f Update release notes for 7.6.1
Fixes #11631
2020-03-03 10:45:27 +00:00
andsel
1ce7e6915b Fixes JDK13's javadoc build failure
Fixes #11642
2020-03-03 09:58:37 +00:00
andsel
b3c85356b0 Changed the xpack metrics pipeline to use a customized ES output plugin to put document_type for /_monitoring, closes #11312 Backport commit to 7.x Fixes #11321
Fixes #11640
2020-02-28 13:57:31 +00:00
Karol Bucek
de95de3ae5 remove TODO from CONTRIBUTING notes
Fixes #11638
2020-02-27 17:31:00 +00:00
andsel
43213410ff Fixes #11598 enabling the users to use completely commented config files
Fixes #11615
2020-02-27 09:43:06 +00:00
Karen Metts
17c11508da Remove deprecation notices
Fixes #11624
2020-02-26 20:00:38 +00:00
Karen Metts
5587c9d7ac Make capitalization consistent
Fixes #11629
2020-02-26 19:32:41 +00:00
lcawl
239e9b0c32 Fixes out-dated monitoring links
Fixes #11629
2020-02-26 19:32:41 +00:00
Karen Metts
9361638b27 Add shared attribute for cloud trial
Fixes #11621
2020-02-26 18:51:16 +00:00
Karen Metts
ca635975c3 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:13 +00:00
andsel
496f81c8ca 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
91e96b1f2e Rework ls netflow module deprecation notice
Fixes #11600
2020-02-19 16:28:39 +00:00
Karen Metts
55410efccf Fix setting name for monitoring
Fixes #11597
2020-02-12 20:05:00 +00:00
Rob Bavey
9d6fa3215d Release notes for 7.6.0
Fixes #11579
2020-02-11 13:51:34 +00:00
Karol Bucek
f86bf36914 Review: more places for RUBY.getCurrentContext()
Fixes #11587
2020-02-10 17:41:09 +00:00
Karol Bucek
2511347dfa Review: more consistent getCurrentContext()
Fixes #11587
2020-02-10 17:41:09 +00:00
Karol Bucek
8461a590a6 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
e070af8e43 Adding plugin.id to docker images
Fixes #11593
2020-02-10 16:22:21 +00:00
Colin Surprenant
72b5f295ce
revert #11482 and fix redundant code generation (#11576)
7.7 backport of #11564
2020-02-07 17:23:50 -05:00
Karen Metts
4ff6378c00 Clarify wording and add to another page
Fixes #11588
2020-02-06 18:01:26 +00:00
Karen Metts
e8ffadc029 Add Apple notarization info
Fixes #11588
2020-02-06 18:01:26 +00:00
Karen Metts
07c4d9d52e Remove module-only disclaimer for cloud id
Fixes #11469
2020-02-04 19:38:26 +00:00
Spencer Niemi
52327f80f9 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
Joao Duarte
98990384ae add missing NOTICE.txt 2020-01-31 14:07:39 +00:00
João Duarte
03ec792308 update licenses for 7.x (backport of #11549) 2020-01-31 13:50:17 +00:00
Dan Hermann
cb4369b2a9 Ignore versions in dependency license checker 2020-01-31 12:42:21 +00:00
Joao Duarte
f12eb2f28a fail license report job on missing licenses
Fixes #11554
2020-01-31 12:36:41 +00:00
tbotalla
80cd89673d Fix missing " on glob pattern
Fixes #11551
2020-01-30 16:16:56 +00:00
Karen Metts
52f7946958 Add deprecation notice to internal collectors for monitoring
Fixes #11526
2020-01-29 22:35:38 +00:00
Karen Metts
f94f72a79e Add details about pipeline.workers
Fixes #11474
2020-01-29 19:28:26 +00:00
Colin Surprenant
6a8bebffe6
add support for pipeline.ordered setting for java execution (#11552)
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:05:47 -05:00
Karen Metts
5cbc9eeb47 Add info about deprecation logger support mixin
Fixes #11486
2020-01-29 17:18:46 +00:00
andsel
6a412f7afd Added precation notice when internal monitoring collector is used. Closes #11346
Fixes #11511
2020-01-27 15:06:46 +00:00
Joao Duarte
a2044fb5f1 ensure lock template is in docker tasks
Fixes #11539
2020-01-27 09:48:37 +00:00
andsel
23c7f48aad Updated README to document how to run single Ruby specs
Fixes #11536
2020-01-27 09:47:34 +00:00
andsel
ca89cfee75 Added section for monitoring.cluster_uuid
Fixes #11538
2020-01-27 08:14:15 +00:00
Mike Place
d2a094629c 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
7a22220467 Added plugin.id to fish tag log lines related to plugins
Fixes #11078
2020-01-23 15:33:31 +00:00
Rob Bavey
8c3ae7e157 Updated release notes after code review comments
Fixes #11507
2020-01-21 15:45:59 +00:00
Rob Bavey
5a14aa8509 Release notes for 7.5.2
Fixes #11507
2020-01-21 15:45:59 +00:00
Joao Duarte
6f5101d60f pin google-java-format back to 1.1 for licensing reasons
Fixes #11515
2020-01-17 13:16:54 +00:00
Rob Bavey
994ebf81e3
Bump to 7.7.0 (#11505) 2020-01-15 09:28:58 -05:00
Colin Surprenant
1b605e3042 start inputs only when all WorkerLoop are fully initialized (#11492) 2020-01-14 15:48:38 -05:00
Karol Bucek
3a1194edc5
Feat: x-pack cloud id/auth for monitoring/management (#11496)
resolves #11488
2020-01-14 21:35:32 +01:00
andsel
8367abb6cd Changed plugin factory creation to use SourceWithMedata and not destructured line and column
Fixes #11456
2020-01-14 16:57:51 +00:00
Rob Bavey
b846a0fdb8 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
Karen Metts
ed08e4f362
[Doc] Release notes 7.5.1 (#11448) (#11495)
* Created release notes for release 7.5.1

* Removed deleteable part

* Updated with formatting changes and minor additions

* Added more info about grok filter update

* Change link format from md to asciidoc

* Update docs/static/releasenotes.asciidoc

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Update docs/static/releasenotes.asciidoc

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Update docs/static/releasenotes.asciidoc

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Update docs/static/releasenotes.asciidoc

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Update docs/static/releasenotes.asciidoc

Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Incorporate review comments
2020-01-13 17:02:00 -05:00
Colin Surprenant
fc152d3561
[7.6 clean backport of #11482] cache compiled datasets (#11491) 2020-01-13 12:57:56 -05:00
Karol Bucek
c7a4f30145 Test: try to deal with (potentially) flaky spec
Fixes #11483
2020-01-13 10:22:01 +00:00
Rob Bavey
60a7cd1de2 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
f06c5ef806 Replace references to JDBC plugins with integration plugins
Fixes #11406
2020-01-10 19:07:54 +00:00
Rob Bavey
3eb5f94f29 Update JrJackson and jackson deps
Fixes #11478
2020-01-09 19:45:59 +00:00
Karol Bucek
97b2273b39 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
ded1749e76 Test: get_thread_id (native thread being gc-d)
Fixes #11458
2019-12-30 13:04:17 +00:00
Karol Bucek
fd36783d4f 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:17 +00:00
Karol Bucek
32c306f28f Refactor: minor one sub-stitution should do
Fixes #11458
2019-12-30 13:04:17 +00:00
Karol Bucek
51de4c2674 Refactor: we're always on JRuby these days
(other part of same method assume JRuby already)

Fixes #11458
2019-12-30 13:04:17 +00:00
Karol Bucek
fa199fe1ec Test: Java proxied QueueReadClient unwrapping
Fixes #11391
2019-12-22 22:06:08 +00:00
Karol Bucek
9d497a13f2 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
6ee050fda6 Test: a lengthy real-world cloud-id test
Fixes #11435
2019-12-12 21:12:30 +00:00
Karol Bucek
8ccf78ab3e Fix: handle cloud-id with an empty kibana part
fixes GH-10747

Fixes #11435
2019-12-12 21:12:30 +00:00
Colin Surprenant
c69e61fd2f 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
8fd34b0681 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:02:21 +00:00
andsel
c7d786e46d Changed the deletion of log files to use retry mechanism and avoid flaky errors on Windows builds (related to #11307)
Fixes #11387
2019-12-12 16:01:44 +00:00
Joao Duarte
6bf0c93567 remove use of thread.exclusive in plugin_metadata.rb
Fixes #11388
2019-12-10 19:43:29 +00:00
Joao Duarte
df3abef89f introduce enterprise license level
Fixes #11407
2019-12-10 12:31:16 +00:00
Joao Duarte
25a0ecddac 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
Karen Metts
f3a24217c2 Remove ref to encrypted communications
Fixes #11398
2019-12-06 14:49:11 +00:00
Joao Duarte
d9cd2bdce2 setup jruby and bundler/rake before artifact rake tasks
Fixes #11392
2019-12-04 19:36:24 +00:00
João Duarte
4c57f52d8c 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
fdf6b1c203 Add default edit_links to pages
Fixes #11384
2019-12-03 19:44:32 +00:00
Lisa Cawley
508a33523d
[DOCS] Replaces occurrences of xpack-ref (#11366) (#11379) 2019-12-03 08:59:14 -08:00
Rob Bavey
bd66db544a 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
6d776f3652 Changed: base-line JRUBY_OPTS to default to --dev
Fixes #11355
2019-12-03 10:51:44 +00:00
Karol Bucek
dfa8ea719f 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
ba51feea21 Build: fix bundle bin path in bundler task
follow-up on d65f78728b

Fixes #11381
2019-12-03 10:37:51 +00:00
Karen Metts
1b995d7d96 Release notes 7.5.0 refined
Fixes #11323
2019-12-02 15:23:41 +00:00
Joao Duarte
6842aba9eb stop installing rake and json on every bootstrap
Fixes #11102
2019-12-02 14:59:43 +00:00
Karol Bucek
16c085588f 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
1431df892f Incorporate review comments
Fixes #11331
2019-11-27 15:55:10 +00:00
Karen Metts
22871cc19f Add plugin integrations to doc
Fixes #11331
2019-11-27 15:55:10 +00:00
João Duarte
62cc9afa8d bump sinatra and rack to 2.x (#11354) 2019-11-27 15:10:50 +00:00
lcawl
b7f79ac52b Fixes monitoring link
Fixes #11341
2019-11-26 17:24:38 +00:00
João Duarte
b81c900b5b 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:29 +00:00
andsel
17fe14c086 Changed GemInstaller to don't blank gemspec attribute, close 11325
Fixes #11340
2019-11-26 11:27:08 +00:00
Colin Surprenant
27b7179389 support remove_field on metadata and tests
Fixes #11334
2019-11-25 21:29:00 +00:00
Joao Duarte
94b93af754 remove leftover jruby version check in spec file
Fixes #11333
2019-11-21 13:46:14 +00:00
Colin Surprenant
03f9cc9f49 remove JRuby resolv.rb patch following fix in 9.2.9.0
Fixes #11330
2019-11-21 09:59:18 +00:00
Joao Duarte
6346d03f6d update jruby to 9.2.9.0
Fixes #11281
2019-11-21 09:36:29 +00:00
Ry Biesemeyer
fc5d39c682 docgen: add integration plugins for plugin discovery
Fixes #11315
2019-11-20 22:02:59 +00:00
Ry Biesemeyer
5aa8c70683 docgen: no-op refactor bringing plugin types list out of regexp
Fixes #11315
2019-11-20 22:02:59 +00:00
Logstash Machine
189c2c222f Release notes for 7.4 (#11163 #11229 #11282)
* Release notes for 7.4.0
* Release notes for 7.4.1
* Release notes for 7.4.2

Fixes #11326
2019-11-20 15:15:14 +00:00
andsel
17f584a847 Fixed: avoid touch of log files before deleting it (issue #11307)
Fixes #11311
2019-11-19 15:02:51 +00:00
Dan Hermann
764589e2ca correct directory for versions.yml file
Fixes #11318
2019-11-19 14:36:01 +00:00
Karen Metts
e7d87d0da8 Remove xls settings page
Fixes #11319
2019-11-18 22:57:56 +00:00
Karen Metts
4654b60507 Restructure configuration content
Fixes #11310
2019-11-18 20:39:46 +00:00
andsel
9b308ae673 Introduced DeprecationLogger for use in core code and exposed to Java and Ruby plugins. Closes 11049
Fixes #11260
2019-11-14 10:49:28 +00:00
amitav.mohanty
3dd117a345 Mention the path of DLQ to indicate DLQ if full for which pipeline
Fixes #11280
2019-11-13 15:54:52 +00:00
Joao Duarte
81e7b18b25 don't rely on expect match and last_match in qa test
Fixes #11273
2019-10-31 09:14:07 +00:00
Joao Duarte
1f14cba3e3 dont mutate SETTINGS object in keystore specs
Fixes #11270
2019-10-25 14:18:33 +00:00
Joao Duarte
382f6d76dd remove logging setting in cgroup_spec.rb
Fixes #11271
2019-10-25 10:24:28 +00:00
Joao Duarte
6bf1ed932c 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
5b5e479725 Remove edit_me link overrides for monitoring topics
Fixes #11259
2019-10-23 13:49:49 +00:00
João Duarte
4fd33e40aa Update logstash-core/build.gradle
Fixes #11103
2019-10-23 13:14:39 +00:00
Joao Duarte
743723bf96 update jar dependencies
Fixes #11103
2019-10-23 13:14:39 +00:00
Joao Duarte
afe4f8189d update core jars. remove dependency on org.eclipse
Fixes #11103
2019-10-23 13:14:39 +00:00
Joao Duarte
1c874854d9
upgrade puma to 4.x 2019-10-22 11:56:18 +01:00
Joao Duarte
bb4b62d06e 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
382baf4016 Fixes links to Stack Overview
Fixes #11239
2019-10-18 18:19:49 +00:00
Joao Duarte
b9039dcb57 ensure output of plugin list is utf8
Fixes #11246
2019-10-18 16:52:51 +00:00
João Duarte
e22868db52 Disable dlq integration tests due to multiple intermittent failures
Fixes #11244
2019-10-18 16:09:25 +00:00
andsel
331e8678c1 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
0a89c4cee2 validate plugin list output respecting integration plugins
Fixes #11240
2019-10-18 08:54:33 +00:00
Karen Metts
2d868cfb65 Fix typo in doc-for-plugin
Fixes #11232
2019-10-17 16:05:05 +00:00
Joao Duarte
472d333ad9 more resilient testing of logging level setting
Fixes #11230
2019-10-17 13:04:14 +00:00
andsel
391169b3d7 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
João Duarte
f63c6234ba
bump to 7.6.0 (#11224) 2019-10-16 15:25:33 +01:00
Ry Biesemeyer
1cf8a7b8d4 plugins: replace kafka input/output with integration
Fixes #11218
2019-10-16 01:46:49 +00:00
Ry Biesemeyer
5a8cef4e8f plugins: replace rabbitmq input/output with integration
Fixes #11218
2019-10-16 01:46:49 +00:00
Ry Biesemeyer
d278efda40 doc: replace unicode non-breaking hyphen U+8211 with ASCII hyphen
Fixes #11217
2019-10-15 18:37:41 +00:00
Ry Biesemeyer
08fd76ab30 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
138e1f91e5 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
96dfeb5016 add tasks for generating config parsers
Fixes #11195
2019-10-15 16:54:48 +00:00
Sachin Frayne
a9def1e108 syntax fix
Fixes #11220
2019-10-15 11:07:14 +00:00
João Duarte
a6f02a3826 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
afcb045774 Update .ruby-version to jruby-9.2.8.0
Fixes #11198
2019-10-11 07:57:21 +00:00
Karen Metts
f48b261af9 Update reference to last 6.x version to be 6.8
Fixes #11200
2019-10-10 17:07:33 +00:00
Joao Duarte
8d19b5f078 handling missing gems during generatePluginsVersion
Fixes #11207
2019-10-10 13:28:17 +00:00
João Duarte
15f0de3487 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
32b831010b Add remaining review comments from #11033
Fixes #11197
2019-10-09 19:50:51 +00:00
andsel
3db93d5ebd Added section in logstash.yml documentation to describe feature
Fixes #11177
2019-10-08 14:13:26 +00:00
andsel
fc9c0e0ca2 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:18 +00:00
Jason Tedor
0d6bb46edc 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:01:50 +00:00
Karen Metts
9c9266fe3a
Add metricbeat as monitoring option (#11190)
Restructure content

Restructure source files

Incorporate review comments

Incorporate more review comments and fix links
2019-10-03 20:06:28 -04:00
Andrew Siegman
70c38b5965 clarify: config.reload.interval is seconds
Fixes #11180
2019-10-03 21:55:26 +00:00
Lisa Cawley
fc0db0d955
[DOCS] Fixes links to monitoring content (#11166) (#11172) 2019-09-30 10:19:35 -07:00
Rob Bavey
dfb3cb5a34 Update version of jrjackson
0.4.10 includes multi-threading improvements

Fixes #11164
2019-09-26 13:21:41 +00:00
João Duarte
a91e3b6bed
Backport release notes to 7.x (#11160)
* Release notes for 7.2 (#10863)

* 7.2.1 Release notes (#10959)

* Add coming tag to 7.2.1 release notes (#10968)

* Updated release notes for 7.2.1 (#10996)

* Release notes 7.3.0 (#10993)

* Release notes for 7.2 (#10863)

* add release notes for 7.3.0

* Fix link formatting

* Release notes draft for 7.3.1 (#11038)

* Release notes draft for 7.3.2 (#11128)

* Update release notes for 7.3.2

* Update releasenotes.asciidoc
2019-09-24 18:39:18 +01:00
Karen Metts
3e7ec18e31 Add note about illegal reflective access
Fixes #11152
2019-09-19 20:56:56 +00:00
Joao Duarte
0953ad9291 remove mention of pipeline to pipeline being Beta
Fixes #11150
2019-09-19 10:05:19 +00:00
Karen Metts
975ef25a8b Deprecate LS Netflow module and point to FB Netflow module
Fixes #11113
2019-09-16 18:49:22 +00:00
Karen Metts
20c4d8639b
Update logstash to use shared version files (#11132)
Remove release-state info
2019-09-12 20:16:23 -04:00
Kuba Clark
30d3865dcc Fixed links in contributing-to-logstash page
Fixes #11126
2019-09-12 21:32:34 +00:00
andsel
1cbaeebb4d Added origins of pipeline's configuration (es config string, the paths of config files used, module).
closes 9630

Fixes #11130
2019-09-12 15:08:20 +00:00
Pavel Zubkou
652e1b70ad Update link to Debugging Java Performance
Fixes #11084
2019-09-04 14:44:06 +00:00
Colin Surprenant
c12acff158 use 2048 bits key
Fixes #11115
2019-09-03 21:03:32 +00:00
Joao Duarte
5f5bbeed14 support substitutions in pipelines.yml file
Fixes #11081
2019-08-30 14:02:59 +00:00
Joao Duarte
cd91f9b2b3 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
João Duarte
9bedd9e097
bump 7.x to 7.5.0 (#11091) 2019-08-29 12:09:13 +01:00
Aarti Gupta
3093384705
Enhancements to Logstash Benchmarking Tool (#10253)
* Adding support for -
1. Custom Data Sets
2. Added heap used statistics to results
2019-08-29 11:40:31 +01:00
andsel
056c3e3bb8 Add pipeline.id to log lines fixes #8290, #10521
Fixes #11075
2019-08-29 10:36:05 +00:00
Mike Place
18ba98aa91
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-29 11:33:03 +01:00
Dan Hermann
3e99e1f203 Update Reflections library
Fixes #10951
2019-08-29 10:31:07 +00:00
Dan Hermann
5125e0729e Write generated Java files to disk only if debug flag is set
Fixes #11082
2019-08-28 14:24:13 +00:00
Peter Dyson
44f08e20c7 hint plugins need to be installed before bundle
Fixes #11080
2019-08-26 08:58:28 +00:00
Nik Everett
ea101cea00 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:56 -04:00
Dan Hermann
c75ef874ae Use correct execution engine for test-and-exit mode
Fixes #11067
2019-08-21 17:40:55 +00:00
Nik Everett
0e90733c84 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:10:13 -04:00
Dan Hermann
334b874beb Integration test for Java plugins
Fixes #11054
2019-08-20 19:22:06 +00:00
Rob Bavey
0f25107cde 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
fe6783b3cb 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:26:33 +00:00
João Duarte
accc636126 avoid variable collision in pipeline stats api (#11059)
Fixes #11062
2019-08-20 15:22:46 +00:00
amitav.mohanty
c2391b1849 Improved logging of version mismatch in DLQ file reader (RecordIOReader)
Fixes #11039
2019-08-16 12:50:23 +00:00
Dan Hermann
8f78612e93 fix javadoc warning
Fixes #11046
2019-08-13 21:18:25 +00:00
Dan Hermann
2375ae1b17 Expand config variables for Java plugins
Fixes #11043
2019-08-13 19:36:41 +00:00
Joao Duarte
085d93650e update jruby to 9.2.8.0
Fixes #11041
2019-08-13 06:45:58 +00:00
Rob Bavey
b2e8b0b6c4 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
Dan Hermann
d64e5a7853 support truthy eval of constants
Fixes #11032
2019-08-09 17:23:55 +00:00
Dan Hermann
4b5dc343ae fix compilation of [field] in [field] event conditions
Fixes #11026
2019-08-08 20:02:24 +00:00
Dan Hermann
120b6a7d04 add regex support for constant conditionals
Fixes #11017
2019-08-06 10:30:10 +00:00
Nik Everett
3293c22d2d Docs: Add more missing subs for asciidoctor (#10991)
Adds a few missing `[attributes="subs"]` clauses for asciidoctor.
2019-07-24 15:03:19 -04:00
Ry Biesemeyer
6810c19525 update Jinja2 docker dependency
Fixes #10986
2019-07-23 21:20:20 +00:00
Colin Surprenant
524dd45202 make sure joni regexp interruptability is enabled
Fixes #10978
2019-07-22 16:22:32 +00:00
Karen Metts
f474ecb9a9 Incorporate review comments
Fixes #10977
2019-07-22 14:12:28 +00:00
Karen Metts
bd5f84ab0c Prepare core plugin docs for inclusion in LS ref
Fixes #10977
2019-07-22 14:12:28 +00:00
DeDe Morton
3d00f3e648 Fix include path
Fixes #10969
2019-07-18 14:46:54 +00:00
Karen Metts
859b37fa62 Fix formatting for nested version attributes
Fixes #10949
2019-07-12 23:56:21 +00:00
Rob Waight
e4538fd692 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

Fixes #10946
2019-07-12 23:38:27 +00:00
Colin Surprenant
2f8be2caea
[7.x clean backport of #10934] logstash-input-twitter as a default plugin (#10953) 2019-07-12 16:52:16 -04:00
Rodrigo López Dato
b4f01e88fc 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
fe4b6ee308 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
Joao Duarte
072d33690c fix plugin version bump rake task
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.

Fixes #10947
2019-07-12 14:25:06 +00:00
Joao Duarte
534c267622 Cleanup gradle tasks and dependency installation
- 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.

Fixes #10942
2019-07-12 08:11:28 +00:00
João Duarte
ae409ca449 bump 7.x to 7.4.0 (#10932) 2019-07-03 14:06:57 -04:00
Joao Duarte
67bddcee12 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
5e8a694d59 simplify unit test
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
46c1611dff use method-level ensure blocks
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
1802869d80 remote != remove
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
e925b4c48d don't put nulls in the map
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
f48da1e461 add missing lock statement
Fixes #10872
2019-06-29 17:27:22 +00:00
Dan Hermann
0ff6d11344 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
d1e92862c3 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
7d206b78d1 Fix pipeline shutdown ordering
Fixes #10872
2019-06-29 17:27:22 +00:00
Karen Metts
ec07b43a53 Add java example plugins to skiplist
Fixes #10921
2019-06-28 16:15:15 +00:00
Dan Hermann
2e3254d832 docs for the Java UUID filter
Fixes #10859
2019-06-28 15:45:27 +00:00
Dan Hermann
241d8b68b1 docs for java_generator input
Fixes #10857
2019-06-28 15:44:30 +00:00
Dan Hermann
6669e2bd19 docs for java stdin input
Fixes #10858
2019-06-28 15:44:14 +00:00
Dan Hermann
82f3b3cb78 docs for java stdout output
Fixes #10866
2019-06-28 15:44:01 +00:00
Dan Hermann
f280f48f89 docs for Java sink output
Fixes #10867
2019-06-28 15:43:34 +00:00
Dan Hermann
df4ffd5890 docs for java dots codec
Fixes #10868
2019-06-28 15:43:20 +00:00
Dan Hermann
df7c7d07de docs for Java line codec
Fixes #10869
2019-06-28 15:43:06 +00:00
Dan Hermann
25b291e54e docs for Java plain codec
Fixes #10870
2019-06-28 15:39:11 +00:00
Mike Place
357ce1339d
Inject hash and ephemeral_id into stats (#10885) (#10918) 2019-06-28 10:19:50 +02:00
Joao Duarte
beb0a337f9 remove gcs output from skip list
Fixes #10919
2019-06-27 11:17:22 +00:00
Mike Place
ed57c5dc53 Inject hash and ephemeral_id into stats
Fixes #10885
2019-06-27 08:45:52 +00:00
Mike Place
20fc465510
Add workers and batch_size to root request (#10853) (#10910)
* Add workers and batch_size to root request

* Add batch delay per review recommendation
2019-06-26 23:14:14 +02:00
Mike Place
c918082617
Restore UUID lookup to node (#10884) (#10911)
* 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 23:05:33 +02:00
Mike Place
9a5faf24bf
Enhance GET _node/stats/pipelines API for Metricbeat monitoring (#10576) (#10909)
* 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-26 22:58:20 +02:00
Dan Hermann
d03c0f14a4 Remove debug code for p2p plus formatting
Fixes #10840
2019-06-25 18:31:37 +00:00
Dan Hermann
8a048ccc27 Do not shut down API webserver until after pipelines have been shut down
Fixes #10880
2019-06-25 18:30:20 +00:00
Dan Hermann
5e970fe578 remove the beta designation from the docs for Java plugins
Fixes #10891
2019-06-25 16:37:19 +00:00
Karen Metts
369f8e80d4 Add homebrew as installation option
Fixes #10874
2019-06-20 14:54:19 +00:00
Rob Bavey
48c581b6fd Add Logstash JMS input to the list of default plugins
Fixes #10865
2019-06-17 18:50:21 +00:00
Joao Duarte
f18992c647 avoid clashes between Environment class methods
Fixes #10860
2019-06-14 17:44:38 +00:00
Jeff
a1e806d2c5 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
b519dc1e1e fix parsing of boolean options provided to Java plugins
Fixes #10848
2019-06-07 19:54:08 +00:00
Ry Biesemeyer
b76ea1989e 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
9f30ea281f Remove note about j11
Fixes #10689
2019-06-05 18:18:39 +00:00
Florian Kelbert
58dbda45f3 Value of start_timestamp must to be quoted
Fixes #10836
2019-05-31 12:35:18 +00:00
Dan Hermann
8a2b7be327 plain codec for Java
Fixes #10791
2019-05-30 14:45:18 +00:00
Dan Hermann
6dd85ca2a8 Fixes unit test failures on some runs of ConfigCompilerTest::testComplexConfigToPipelineIR
Fixes #10837
2019-05-30 14:40:51 +00:00
Dan Hermann
8685d1d483 Merge config values in LIR
Fixes #10832
2019-05-30 12:59:09 +00:00
Joao Duarte
3d84827174 name rpm/deb oss packages as logstash-oss
Fixes #10833
2019-05-29 14:25:21 +00:00
Dan Hermann
78607d2bbb LIR support for octal literals in pipeline definitions
Fixes #10828
2019-05-28 16:51:03 +00:00
Joao Duarte
682c050f1e release notes for 7.1.1
Fixes #10830
2019-05-28 15:21:28 +00:00
Karen Metts
cac98642cd Release notes for 7.1.0 (#10796)
* Release notes for 7.1.0

* Add text/link for 7.1.0 security changes

* Tweaks to security info
2019-05-28 16:15:19 +01:00
Logstash Machine
2646be8d20 Release notes for 7.0.1 (#10705) 2019-05-28 16:15:16 +01:00
Joao Duarte
bd11485e0b 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
d03f0ea454 allow skipping docker artifacts during artifact:all
Fixes #10823
2019-05-27 13:57:07 +00:00
Joao Duarte
089f369033 generate tarballs for docker images
Fixes #10819
2019-05-24 15:09:27 +00:00
Karen Metts
ce0237b621
Update doc versions for 7.x (#10817) 2019-05-22 16:41:30 -04:00
Rob Bavey
016f7318de
Bump version to 7.3.0 (#10815) 2019-05-22 14:29:58 -04:00
Dan Hermann
2d35566ab2 Document copy semantics of QueueWriter::push method
Fixes #10808
2019-05-22 10:51:53 +00:00
Dan Hermann
9a06b204bf Provide DLQ writer interface to Java plugins
Fixes #10790
2019-05-22 03:38:44 +00:00
Karen Metts
c22edf07f6 Add structure for new windows topic
Added coming notice

Fixes #10809
2019-05-21 17:11:04 +00:00
Dan Hermann
822fef044f Default stack trace size to 50 and make it configurable
Fixes #10793
2019-05-21 15:42:06 +00:00
Dan Hermann
7c32f0fcf3
Expose Metrics API to Java plugins (#10761) (#10802)
Expose Metric API to Java plugins and migrate JavaCodecDelegator to new Metric API
2019-05-20 18:10:45 -04:00
Dan Hermann
5eb569719c
Include G1 in JVM heap metrics (#10728) (#10784) 2019-05-10 16:46:34 -05:00
Colin Surprenant
a0d05b4da7
fix JRuby resolv.rb leak (#10741) 2019-05-07 16:08:35 -04:00
Guy Boertje
1c64619ac0 Bump JrJackson to 0.4.8
Fixes #10748
2019-05-07 08:36:29 +00:00
Nik Everett
ba42075932 Remove two other newlines
Usually asciidoctor is ok with newlines like this but it doesn't like them in the definition list.

Fixes #10744
2019-05-06 19:10:01 +00:00
Karen Metts
c9846fc9c3 Tweaks to callouts
Fixes #10744
2019-05-06 19:10:00 +00:00
Karen Metts
f6723e7ca9 Remove return before callout defs
Fixes #10744
2019-05-06 19:10:00 +00:00
Karen Metts
ec74c231d6 Fix asciidoc formatting for conversion to asciidoctor
Fixes #10744
2019-05-06 19:10:00 +00:00
Dan Hermann
32934e6775 Clarify behavior of ensure_delivery flag
Fixes #10754
2019-05-06 12:33:13 +00:00
Joao Duarte
5e1dc1f6a3 fix javadoc warning for Codec.java
Fixes #10756
2019-05-06 08:35:08 +00:00
Dan Hermann
3fba3af9f9 * 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
Joao Duarte
735359c4c9
bump to 7.2.0 2019-05-01 19:16:10 +01:00
Nik Everett
0793bf1f5a [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 14:02:51 -04:00
Mike Place
5d64a61c21 Add snapshot field
Fixes #10589
2019-05-01 11:17:24 +00:00
Mike Place
27d0ecab96 hard-code status
Fixes #10589
2019-05-01 11:17:24 +00:00
Mike Place
d1c51f7d62 ephemeral id
Fixes #10589
2019-05-01 11:17:24 +00:00
Mike Place
98f0670223 Replicate change from java_pipeline to ruby pipeline
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
42bbdd78c9 Use pluginmetadata
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
dbea95111a Add options to pipelines/
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
592591bae9 Add graph?=true parameter
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
8fd6e58e78 Add cluster UUID
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
a8806b1d49 Fix spec path
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
a875d9e529 Remove commented code
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
4e5321a79a Implement review suggestions
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
d4a915be2b Style change to make code more vertical.
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
6bc3ba4804 Remove license and add encoding
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
06d50daf36 Update spec
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
9c0dc0fb69 Remove more commented code
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
0da3d0fb12 Remove commented code
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
30adb7a565 LIR serializer refactor
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
2dbe5c1bc9 Include node update
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
9d5bec9ef6 Add graph metrics
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
3428383b1e Fix incorrect hash id
Fixes #10561
2019-05-01 11:16:58 +00:00
Mike Place
fbd1908e3a Add ephemeral id and hash to pipeline stats
Refs #10119

Fixes #10561
2019-05-01 11:16:58 +00:00
Karen Metts
67aa145287 Correct links to LS Ref Guide
Fixes #10727
2019-04-30 22:54:31 +00:00
Karen Metts
e173ceb04e Note doc file created with plugin generation
Fixes #9861
2019-04-26 21:38:07 +00:00
Karen Metts
b83d8a0dee Incorporate review comments
Fixes #9861
2019-04-26 21:38:07 +00:00
Karen Metts
92dd9a932f Add guidelines for writing plugin doc
Fix link formatting

Fixes #9861
2019-04-26 21:38:06 +00:00
Rob Bavey
89be09907f 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
8d60ab5c4d Adds cleanup after shutdown of plugin
Fixes #10691
2019-04-26 13:15:46 +00:00
Rob Bavey
2e2a00270e Add methods to clear PluginMetadata repositories
Fixes #10691
2019-04-26 13:15:46 +00:00
Ry Biesemeyer
122adbd22e 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:46 +00:00
Dan Hermann
f9a5876b3c Clarify that Java codecs work only with Java inputs and outputs
Fixes #10716
2019-04-24 17:45:10 +00:00
urso
a44cb9ebf3 Rename filebeat.prospectors to filebeat.inputs
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.

Fixes #10711
2019-04-23 17:38:16 +00:00
Dan Hermann
14c7122702 Correction on Java execution in docs on command-line arguments
Fixes #10710
2019-04-23 17:14:28 +00:00
Joao Duarte
71d7b7c1fb
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:57:55 +01:00
Dan Hermann
96d2d59ab7 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
db80baf62c 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
Joao Duarte
de6ef0c04a moved to openjdk 11 in docker testing
- also fix javadoc warning when building on jdk11

Fixes #10563
2019-04-15 20:13:37 +00:00
Joao Duarte
97704dc35d properly exclude bundler 1.16.6
Fixes #10684
2019-04-12 21:30:27 +00:00
Joao Duarte
86cae08547 updated bundler to 1.17.3
Fixes #10685
2019-04-12 21:07:54 +00:00
Joao Duarte
62f8282a3b 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
f39e4a9446
download exact version artifact for release build otherwise download snapshot (#10664) 2019-04-11 22:24:51 +01:00
Jordan Johnson-Doyle
78ea83ec07 Inputs expect a NamespacedMetric, not the root metric instance
Fixes #10614
2019-04-11 13:10:17 +00:00
Jordan Johnson-Doyle
d332bc33aa Add tests for LogStash::Codec::Delegator
Fixes #10614
2019-04-11 13:10:17 +00:00
Jordan Johnson-Doyle
81f7e42195 Add tests for JavaCodecDelegator
Fixes #10614
2019-04-11 13:10:17 +00:00
Jordan Johnson-Doyle
b53e313202 Collect and expose metrics from Ruby codecs
Fixes #10614
2019-04-11 13:10:17 +00:00
Jordan Johnson-Doyle
4251550826 Collect and expose metrics from Java codecs
Fixes #10614
2019-04-11 13:10:17 +00:00
Dan Hermann
25158bdddd 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
lcawl
d1e41f3908 [DOCS] Removes coming tags 2019-04-10 08:57:51 -07:00
Karen Metts
f9e2f2369d Add links to particular breaking changes
Fixes #10668
2019-04-09 09:07:21 +00:00
Karen Metts
476e503936 Added core and plugin headings Combine plugins from alphas, betas, and rcs to make 7.0 release notes
Fixes #10667
2019-04-09 09:03:19 +00:00
Colin Surprenant
6851709041 add 7.0.0 rc1 and rc2 release notes (#10665)
Fixes #10665
2019-04-09 08:58:14 +00:00
Karen Metts
d4e6236dd7 Fix asciidoc formatting for links in release notes (#10665)
Added placeholders and coming label for 7.0.0

Add entry/link for 7.0.0 and clean up asciidoc

Fixes #10665
2019-04-09 08:58:14 +00:00
Colin Surprenant
12133e3a3d add 7.0.0 alpha1, alpha2 and beta1 release notes (#10665)
cleanup

plugins changes for alpha1, alpha2, beta1

Fixes #10665
2019-04-09 08:58:14 +00:00
Karen Metts
ce7e3107b1 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

Fixes #10666
2019-04-08 20:54:52 +00:00
Karen Metts
336ba7dfec Refine upgrade instructions for 7.0
Add recommendation to upgrade to 6.7 before 7.0

Fixes #10634
2019-04-08 18:33:25 +00:00
Lisa Cawley
6e0658fbf7
[DOCS] Adds tagged region for notable breaking changes (#10654) (#10661) 2019-04-08 09:09:34 -07:00
João Duarte
563fa8117c
work around jruby-5642 during package installation on jdk11 (#10658)
fixes #10593
2019-04-05 15:38:46 +01:00
João Duarte
aaac050098
prevent DeprecatedRemovedSetting from fatally stopping logstash (#10657) 2019-04-05 12:19:30 +01:00
Dan Hermann
30dd8243d2 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
3ce3b96e30 Handle duplicate config entries
Fixes #10619
2019-04-04 17:53:44 +00:00
Joao Duarte
6ed7b4bc5c disable docker img generation on artifact:all
Fixes #10647
2019-04-04 15:19:26 +00:00
Joao Duarte
a335f2e4b7 remove docker-compose symlink
Fixes #10645
2019-04-04 14:33:05 +00:00
João Duarte
0921798a71
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:31 +01:00
Dan Hermann
0c4fe62a6d Log successful shutdowns
Fixes #10628
2019-04-04 08:51:00 +00:00
Karen Metts
9827ba8bbb
Add note about issues with Java 11 and Debian or RPM (#10635) 2019-04-04 09:47:08 +01:00
Dan Hermann
6913e62a3b Call out requirement for Java execution in note
Fixes #10630
2019-04-03 16:22:13 +00:00
Karen Metts
f2b6fa35d4 Remove duplicate text
Fixes #10621
2019-04-03 14:12:56 +00:00
Karen Metts
3e0ac53e3a Removed note from earlier upgrade
Fixes #10621
2019-04-03 14:12:56 +00:00
Karen Metts
10301b40f7 Update instructions for 7.0 upgrade
Fixes #10621
2019-04-03 14:12:56 +00:00
Colin Surprenant
4bb036f68a eliminate unnecessary add of whitespace
Co-Authored-By: yaauie <yaauie@users.noreply.github.com>

Fixes #10623
2019-04-02 22:40:46 +00:00
Ry Biesemeyer
4a79246dd1 add DeprecatedSetting to ease 7.0 transition of xpack config renames
Fixes #10623
2019-04-02 22:40:45 +00:00
Yi Ou
863a0c44e0 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
07eb8ea005 Update Kafka version to fix build
Fixes #10608
2019-03-28 19:37:17 +00:00
Dan Hermann
1cda518c14 Update JRuby and Java prerequisites
Fixes #10604
2019-03-28 16:09:22 +00:00
Karen Metts
7bda524e2b Add note that pline-pline also supports files
Fixes #10590
2019-03-27 18:43:30 +00:00
Karen Metts
4d0255228d Update supported java version and example
Fixes #10584
2019-03-26 20:54:47 +00:00
Karen Metts
67e62a9c00 Add sample doc files to plugin generator
Fixes #10029
2019-03-19 20:21:19 +00:00
Jake Landis
1f29c7145d monitoring: bump to system_api_version 7
Fixes #10562
2019-03-17 15:12:16 +00:00
Ry Biesemeyer
9eb2949ab7 fix events_count to return total
Fixes #10564
2019-03-16 00:10:39 +00:00
Joao Duarte
2543539910 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
8ec1d2276b
correctly handle unexecuted downloadEs task (#10557)
[7.x clean backport of #10555]
2019-03-13 18:08:19 -04:00
Colin Surprenant
f6933dbe9a
move download setup code inside the downloadEs task (#10549)
7.x clean backport of #10547
2019-03-13 18:04:24 -04:00
Joao Duarte
ebad88a358 make monitoring specs resilient to internal api number changes
Fixes #10552
2019-03-13 16:26:22 +00:00
Karen Metts
6850509623
Cherrypick to 7.x: Convert instructions for Java plugins to asciidoc (#10550)
* Convert instructions for Java plugins to asciidoc

* Update java plugin docs for beta
2019-03-13 12:12:44 -04:00
Rob Bavey
2ec00019a4 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
Ry Biesemeyer
80cf579e59 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:41 +00:00
Jake Landis
3c3e769bb0 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
ecba50c280 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:50 +00:00
Dan Hermann
182639a64a fix bug with explicitly-specified Java codecs
Fixes #10520
2019-03-08 02:05:57 +00:00
Jake Landis
439ef7f1ce update to send api version 6
Fixes #10518
2019-03-07 16:19:44 +00:00
Jake Landis
7ca98d3410 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
Guy Boertje
59e51127af Mute CI integration DLQ acceptance test
Fixes #10504
2019-02-27 17:44:57 +00:00
DeDe Morton
ca6ad64c7f Improve docs about using Filebeat modules with Logstash (#10438)
* Improve docs about using Filebeat modules with Logstash

* Add fixes from review

Fixes #10482
2019-02-20 20:17:30 +00:00
Joao Duarte
1c88792d49 bump jruby to 9.2.6.0
Fixes #10425
2019-02-18 16:34:36 +00:00
Colin Surprenant
1162282130
remove exclusive lock for Ruby pipeline initialization (#10461)
7.x clean backport of #10431
2019-02-16 13:33:18 -05:00
Rob Bavey
2d5df520bf 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
Rob Bavey
b941c17da4 Mute Failing Test on Windows
Mute mixin_spec, tracked by #10454

Fixes #10455
2019-02-15 19:44:22 +00:00
Dan Hermann
94cb37bedd One more character encoding fix
Fixes #10452
2019-02-14 21:36:51 +00:00
Karen Metts
41c6354119 Add placeholder for 7.0.0.-beta1
Fixes #10451
2019-02-14 18:21:25 +00:00
Karen Metts
94bade3717 Incorporate review comments
Fixes #10433
2019-02-14 17:03:15 +00:00
Karen Metts
bf56ff763e Add prilileges required for ilm
Fixes #10433
2019-02-14 17:03:15 +00:00
Dan Hermann
b0bccd865b 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
ef56ca1249 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
ff89aa1405 Move field-ref include below xpack content
Fixes #10437
2019-02-13 20:53:19 +00:00
Karen Metts
907d2ba944 Edits from review comments
Fixes #10376
2019-02-12 22:38:45 +00:00
Karen Metts
257e3ce117 Expande descriptions
Fixes #10376
2019-02-12 22:38:45 +00:00
Karen Metts
f87da37e16 Add http and memcached filters to lookup plugins
Fixes #10376
2019-02-12 22:38:45 +00:00
Karen Metts
22648332a6 Reorder files in index to unhide lost topics Add comment about placement of include
Fixes #10429
2019-02-12 18:37:38 +00:00
Joao Duarte
42c63b75df 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
cfeaa54115 ast/lir: simplify concurrent use of AST, which is globally stateful
Fixes #10415
2019-02-09 00:24:46 +00:00
Rob Bavey
9277917875 Remove unnecessary option to not require host in SafeURI
Fixes #10414
2019-02-08 14:14:33 +00:00
Rob Bavey
0ebbb39493 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
29280c1527 mute metrics_spec line 138 test
Fixes #10412
2019-02-07 16:25:45 +00:00
Joao Duarte
1437cdc207 pin childprocess to 0.9
Fixes #10410
2019-02-07 16:25:01 +00:00
Ry Biesemeyer
009e764c10 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
0e4ab8a784
Update :branch: property in 7.x index.asciidoc (#10403) 2019-02-06 17:59:05 +00:00
João Duarte
7ef7572301
bump version to 7.1.0 (#10402) 2019-02-06 15:05:12 +00:00
1655 changed files with 68413 additions and 27616 deletions

View file

@ -0,0 +1,138 @@
# 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"
key: "integration-tests-part-1"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/integration_tests.sh split 0
retry:
automatic:
- limit: 3
- label: ":lab_coat: Integration Tests / part 2"
key: "integration-tests-part-2"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
ci/integration_tests.sh split 1
retry:
automatic:
- limit: 3
- label: ":lab_coat: IT Persistent Queues / part 1"
key: "integration-tests-qa-part-1"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 0
retry:
automatic:
- limit: 3
- label: ":lab_coat: IT Persistent Queues / part 2"
key: "integration-tests-qa-part-2"
command: |
set -euo pipefail
source .buildkite/scripts/common/vm-agent.sh
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split 1
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 @@
# 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 | 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,87 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
env:
DEFAULT_MATRIX_OS: "ubuntu-2204"
DEFAULT_MATRIX_JDK: "adoptiumjdk_17"
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 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: "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 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
- label: "Adoptium JDK 11 (Eclipse Temurin)"
value: "adoptiumjdk_11"
- label: "OpenJDK 17"
value: "openjdk_17"
- label: "OpenJDK 11"
value: "openjdk_11"
- label: "Zulu 17"
value: "zulu_17"
- label: "Zulu 11"
value: "zulu_11"
- 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,184 @@
# 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:0.4"
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:0.4"
cpu: "4"
memory: "8Gi"
ephemeralStorage: "100Gi"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
source .buildkite/scripts/common/container-agent.sh
ci/unit_tests.sh ruby
- label: ":java: Java unit tests"
key: "java-unit-tests"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci:0.4"
cpu: "8"
memory: "16Gi"
ephemeralStorage: "100Gi"
retry:
automatic:
- limit: 3
command: |
set -euo pipefail
if [[ $BUILDKITE_PULL_REQUEST == "false" ]]; then
# https://github.com/elastic/logstash/pull/15486 for background
export ENABLE_SONARQUBE="false"
else
source .buildkite/scripts/pull-requests/sonar-env.sh
fi
source .buildkite/scripts/common/container-agent.sh
ci/unit_tests.sh java
artifact_paths:
- "**/build/test-results/javaTests/TEST-*.xml"
- label: ":lab_coat: Integration Tests / part 1"
key: "integration-tests-part-1"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root:0.4"
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
- label: ":lab_coat: Integration Tests / part 2"
key: "integration-tests-part-2"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root:0.4"
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
- label: ":lab_coat: IT Persistent Queues / part 1"
key: "integration-tests-qa-part-1"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root:0.4"
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
- label: ":lab_coat: IT Persistent Queues / part 2"
key: "integration-tests-qa-part-2"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-logstash-ci-no-root:0.4"
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
- 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:0.4"
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:0.4"
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,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 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,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-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-2022", "windows-2019", "windows-2016"]
}

View file

@ -0,0 +1,90 @@
#!/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
case "$WORKFLOW_TYPE" in
snapshot)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
rake artifact:docker || error "artifact:docker build failed."
rake artifact:docker_oss || error "artifact:docker_oss build failed."
rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
else
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker || error "artifact:docker build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker_oss || error "artifact:docker_oss build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
staging)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
RELEASE=1 rake artifact:docker || error "artifact:docker build failed."
RELEASE=1 rake artifact:docker_oss || error "artifact:docker_oss build failed."
RELEASE=1 rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
RELEASE=1 rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
else
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker || error "artifact:docker build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker_oss || error "artifact:docker_oss build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
*)
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
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"
if [ "$ARCH" != "aarch64" ]; then
# No logstash-ubi8 for AARCH64
images="logstash logstash-oss logstash-ubi8"
fi
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-ubi8 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,58 @@
#!/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
case "$WORKFLOW_TYPE" in
snapshot)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
else
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
staging)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
RELEASE=1 SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
else
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
*)
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
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,46 @@
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"
if [ "${arch}" != "aarch64" ]; then
# No logstash-ubi8 for AARCH64
images="logstash logstash-oss logstash-ubi8"
fi
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-Xmx2g"
# 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_OPT 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_OPT=${VERSION_QUALIFIER_OPT:-""}
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,131 @@
import os
import sys
import yaml
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-2004
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
'''
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-2004
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"
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-2004-aarch64
instanceType: "m6g.4xlarge"
diskSizeGb: 200
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-2004
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"]
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": []}
# 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-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json\n' + yaml.dump(structure, Dumper=yaml.Dumper, sort_keys=False))

109
.buildkite/scripts/dra/publish.sh Executable file
View file

@ -0,0 +1,109 @@
#!/bin/bash -i
set -euo pipefail
echo "####################################################################"
echo "##################### Starting $0"
echo "####################################################################"
source ./$(dirname "$0")/common.sh
PLAIN_STACK_VERSION=$STACK_VERSION
# 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=main
fi
if [ -n "$VERSION_QUALIFIER_OPT" ]; then
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
PLAIN_STACK_VERSION="${PLAIN_STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
case "$WORKFLOW_TYPE" in
snapshot)
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
;;
staging)
;;
*)
error "Worklflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
info "Uploading artifacts for ${WORKFLOW_TYPE} workflow on branch: ${RELEASE_BRANCH}"
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
# Deleting ubi8 for aarch64 for the time being. This image itself is not being built, and it is not expected
# by the release manager.
# See https://github.com/elastic/infra/blob/master/cd/release/release-manager/project-configs/8.5/logstash.gradle
# for more details.
# TODO filter it out when uploading artifacts instead
rm -f build/logstash-ubi8-${STACK_VERSION}-docker-image-aarch64.tar.gz
info "Downloaded ARTIFACTS sha report"
for file in build/logstash-*; do shasum $file;done
mv build/distributions/dependencies-reports/logstash-${STACK_VERSION}.csv build/distributions/dependencies-${STACK_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
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 "${PLAIN_STACK_VERSION}" \
--artifact-set main \
${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,220 @@
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-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
# NOTE! specifically on 7.17 we must use ubuntu 20.04 or less due to https://github.com/jruby/jruby/pull/7611#issuecomment-1750387837
"agents": gcp_agent("ubuntu-2004", 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", "ubi8"]:
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,405 @@
import abc
import copy
from dataclasses import dataclass, field
import os
import sys
import typing
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]]:
return [
self.init_annotation,
self.java_unit_test,
self.ruby_unit_test,
self.integration_tests_part_1,
self.integration_tests_part_2,
self.pq_integration_tests_part_1,
self.pq_integration_tests_part_2,
self.x_pack_unit_tests,
self.x_pack_integration,
]
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_tests_part_1(self) -> JobRetValues:
return self.integration_tests(part=1)
def integration_tests_part_2(self) -> JobRetValues:
return self.integration_tests(part=2)
def integration_tests(self, part: int) -> JobRetValues:
step_name_human = f"Integration Tests - {part}"
step_key = f"{self.group_key}-integration-tests-{part}"
test_command = f"""
ci/integration_tests.sh split {part-1}
"""
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_tests_part_1(self) -> JobRetValues:
return self.pq_integration_tests(part=1)
def pq_integration_tests_part_2(self) -> JobRetValues:
return self.pq_integration_tests(part=2)
def pq_integration_tests(self, part: int) -> JobRetValues:
step_name_human = f"IT Persistent Queues - {part}"
step_key = f"{self.group_key}-it-persistent-queues-{part}"
test_command = f"""
export FEATURE_FLAG=persistent_queues
ci/integration_tests.sh split {part-1}
"""
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,9 @@
#!/usr/bin/env bash
SONAR_TOKEN_PATH="kv/ci-shared/platform-ingest/elastic/logstash/sonar-creds"
export SONAR_TOKEN=$(retry -t 5 -- vault kv get -field=token ${SONAR_TOKEN_PATH})
export SOURCE_BRANCH=$GITHUB_PR_BRANCH
export TARGET_BRANCH=$GITHUB_PR_TARGET_BRANCH
export PULL_ID=$GITHUB_PR_NUMBER
export COMMIT_SHA=$BUILDKITE_COMMIT

View file

@ -0,0 +1,71 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
env:
DEFAULT_MATRIX_OS: "windows-2022"
DEFAULT_MATRIX_JDK: "adoptiumjdk_17"
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 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 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
- label: "Adoptium JDK 11 (Eclipse Temurin)"
value: "adoptiumjdk_11"
- label: "OpenJDK 17"
value: "openjdk_17"
- label: "OpenJDK 11"
value: "openjdk_11"
- label: "Zulu 17"
value: "zulu_17"
- label: "Zulu 11"
value: "zulu_11"
- 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,2 @@
LS_BUILD_JAVA=adoptopenjdk_11
LS_RUNTIME_JAVA=adoptopenjdk_11

View file

@ -0,0 +1,14 @@
# This file is used as part of a matrix build in Jenkins where the
# values below are included as an axis of the matrix.
# This axis of the build matrix represents the versions of Java on
# which Logstash can be tested against.
LS_RUNTIME_JAVA:
- java8
- openjdk11
- openjdk17
- adoptopenjdk11
- adoptiumjdk17
- zulu11
- zulu17

59
.fossa.yml Executable file
View file

@ -0,0 +1,59 @@
# 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: ingest-converter
type: gradle
target: 'ingest-converter:'
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

8
.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,8 @@ 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

View file

@ -1 +1 @@
jruby-9.1.12.0
jruby-9.2.20.1

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,17 +50,22 @@ 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
point to contribute to Logstash.
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
Using IntelliJ? See a detailed getting started guide [here](https://docs.google.com/document/d/1kqunARvYMrlfTEOgMpYHig0U-ZqCcMJfhvTtGt09iZg/pub).
@ -71,7 +77,7 @@ Check our [documentation](https://www.elastic.co/guide/en/logstash/current/contr
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 +113,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 +151,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 +215,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,8 +1,8 @@
FROM ubuntu:xenial
FROM ubuntu:bionic
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 && \
libxml2-dev libxslt-dev openjdk-11-jdk-headless curl iputils-ping netcat && \
apt-get clean
WORKDIR /root
@ -20,25 +20,32 @@ 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
# Setup gradle wrapper. When running any `gradle` command, a `settings.gradle` is expected (and will soon be required).
# This section adds the gradle wrapper, `settings.gradle` and sets the permissions (setting the user to root for `chown`
# and working directory to allow this and then reverts back to the previous working directory and user.
COPY --chown=logstash:logstash gradlew /opt/logstash/gradlew
COPY --chown=logstash:logstash gradle/wrapper /opt/logstash/gradle/wrapper
COPY --chown=logstash:logstash settings.gradle /opt/logstash/settings.gradle
WORKDIR /opt/logstash
RUN for iter in `seq 1 10`; do ./gradlew wrapper --warning-mode all && exit_code=0 && break || exit_code=$? && echo "gradlew error: retry $iter in 10s" && sleep 10; done; exit $exit_code
WORKDIR /home/logstash
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 Gemfile.template Gemfile.jruby-2.5.lock.* /opt/logstash/
ADD Rakefile /opt/logstash/Rakefile
ADD build.gradle /opt/logstash/build.gradle
ADD rubyUtils.gradle /opt/logstash/rubyUtils.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 buildSrc /opt/logstash/buildSrc
ADD tools /opt/logstash/tools
ADD logstash-core /opt/logstash/logstash-core
ADD logstash-core-plugin-api /opt/logstash/logstash-core-plugin-api
@ -46,7 +53,6 @@ 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 && \
@ -55,5 +61,4 @@ RUN rm -rf build && \
USER logstash
WORKDIR /opt/logstash
LABEL retention="prune"
LABEL retention="prune"

View file

@ -1,9 +1,9 @@
#logstash-base image, use ci/docker_update_base_image.sh to push updates
FROM ubuntu:xenial
FROM ubuntu:bionic
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 && \
libxml2-dev libxslt-dev openjdk-11-jdk-headless curl iputils-ping netcat && \
apt-get clean
WORKDIR /root

View file

@ -0,0 +1,921 @@
PATH
remote: logstash-core-plugin-api
specs:
logstash-core-plugin-api (2.1.16-java)
logstash-core (= 7.17.26)
PATH
remote: logstash-core
specs:
logstash-core (7.17.26-java)
chronic_duration (~> 0.10)
clamp (~> 1)
concurrent-ruby (~> 1, < 1.1.10)
down (~> 5.2.0)
elasticsearch (~> 7)
filesize (~> 0.2)
gems (~> 1)
i18n (~> 1)
jrjackson (= 0.4.14)
jruby-openssl (~> 0.11)
manticore (~> 0.6)
minitar (~> 0.8)
mustermann (~> 1.0.3)
pry (~> 0.12)
puma (~> 5, >= 5.6.8)
racc (~> 1.5.2)
rack (~> 2)
rubyzip (~> 1)
rufus-scheduler
sinatra (~> 2)
stud (~> 0.0.19)
thread_safe (~> 0.3.6)
treetop (~> 1)
tzinfo-data
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
amazing_print (1.4.0)
arr-pm (0.0.12)
atomic (1.1.101-java)
avl_tree (1.2.1)
atomic (~> 1.1)
avro (1.10.2)
multi_json (~> 1)
aws-eventstream (1.2.0)
aws-sdk (2.11.632)
aws-sdk-resources (= 2.11.632)
aws-sdk-core (2.11.632)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.11.632)
aws-sdk-core (= 2.11.632)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
back_pressure (1.0.0)
backports (3.23.0)
base64 (0.2.0)
belzebuth (0.2.3)
childprocess
benchmark-ips (2.10.0)
bigdecimal (3.1.8-java)
bindata (2.4.15)
buftok (0.2.0)
builder (3.2.4)
cabin (0.9.0)
cgi (0.4.1-java)
childprocess (4.1.0)
chronic_duration (0.10.6)
numerizer (~> 0.1.1)
ci_reporter (2.0.0)
builder (>= 2.1.2)
ci_reporter_rspec (1.0.0)
ci_reporter (~> 2.0)
rspec (>= 2.14, < 4)
clamp (1.0.1)
coderay (1.1.3)
concurrent-ruby (1.1.9)
crack (0.4.6)
bigdecimal
rexml
dalli (2.7.11)
diff-lcs (1.5.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
down (5.2.4)
addressable (~> 2.8)
edn (1.1.1)
elastic-app-search (7.8.0)
jwt (>= 1.5, < 3.0)
elastic-workplace-search (0.4.1)
elasticsearch (7.17.11)
elasticsearch-api (= 7.17.11)
elasticsearch-transport (= 7.17.11)
elasticsearch-api (7.17.11)
multi_json
elasticsearch-transport (7.17.11)
base64
faraday (>= 1, < 3)
multi_json
equalizer (0.0.11)
erb (2.2.3)
cgi
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5-java)
filesize (0.2.0)
fivemat (1.3.7)
flores (0.0.8)
fpm (1.14.2)
arr-pm (~> 0.0.11)
backports (>= 2.6.2)
cabin (>= 0.6.0)
clamp (~> 1.0.0)
git (>= 1.3.0, < 2.0)
json (>= 1.7.7, < 3.0)
pleaserun (~> 0.0.29)
rexml
stud
gelfd2 (0.4.1)
gem_publisher (1.5.0)
gems (1.2.0)
gene_pool (1.5.0)
concurrent-ruby (>= 1.0)
git (1.10.2)
rchardet (~> 1.8)
hashdiff (1.0.1)
hitimes (1.3.1-java)
http (3.3.0)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.7)
domain_name (~> 0.5)
http-form_data (2.3.0)
http_parser.rb (0.6.0-java)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
insist (1.0.0)
jar-dependencies (0.4.1)
jls-grok (0.11.5)
cabin (>= 0.6.0)
jls-lumberjack (0.0.26)
concurrent-ruby
jmespath (1.6.2)
jrjackson (0.4.14-java)
jruby-jms (1.3.0-java)
gene_pool
semantic_logger
jruby-openssl (0.11.0-java)
jruby-stdin-channel (0.2.0-java)
json (2.6.3-java)
json-schema (2.8.1)
addressable (>= 2.4)
jwt (2.3.0)
kramdown (1.14.0)
logstash-codec-avro (3.3.1-java)
avro (~> 1.10.2)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
logstash-codec-cef (6.2.7-java)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-codec-collectd (3.1.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
logstash-codec-dots (3.0.6)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-codec-edn (3.1.0)
edn
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
logstash-codec-edn_lines (3.1.0)
edn
logstash-codec-line
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
logstash-codec-es_bulk (3.1.0)
logstash-codec-line
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
logstash-codec-fluent (3.4.3-java)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
msgpack (~> 1.1)
logstash-codec-graphite (3.0.6)
logstash-codec-line
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-event_support (~> 1.0)
logstash-codec-json (3.1.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0, >= 1.0.1)
logstash-mixin-validator_support (~> 1.0)
logstash-codec-json_lines (3.1.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0, >= 1.0.1)
logstash-mixin-validator_support (~> 1.0)
logstash-codec-line (3.1.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-codec-msgpack (3.1.0-java)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
msgpack (~> 1.1)
logstash-codec-multiline (3.1.2)
concurrent-ruby
jls-grok (~> 0.11.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-patterns-core
logstash-codec-netflow (4.2.2)
bindata (>= 1.5.0)
logstash-core-plugin-api (~> 2.0)
logstash-mixin-event_support (~> 1.0)
logstash-codec-plain (3.1.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-codec-rubydebug (3.1.0)
amazing_print (~> 1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-devutils (1.3.6-java)
fivemat
gem_publisher
insist (= 1.0.0)
kramdown (= 1.14.0)
logstash-core-plugin-api (>= 2.0, <= 2.99)
minitar
rake
rspec (~> 3.0)
rspec-wait
stud (>= 0.0.20)
logstash-filter-aggregate (2.10.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-anonymize (3.0.7)
logstash-core-plugin-api (>= 1.60, <= 2.99)
murmurhash3 (= 0.1.6)
logstash-filter-cidr (3.1.3-java)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-clone (4.2.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.1)
logstash-filter-csv (3.1.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-validator_support (~> 1.0)
logstash-filter-date (3.1.15)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-de_dot (1.0.4)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-dissect (1.2.5)
jar-dependencies
logstash-core-plugin-api (>= 2.1.1, <= 2.99)
logstash-filter-dns (3.1.5)
logstash-core-plugin-api (>= 1.60, <= 2.99)
lru_redux (~> 1.1.0)
logstash-filter-drop (3.0.5)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-elasticsearch (3.11.1)
elasticsearch (>= 7.14.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
manticore (>= 0.7.1)
logstash-filter-fingerprint (3.3.2)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.2)
murmurhash3
logstash-filter-geoip (7.2.13-java)
logstash-core (>= 7.14.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.2)
logstash-filter-grok (4.4.3)
jls-grok (~> 0.11.3)
logstash-core (>= 5.6.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.0)
logstash-patterns-core (>= 4.3.0, < 5)
stud (~> 0.0.22)
logstash-filter-http (1.2.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.2)
logstash-mixin-http_client (>= 5.0.0, < 9.0.0)
logstash-mixin-validator_support (~> 1.0)
logstash-filter-json (3.2.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-validator_support (~> 1.0)
logstash-filter-kv (4.5.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-validator_support (~> 1.0)
logstash-filter-memcached (1.1.0)
dalli (~> 2.7)
logstash-core-plugin-api (~> 2.0)
logstash-filter-metrics (4.0.7)
logstash-core-plugin-api (>= 1.60, <= 2.99)
metriks
thread_safe
logstash-filter-mutate (3.5.8)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-prune (3.0.4)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-ruby (3.1.8)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-sleep (3.0.7)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-split (3.1.8)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-syslog_pri (3.1.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-filter-throttle (4.0.4)
atomic
logstash-core-plugin-api (>= 1.60, <= 2.99)
thread_safe
logstash-filter-translate (3.3.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-deprecation_logger_support (~> 1.0)
logstash-mixin-ecs_compatibility_support (~> 1.2)
logstash-mixin-validator_support (~> 1.0)
rufus-scheduler
logstash-filter-truncate (1.0.6)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-urldecode (3.0.6)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-useragent (3.3.5-java)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-filter-uuid (3.0.5)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-xml (4.1.3)
logstash-core-plugin-api (>= 1.60, <= 2.99)
nokogiri
xml-simple
logstash-input-azure_event_hubs (1.4.9)
logstash-codec-json
logstash-codec-plain
logstash-core-plugin-api (~> 2.0)
stud (>= 0.0.22)
logstash-input-beats (6.2.6-java)
concurrent-ruby (~> 1.0)
jar-dependencies (~> 0.3, >= 0.3.4)
logstash-codec-multiline (>= 2.0.5)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
thread_safe (~> 0.3.5)
logstash-input-couchdb_changes (3.1.6)
json
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
stud (>= 0.0.22)
logstash-input-dead_letter_queue (1.1.12)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-input-elasticsearch (4.12.3)
elasticsearch (>= 7.17.1)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
manticore (>= 0.7.1)
rufus-scheduler
tzinfo
tzinfo-data
logstash-input-exec (3.4.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
rufus-scheduler
stud (~> 0.0.22)
logstash-input-file (4.4.6)
addressable
concurrent-ruby (~> 1.0)
logstash-codec-multiline (~> 3.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-input-ganglia (3.1.4)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
stud (~> 0.0.22)
logstash-input-gelf (3.3.2)
gelfd2 (= 0.4.1)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
stud (>= 0.0.22, < 0.1.0)
logstash-input-generator (3.1.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-input-graphite (3.0.6)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-input-tcp
logstash-input-heartbeat (3.1.1)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-deprecation_logger_support (~> 1.0)
logstash-mixin-ecs_compatibility_support (~> 1.2)
logstash-mixin-event_support (~> 1.0)
stud
logstash-input-http (3.4.5-java)
jar-dependencies (~> 0.3, >= 0.3.4)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.2)
logstash-input-http_poller (5.1.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0, >= 1.0.1)
logstash-mixin-http_client (~> 7)
logstash-mixin-validator_support (~> 1.0)
rufus-scheduler (~> 3.0.9)
stud (~> 0.0.22)
logstash-input-imap (3.2.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-validator_support (~> 1.0)
mail (~> 2.6.3)
mime-types (= 2.6.2)
stud (~> 0.0.22)
logstash-input-jms (3.2.2-java)
jruby-jms (>= 1.2.0)
logstash-codec-json (~> 3.0)
logstash-codec-plain (~> 3.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
semantic_logger (< 4.0.0)
logstash-input-pipe (3.1.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
stud (~> 0.0.22)
logstash-input-redis (3.7.1)
logstash-codec-json
logstash-core-plugin-api (>= 1.60, <= 2.99)
redis (>= 4.0.1, < 5)
logstash-input-s3 (3.8.4)
logstash-core-plugin-api (>= 2.1.12, <= 2.99)
logstash-mixin-aws (>= 5.1.0)
logstash-mixin-ecs_compatibility_support (~> 1.2)
stud (~> 0.0.18)
logstash-input-snmp (1.3.3)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
stud (>= 0.0.22, < 0.1.0)
logstash-input-snmptrap (3.1.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
snmp
logstash-input-sqs (3.1.3)
logstash-codec-json
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-aws (>= 4.3.0)
logstash-input-stdin (3.4.0)
jruby-stdin-channel
logstash-codec-line
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.2)
logstash-input-syslog (3.6.0)
concurrent-ruby
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-filter-date
logstash-filter-grok (>= 4.4.1)
logstash-mixin-ecs_compatibility_support (~> 1.2)
stud (>= 0.0.22, < 0.1.0)
logstash-input-tcp (6.2.7-java)
jruby-openssl (>= 0.10.2)
logstash-codec-json
logstash-codec-json_lines
logstash-codec-line
logstash-codec-multiline
logstash-codec-plain
logstash-core (>= 6.7.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.2)
logstash-input-twitter (4.1.0)
http-form_data (~> 2)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
public_suffix (~> 3)
stud (>= 0.0.22, < 0.1)
twitter (= 6.2.0)
logstash-input-udp (3.5.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.2)
stud (~> 0.0.22)
logstash-input-unix (3.1.2)
logstash-codec-line
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-integration-elastic_enterprise_search (2.1.2)
elastic-app-search (~> 7.8.0)
elastic-workplace-search (~> 0.4.1)
logstash-codec-plain
logstash-core-plugin-api (~> 2.0)
logstash-integration-jdbc (5.2.6)
logstash-codec-plain
logstash-core (>= 6.5.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-ecs_compatibility_support (~> 1.3)
logstash-mixin-event_support (~> 1.0)
logstash-mixin-validator_support (~> 1.0)
lru_redux
rufus-scheduler
sequel
tzinfo
tzinfo-data
logstash-integration-kafka (10.12.1-java)
logstash-codec-json
logstash-codec-plain
logstash-core (>= 6.5.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-deprecation_logger_support (~> 1.0)
manticore (>= 0.5.4, < 1.0.0)
stud (>= 0.0.22, < 0.1.0)
logstash-integration-rabbitmq (7.3.3-java)
back_pressure (~> 1.0)
logstash-codec-json
logstash-core (>= 6.5.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
march_hare (~> 4.0)
stud (~> 0.0.22)
logstash-mixin-aws (5.1.0)
aws-sdk (~> 2)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-deprecation_logger_support (1.0.0-java)
logstash-core (>= 5.0.0)
logstash-mixin-ecs_compatibility_support (1.3.0-java)
logstash-core (>= 6.0.0)
logstash-mixin-event_support (1.0.1-java)
logstash-core (>= 6.8)
logstash-mixin-http_client (7.0.0)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
manticore (>= 0.5.2, < 1.0.0)
logstash-mixin-validator_support (1.0.2-java)
logstash-core (>= 6.8)
logstash-output-cloudwatch (3.0.10)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-aws (>= 1.0.0)
rufus-scheduler (>= 3.0.9)
logstash-output-csv (3.0.10)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-output-file
logstash-output-elasticsearch (11.4.2-java)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-deprecation_logger_support (~> 1.0)
logstash-mixin-ecs_compatibility_support (~> 1.0)
manticore (>= 0.8.0, < 1.0.0)
stud (~> 0.0, >= 0.0.17)
logstash-output-email (4.1.2)
logstash-core-plugin-api (>= 1.60, <= 2.99)
mail (~> 2.6.3)
mime-types (< 3)
mustache (>= 0.99.8)
logstash-output-file (4.3.0)
logstash-codec-json_lines
logstash-codec-line
logstash-core-plugin-api (>= 2.0.0, < 2.99)
logstash-output-graphite (3.1.6)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-output-http (5.2.5)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-http_client (>= 6.0.0, < 8.0.0)
logstash-output-lumberjack (3.1.9)
jls-lumberjack (>= 0.0.26)
logstash-core-plugin-api (>= 1.60, <= 2.99)
stud
logstash-output-nagios (3.0.6)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-output-null (3.0.5)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-output-pipe (3.0.6)
logstash-codec-plain
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-output-redis (5.0.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
redis (~> 4)
stud
logstash-output-s3 (4.3.7)
concurrent-ruby
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-aws (>= 4.3.0)
stud (~> 0.0.22)
logstash-output-sns (4.0.8)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-aws (>= 1.0.0)
logstash-output-sqs (6.0.0)
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-mixin-aws (>= 4.3.0)
logstash-output-stdout (3.1.4)
logstash-codec-rubydebug
logstash-core-plugin-api (>= 1.60.1, < 2.99)
logstash-output-tcp (6.0.3)
logstash-codec-json
logstash-core-plugin-api (>= 1.60, <= 2.99)
stud
logstash-output-udp (3.2.0)
logstash-codec-json
logstash-core-plugin-api (>= 1.60, <= 2.99)
logstash-output-webhdfs (3.0.6)
logstash-core-plugin-api (>= 1.60, <= 2.99)
snappy (= 0.0.12)
webhdfs
logstash-patterns-core (4.3.4)
logstash-core-plugin-api (>= 1.60, <= 2.99)
lru_redux (1.1.0)
mail (2.6.6)
mime-types (>= 1.16, < 4)
manticore (0.8.0-java)
openssl_pkcs8_pure
march_hare (4.4.0-java)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
method_source (1.0.0)
metriks (0.9.9.8)
atomic (~> 1.0)
avl_tree (~> 1.2.0)
hitimes (~> 1.1)
mime-types (2.6.2)
minitar (0.9)
msgpack (1.4.5-java)
multi_json (1.15.0)
multipart-post (2.1.1)
murmurhash3 (0.1.6-java)
mustache (0.99.8)
mustermann (1.0.3)
naught (1.1.0)
nio4r (2.5.9-java)
nokogiri (1.12.5-java)
racc (~> 1.4)
numerizer (0.1.1)
octokit (4.22.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
openssl_pkcs8_pure (0.0.0.2)
paquet (0.2.1)
pleaserun (0.0.32)
cabin (> 0)
clamp
dotenv
insist
mustache (= 0.99.8)
stud
polyglot (0.3.5)
pry (0.14.2-java)
coderay (~> 1.1)
method_source (~> 1.0)
spoon (~> 0.0)
public_suffix (3.1.1)
puma (5.6.9-java)
nio4r (~> 2.0)
racc (1.5.2-java)
rack (2.2.10)
rack-protection (2.2.1)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rake (12.3.3)
rchardet (1.8.0)
redis (4.6.0)
rexml (3.2.6)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.1)
rspec-wait (0.0.10)
rspec (>= 3.0)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubyzip (1.3.0)
rufus-scheduler (3.0.9)
tzinfo
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
semantic_logger (3.4.1)
concurrent-ruby (~> 1.0)
sequel (5.53.0)
simple_oauth (0.3.1)
sinatra (2.2.1)
mustermann (~> 1.0)
rack (~> 2.2)
rack-protection (= 2.2.1)
tilt (~> 2.0)
snappy (0.0.12-java)
snappy-jars (~> 1.1.0)
snappy-jars (1.1.0.1.2-java)
snmp (1.3.2)
spoon (0.0.6)
ffi
strscan (3.1.0-java)
stud (0.0.23)
thread_safe (0.3.6-java)
tilt (2.0.11)
treetop (1.6.12)
polyglot (~> 0.3)
twitter (6.2.0)
addressable (~> 2.3)
buftok (~> 0.2.0)
equalizer (~> 0.0.11)
http (~> 3.0)
http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
memoizable (~> 0.4.0)
multipart-post (~> 2.0)
naught (~> 1.0)
simple_oauth (~> 0.3.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2021.5)
tzinfo (>= 1.0.0)
unf (0.1.4-java)
webhdfs (0.10.2)
addressable
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
xml-simple (1.1.9)
rexml
PLATFORMS
java
universal-java-11
DEPENDENCIES
atomic (~> 1)
belzebuth
benchmark-ips
builder (~> 3)
childprocess (~> 4)
ci_reporter_rspec (~> 1)
erb (~> 2)
flores (~> 0.0.8)
fpm (~> 1, >= 1.14.1)
gems (~> 1)
json-schema (~> 2)
logstash-codec-avro
logstash-codec-cef
logstash-codec-collectd
logstash-codec-dots
logstash-codec-edn
logstash-codec-edn_lines
logstash-codec-es_bulk
logstash-codec-fluent
logstash-codec-graphite
logstash-codec-json
logstash-codec-json_lines
logstash-codec-line
logstash-codec-msgpack
logstash-codec-multiline
logstash-codec-netflow
logstash-codec-plain
logstash-codec-rubydebug
logstash-core!
logstash-core-plugin-api!
logstash-devutils (~> 1)
logstash-filter-aggregate
logstash-filter-anonymize
logstash-filter-cidr
logstash-filter-clone
logstash-filter-csv
logstash-filter-date
logstash-filter-de_dot
logstash-filter-dissect
logstash-filter-dns
logstash-filter-drop
logstash-filter-elasticsearch
logstash-filter-fingerprint
logstash-filter-geoip
logstash-filter-grok
logstash-filter-http
logstash-filter-json
logstash-filter-kv
logstash-filter-memcached
logstash-filter-metrics
logstash-filter-mutate
logstash-filter-prune
logstash-filter-ruby
logstash-filter-sleep
logstash-filter-split
logstash-filter-syslog_pri
logstash-filter-throttle
logstash-filter-translate
logstash-filter-truncate
logstash-filter-urldecode
logstash-filter-useragent
logstash-filter-uuid
logstash-filter-xml
logstash-input-azure_event_hubs
logstash-input-beats
logstash-input-couchdb_changes
logstash-input-dead_letter_queue
logstash-input-elasticsearch
logstash-input-exec
logstash-input-file
logstash-input-ganglia
logstash-input-gelf
logstash-input-generator
logstash-input-graphite
logstash-input-heartbeat
logstash-input-http
logstash-input-http_poller
logstash-input-imap
logstash-input-jms
logstash-input-pipe
logstash-input-redis
logstash-input-s3
logstash-input-snmp
logstash-input-snmptrap
logstash-input-sqs
logstash-input-stdin
logstash-input-syslog
logstash-input-tcp
logstash-input-twitter
logstash-input-udp
logstash-input-unix
logstash-integration-elastic_enterprise_search
logstash-integration-jdbc
logstash-integration-kafka (~> 10.12.1)
logstash-integration-rabbitmq
logstash-output-cloudwatch
logstash-output-csv
logstash-output-elasticsearch (>= 10.4.2)
logstash-output-email
logstash-output-file
logstash-output-graphite
logstash-output-http
logstash-output-lumberjack
logstash-output-nagios
logstash-output-null
logstash-output-pipe
logstash-output-redis
logstash-output-s3
logstash-output-sns
logstash-output-sqs
logstash-output-stdout
logstash-output-tcp
logstash-output-udp
logstash-output-webhdfs
murmurhash3 (= 0.1.6)
octokit (~> 4)
paquet (~> 0.2)
pleaserun (~> 0.0.28)
rack-test
rake (~> 12)
rspec (~> 3.5)
ruby-progressbar (~> 1)
rubyzip (~> 1)
stud (~> 0.0.22)
webmock (~> 3)
BUNDLED WITH
2.3.18

View file

@ -4,122 +4,29 @@
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 "gems", "~> 1", :group => :build
gem "flores", "~> 0.0.6", :group => :development
gem "atomic", "~> 1"
gem "belzebuth", :group => :development
gem "json-schema", "~> 2", :group => :development
gem "builder", "~> 3"
gem "paquet", "~> 0.2"
gem "pleaserun", "~>0.0.28"
gem "rake", "~> 12"
gem "ruby-progressbar", "~> 1"
gem "logstash-output-elasticsearch", ">= 10.4.2"
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 "erb", "~> 2", :group => :build
gem "gems", "~> 1", :group => :build
gem "octokit", "~> 4", :group => :build
gem "rubyzip", "~> 1", :group => :build
gem "stud", "~> 0.0.22", :group => :build
gem "belzebuth", :group => :development
gem "benchmark-ips", :group => :development
gem "ci_reporter_rspec", "~> 1", :group => :development
gem "rexml", "3.2.6", :group => :development
gem "flores", "~> 0.0.8", :group => :development
gem "json-schema", "~> 2", :group => :development
gem "logstash-devutils", "~> 1", :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 "murmurhash3", "= 0.1.6" # Pins until version 0.1.7-java is released
gem "logstash-integration-kafka", "~>10.12.1"

13567
NOTICE.TXT

File diff suppressed because it is too large Load diff

View file

@ -16,27 +16,6 @@ For information about building the documentation, see the README in https://gith
You can download officially released Logstash binaries, as well as debian/rpm packages for the
supported platforms, from [downloads page](https://www.elastic.co/downloads/logstash).
### Snapshot Builds
For the daring, snapshot builds are available.
These builds are created nightly and have undergone no formal QA, so they should **never** be run in production.
| Complete, with X-Pack | Apache 2.0 licensed |
| --------------------- | ---------------------- |
| [tar-complete][] | [tar-oss][] |
| [zip-complete][] | [zip-oss][] |
| [deb-complete][] | [deb-oss][] |
| [rpm-complete][] | [rpm-oss][] |
[tar-complete]: https://snapshots.elastic.co/downloads/logstash/logstash-7.0.0-SNAPSHOT.tar.gz
[zip-complete]: https://snapshots.elastic.co/downloads/logstash/logstash-7.0.0-SNAPSHOT.zip
[deb-complete]: https://snapshots.elastic.co/downloads/logstash/logstash-7.0.0-SNAPSHOT.deb
[rpm-complete]: https://snapshots.elastic.co/downloads/logstash/logstash-7.0.0-SNAPSHOT.rpm
[tar-oss]: https://snapshots.elastic.co/downloads/logstash/logstash-oss-7.0.0-SNAPSHOT.tar.gz
[zip-oss]: https://snapshots.elastic.co/downloads/logstash/logstash-oss-7.0.0-SNAPSHOT.zip
[deb-oss]: https://snapshots.elastic.co/downloads/logstash/logstash-oss-7.0.0-SNAPSHOT.deb
[rpm-oss]: https://snapshots.elastic.co/downloads/logstash/logstash-oss-7.0.0-SNAPSHOT.rpm
## Need Help?
- [Logstash Forum](https://discuss.elastic.co/c/logstash)
@ -65,8 +44,8 @@ Logstash core will continue to exist under this repository and all related issue
### Prerequisites
* Install JDK version 8. Make sure to set the `JAVA_HOME` environment variable to the path to your JDK installation directory. For example `set JAVA_HOME=<JDK_PATH>`
* Install JRuby 9.1.x It is recommended to use a Ruby version manager such as [RVM](https://rvm.io/) or [rbenv](https://github.com/sstephenson/rbenv).
* Install JDK version 8 or 11. Make sure to set the `JAVA_HOME` environment variable to the path to your JDK installation directory. For example `set JAVA_HOME=<JDK_PATH>`
* Install JRuby 9.2.x It is recommended to use a Ruby version manager such as [RVM](https://rvm.io/) or [rbenv](https://github.com/sstephenson/rbenv).
* Install `rake` and `bundler` tool using `gem install rake` and `gem install bundler` respectively.
### RVM install (optional)
@ -159,7 +138,7 @@ Run the doc build script from within the `docs` repo. For example:
## Testing
Most of the unit tests in Logstash are written using [rspec](http://rspec.info/) for the Ruby parts. For the Java parts, we use junit. For testing you can use the *test* `rake` tasks and the `bin/rspec` command, see instructions below:
Most of the unit tests in Logstash are written using [rspec](http://rspec.info/) for the Ruby parts. For the Java parts, we use [junit](https://junit.org). For testing you can use the *test* `rake` tasks and the `bin/rspec` command, see instructions below:
### Core tests
@ -183,6 +162,14 @@ Most of the unit tests in Logstash are written using [rspec](http://rspec.info/)
3- To execute the complete test-suite including the integration tests run:
./gradlew check
4- To execute a single Ruby test run:
SPEC_OPTS="-fd -P logstash-core/spec/logstash/api/commands/default_metadata_spec.rb" ./gradlew :logstash-core:rubyTests --tests org.logstash.RSpecTests
5- To execute single spec for integration test, run:
./gradlew integrationTests -PrubyIntegrationSpecs=specs/slowlog_spec.rb
Sometimes you might find a change to a piece of Logstash code causes a test to hang. These can be hard to debug.
@ -258,10 +245,10 @@ All contributions are welcome: ideas, patches, documentation, bug reports,
complaints, and even something you drew up on a napkin.
Programming is not a required skill. Whatever you've seen about open source and
maintainers or community members saying "send patches or die" - you will not
maintainers or community members saying "send patches or die" - you will not
see that here.
It is more important to me that you are able to contribute.
It is more important that you are able to contribute.
For more information about contributing, see the
[CONTRIBUTING](./CONTRIBUTING.md) file.

View file

@ -1,4 +1,19 @@
# encoding: utf-8
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
$: << File.join(File.dirname(__FILE__), "lib")
$: << File.join(File.dirname(__FILE__), "logstash-core/lib")

10
bin/benchmark.bat Normal file
View file

@ -0,0 +1,10 @@
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0.."
for /f %%i in ('cd') do set RESULT=%%i
"%JAVACMD%" -cp "!!RESULT!!\tools\benchmark-cli\build\libs\benchmark-cli.jar;*" ^
org.logstash.benchmark.cli.Main %*
endlocal

10
bin/ingest-convert.bat Normal file
View file

@ -0,0 +1,10 @@
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0\.."
for /f %%i in ('cd') do set RESULT=%%i
"%JAVACMD%" -cp "!!RESULT!!\tools\ingest-converter\build\libs\ingest-converter.jar;*" ^
org.logstash.ingest.Pipeline %*
endlocal

View file

@ -1,7 +1,5 @@
#!/bin/bash
# Run logstash from source
#
# This is most useful when done from a git checkout.
# Run logstash
#
# Usage:
# bin/logstash <command> [arguments]
@ -58,9 +56,6 @@ if [ "$1" = "-V" ] || [ "$1" = "--version" ]; then
fi
echo "logstash $LOGSTASH_VERSION"
else
unset CLASSPATH
for J in $(cd "${LOGSTASH_JARS}"; ls *.jar); do
CLASSPATH=${CLASSPATH}${CLASSPATH:+:}${LOGSTASH_JARS}/${J}
done
CLASSPATH="$(setup_classpath $LOGSTASH_JARS)"
exec "${JAVACMD}" ${JAVA_OPTS} -cp "${CLASSPATH}" org.logstash.Logstash "$@"
fi

View file

@ -6,6 +6,6 @@ setup
# bin/logstash-keystore is a short lived ruby script thus we can use aggressive "faster starting JRuby options"
# see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
export JRUBY_OPTS="${JRUBY_OPTS---dev}"
ruby_exec "${LOGSTASH_HOME}/lib/secretstore/cli.rb" "$@"

View file

@ -6,6 +6,6 @@ setup
# bin/logstash-plugin is a short lived ruby script thus we can use aggressive "faster starting JRuby options"
# see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
export JRUBY_OPTS="${JRUBY_OPTS---dev}"
ruby_exec "${LOGSTASH_HOME}/lib/pluginmanager/main.rb" "$@"

View file

@ -15,7 +15,7 @@ if "%1" == "--version" goto version
rem iterate over the command line args and look for the argument
rem after --path.settings to see if the jvm.options file is in
rem that path and set LS_JVM_OPTIONS_CONFIG accordingly
rem that path and set LS_JVM_OPTS accordingly
:loop
for /F "usebackq tokens=1-2* delims= " %%A in (!params!) do (
set current=%%A
@ -24,7 +24,7 @@ for /F "usebackq tokens=1-2* delims= " %%A in (!params!) do (
if "!current!" == "--path.settings" (
if exist !next!\jvm.options (
set "LS_JVM_OPTIONS_CONFIG=!next!\jvm.options"
set "LS_JVM_OPTS=!next!\jvm.options"
)
)
@ -33,45 +33,40 @@ for /F "usebackq tokens=1-2* delims= " %%A in (!params!) do (
)
)
rem if explicit jvm.options is not found use default location
if "%LS_JVM_OPTIONS_CONFIG%" == "" (
set LS_JVM_OPTIONS_CONFIG="%LS_HOME%\config\jvm.options"
)
rem extract the options from the JVM options file %LS_JVM_OPTIONS_CONFIG%
rem such options are the lines beginning with '-', thus "findstr /b"
if exist %LS_JVM_OPTIONS_CONFIG% (
for /F "usebackq delims=" %%a in (`findstr /b \- %LS_JVM_OPTIONS_CONFIG%`) do set options=!options! %%a
set "LS_JAVA_OPTS=!options! %LS_JAVA_OPTS%"
) else (
echo "warning: no jvm.options file found"
)
set JAVA_OPTS=%LS_JAVA_OPTS%
for %%i in ("%LS_HOME%\logstash-core\lib\jars\*.jar") do (
call :concat "%%i"
)
%JAVA% %JAVA_OPTS% -cp "%CLASSPATH%" org.logstash.Logstash %*
@setlocal
for /F "usebackq delims=" %%a in (`CALL "%JAVACMD%" -cp "!CLASSPATH!" "org.logstash.launchers.JvmOptionsParser" "!LS_HOME!" "!LS_JVM_OPTS!" ^|^| echo jvm_options_parser_failed`) do set LS_JAVA_OPTS=%%a
@endlocal & set "MAYBE_JVM_OPTIONS_PARSER_FAILED=%LS_JAVA_OPTS%" & set LS_JAVA_OPTS=%LS_JAVA_OPTS%
if "%MAYBE_JVM_OPTIONS_PARSER_FAILED%" == "jvm_options_parser_failed" (
echo "error: jvm options parser failed; exiting"
exit /b 1
)
set JAVA_OPTS=%LS_JAVA_OPTS%
"%JAVACMD%" %JAVA_OPTS% -cp "%CLASSPATH%" org.logstash.Logstash %*
goto :end
:version
set "LOGSTASH_VERSION_FILE1=%LS_HOME%\logstash-core\versions-gem-copy.yml"
set "LOGSTASH_VERSION_FILE2=%LS_HOME%\versions.yml"
set LOGSTASH_VERSION_FILE1="%LS_HOME%\logstash-core\versions-gem-copy.yml"
set LOGSTASH_VERSION_FILE2="%LS_HOME%\versions.yml"
set "LOGSTASH_VERSION=Version not detected"
if exist !LOGSTASH_VERSION_FILE1! (
rem this file is present in zip, deb and rpm artifacts and after bundle install
rem but might not be for a git checkout type install
for /F "tokens=1,2 delims=: " %%a in (!LOGSTASH_VERSION_FILE1!) do (
for /F "tokens=1,2 delims=: " %%a in ('type !LOGSTASH_VERSION_FILE1!') do (
if "%%a"=="logstash" set LOGSTASH_VERSION=%%b
)
) else (
if exist !LOGSTASH_VERSION_FILE2! (
rem this file is present for a git checkout type install
rem but its not in zip, deb and rpm artifacts (and in integration tests)
for /F "tokens=1,2 delims=: " %%a in (!LOGSTASH_VERSION_FILE2!) do (
for /F "tokens=1,2 delims=: " %%a in ('type !LOGSTASH_VERSION_FILE2!') do (
if "%%a"=="logstash" set LOGSTASH_VERSION=%%b
)
)
@ -81,11 +76,12 @@ goto :end
:concat
IF not defined CLASSPATH (
set CLASSPATH="%~1"
set CLASSPATH=%~1
) ELSE (
set CLASSPATH=%CLASSPATH%;"%~1"
set CLASSPATH=%CLASSPATH%;%~1
)
goto :eof
:end
endlocal
exit /B %ERRORLEVEL%

View file

@ -14,7 +14,8 @@
# The following env var will be used by this script if set:
# LS_GEM_HOME and LS_GEM_PATH to overwrite the path assigned to GEM_HOME and GEM_PATH
# LS_JAVA_OPTS to append extra options to the JVM options provided by logstash
# JAVA_HOME to point to the java home
# LS_JAVA_HOME to point to the java home (takes precedence over JAVA_HOME)
# (deprecated) JAVA_HOME to point to the java home
unset CDPATH
# This unwieldy bit of scripting is to try to catch instances where Logstash
@ -66,26 +67,64 @@ for i in "$@"; do
fi
done
parse_jvm_options() {
if [ -f "$1" ]; then
echo "$(grep "^-" "$1" | tr '\n' ' ')"
setup_bundled_jdk_part() {
OS_NAME="$(uname -s)"
if [ $OS_NAME = "Darwin" ]; then
BUNDLED_JDK_PART="jdk.app/Contents/Home"
else
BUNDLED_JDK_PART="jdk"
fi
}
# Accepts 1 parameter which is the path the directory where logstash jar are contained.
setup_classpath() {
local jar_directory="${1?jar directory required}"
local classpath
for J in $(cd "${jar_directory}"; ls *.jar); do
classpath=${classpath}${classpath:+:}${jar_directory}/${J}
done
echo "${classpath}"
}
setup_java() {
# set the path to java into JAVACMD which will be picked up by JRuby to launch itself
if [ -z "$JAVACMD" ]; then
if [ -x "$JAVA_HOME/bin/java" ]; then
JAVACMD="$JAVA_HOME/bin/java"
else
setup_bundled_jdk_part
JAVACMD_TEST=`command -v java`
if [ -n "$LS_JAVA_HOME" ]; then
echo "Using LS_JAVA_HOME defined java: ${LS_JAVA_HOME}."
if [ -x "$LS_JAVA_HOME/bin/java" ]; then
JAVACMD="$LS_JAVA_HOME/bin/java"
if [ -d "${LOGSTASH_HOME}/${BUNDLED_JDK_PART}" -a -x "${LOGSTASH_HOME}/${BUNDLED_JDK_PART}/bin/java" ]; then
echo "WARNING: Using LS_JAVA_HOME while Logstash distribution comes with a bundled JDK."
fi
else
echo "Invalid LS_JAVA_HOME, doesn't contain bin/java executable."
fi
elif [ -n "$JAVA_HOME" ]; then
echo "Using JAVA_HOME defined java: ${JAVA_HOME}"
if [ -x "$JAVA_HOME/bin/java" ]; then
JAVACMD="$JAVA_HOME/bin/java"
if [ -d "${LOGSTASH_HOME}/${BUNDLED_JDK_PART}" -a -x "${LOGSTASH_HOME}/${BUNDLED_JDK_PART}/bin/java" ]; then
echo "WARNING: Using JAVA_HOME while Logstash distribution comes with a bundled JDK."
fi
else
echo "Invalid JAVA_HOME, doesn't contain bin/java executable."
fi
echo "DEPRECATION: The use of JAVA_HOME is now deprecated and will be removed starting from 8.0. Please configure LS_JAVA_HOME instead."
elif [ -d "${LOGSTASH_HOME}/${BUNDLED_JDK_PART}" -a -x "${LOGSTASH_HOME}/${BUNDLED_JDK_PART}/bin/java" ]; then
echo "Using bundled JDK: ${LOGSTASH_HOME}/${BUNDLED_JDK_PART}"
JAVACMD="${LOGSTASH_HOME}/${BUNDLED_JDK_PART}/bin/java"
elif [ -n "$JAVACMD_TEST" ]; then
set +e
JAVACMD=`command -v java`
set -e
echo "Using system java: $JAVACMD"
fi
fi
if [ ! -x "$JAVACMD" ]; then
echo "could not find java; set JAVA_HOME or ensure java is in PATH"
echo "Could not find java; set LS_JAVA_HOME or ensure java is in PATH."
exit 1
fi
@ -107,24 +146,12 @@ setup_java() {
LS_GC_LOG_FILE="./logstash-gc.log"
fi
# Set the initial JVM options from the jvm.options file. Look in
# /etc/logstash first, and break if that file is found readable there.
if [ -z "$LS_JVM_OPTS" ]; then
for jvm_options in /etc/logstash/jvm.options \
"$LOGSTASH_HOME"/config/jvm.options;
do
if [ -r "$jvm_options" ]; then
LS_JVM_OPTS=$jvm_options
break
fi
done
fi
# then override with anything provided
LS_JAVA_OPTS="$(parse_jvm_options "$LS_JVM_OPTS") $LS_JAVA_OPTS"
JAVA_OPTS=$LS_JAVA_OPTS
# jruby launcher uses JAVACMD as its java executable and JAVA_OPTS as the JVM options
export JAVACMD
CLASSPATH="$(setup_classpath $LOGSTASH_JARS)"
JAVA_OPTS=`exec "${JAVACMD}" -cp "${CLASSPATH}" org.logstash.launchers.JvmOptionsParser "$LOGSTASH_HOME" "$LS_JVM_OPTS"`
unset CLASSPATH
export JAVA_OPTS
}

29
bin/pqcheck.bat Normal file
View file

@ -0,0 +1,29 @@
@echo off
setlocal enabledelayedexpansion
call "%~dp0setup.bat" || exit /b 1
if errorlevel 1 (
if not defined nopauseonerror (
pause
)
exit /B %ERRORLEVEL%
)
set JAVA_OPTS=%LS_JAVA_OPTS%
for %%i in ("%LS_HOME%\logstash-core\lib\jars\*.jar") do (
call :concat "%%i"
)
"%JAVACMD%" %JAVA_OPTS% -cp "%CLASSPATH%" org.logstash.ackedqueue.PqCheck %*
:concat
IF not defined CLASSPATH (
set CLASSPATH="%~1"
) ELSE (
set CLASSPATH=%CLASSPATH%;"%~1"
)
goto :eof
endlocal

29
bin/pqrepair.bat Normal file
View file

@ -0,0 +1,29 @@
@echo off
setlocal enabledelayedexpansion
call "%~dp0setup.bat" || exit /b 1
if errorlevel 1 (
if not defined nopauseonerror (
pause
)
exit /B %ERRORLEVEL%
)
set JAVA_OPTS=%LS_JAVA_OPTS%
for %%i in ("%LS_HOME%\logstash-core\lib\jars\*.jar") do (
call :concat "%%i"
)
"%JAVACMD%" %JAVA_OPTS% -cp "%CLASSPATH%" org.logstash.ackedqueue.PqRepair %*
:concat
IF not defined CLASSPATH (
set CLASSPATH="%~1"
) ELSE (
set CLASSPATH=%CLASSPATH%;"%~1"
)
goto :eof
endlocal

View file

@ -5,6 +5,6 @@ unset CDPATH
setup
# use faster starting JRuby options see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1"
export JRUBY_OPTS="${JRUBY_OPTS---dev}"
ruby_exec "${LOGSTASH_HOME}/lib/bootstrap/rspec.rb" "$@"

View file

@ -12,7 +12,7 @@
# DEBUG=1 to output debugging information
# use faster starting JRuby options see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1"
export JRUBY_OPTS="${JRUBY_OPTS---dev}"
unset CDPATH

View file

@ -20,13 +20,30 @@ for %%I in ("%LS_HOME%..") do set LS_HOME=%%~dpfI
rem ### 2: set java
if defined JAVA_HOME (
set JAVA="%JAVA_HOME%\bin\java.exe"
if defined LS_JAVA_HOME (
set JAVACMD=%LS_JAVA_HOME%\bin\java.exe
echo Using LS_JAVA_HOME defined java: %LS_JAVA_HOME%
if exist "%LS_HOME%\jdk" (
echo WARNING: Using LS_JAVA_HOME while Logstash distribution comes with a bundled JDK.
)
) else if defined JAVA_HOME (
set JAVACMD="%JAVA_HOME%\bin\java.exe"
echo Using JAVA_HOME defined java: %JAVA_HOME%
if exist "%LS_HOME%\jdk" (
echo WARNING: Using JAVA_HOME while Logstash distribution comes with a bundled JDK.
)
echo DEPRECATION: The use of JAVA_HOME is now deprecated and will be removed starting from 8.0. Please configure LS_JAVA_HOME instead.
) else (
for %%I in (java.exe) do set JAVA="%%~$PATH:I"
if exist "%LS_HOME%\jdk" (
set JAVACMD=%LS_HOME%\jdk\bin\java.exe
echo "Using bundled JDK: !JAVACMD!"
) else (
for %%I in (java.exe) do set JAVACMD="%%~$PATH:I"
echo "Using system java: !JAVACMD!"
)
)
if not exist %JAVA% (
if not exist "%JAVACMD%" (
echo could not find java; set JAVA_HOME or ensure java is in PATH 1>&2
exit /b 1
)
@ -52,4 +69,4 @@ if not exist %JRUBY_BIN% (
exit /b 1
)
set RUBYLIB=%LS_HOME%\lib
set RUBYLIB=%LS_HOME%\lib

View file

@ -17,8 +17,8 @@ elif [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
echo
echo "OPTIONSFILE: Full path to a startup.options file"
echo "OPTIONSFILE is required if STARTUPTYPE is specified, but otherwise looks first"
echo "in $LOGSTASH_HOME/config/startup.options and then /etc/logstash/startup.options"
echo "Last match wins"
echo "in /etc/logstash/startup.options and then "
echo "in $LOGSTASH_HOME/config/startup.options "
echo
echo "STARTUPTYPE: e.g. sysv, upstart, systemd, etc."
echo "OPTIONSFILE is required to specify a STARTUPTYPE."
@ -61,7 +61,7 @@ done
# bin/logstash-plugin is a short lived ruby script thus we can use aggressive "faster starting JRuby options"
# see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
export JRUBY_OPTS="$JRUBY_OPTS $OPEN_JAVA_MODULES -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
tempfile=$(mktemp)
if [ "x${PRESTART}" == "x" ]; then

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,17 @@
apply plugin: 'java'
apply plugin: 'groovy'
group = 'org.logstash.gradle'
plugins {
id 'groovy'
id 'java'
}
repositories {
mavenCentral()
mavenCentral()
}
dependencies {
compile group: 'org.jruby', name: 'jruby-complete', version: '9.2.5.0'
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
}
test {
useJUnitPlatform()
}

View file

@ -1,103 +0,0 @@
package org.logstash.gradle
import org.jruby.Ruby
import org.jruby.embed.PathType
import org.jruby.embed.ScriptingContainer
final class RubyGradleUtils {
private final File buildDir
private final File projectDir
RubyGradleUtils(File buildDir, File projectDir) {
this.buildDir = buildDir
this.projectDir = projectDir
}
/**
* Executes a bundler bin script with given parameters.
* @param pwd Current worker directory to execute in
* @param bundleBin Bundler Bin Script
* @param args CLI Args to Use with Bundler
*/
void bundle(String pwd, String bundleBin, Iterable<String> args) {
bundle(pwd, bundleBin, args, Collections.emptyMap())
}
/**
* Executes a bundler bin script with given parameters.
* @param pwd Current worker directory to execute in
* @param bundleBin Bundler Bin Script
* @param args CLI Args to Use with Bundler
* @param env Environment Variables to Set
*/
void bundle(String pwd, String bundleBin, Iterable<String> args, Map<String, String> env) {
executeJruby { ScriptingContainer jruby ->
jruby.environment.putAll(env)
jruby.currentDirectory = pwd
jruby.argv = args.toList().toArray()
jruby.runScriptlet(PathType.ABSOLUTE, bundleBin)
}
}
/**
* Installs a Gem with the given version to the given path.
* @param gem Gem Name
* @param version Version to Install
* @param path Path to Install to
*/
void gem(String gem, String version, String path) {
executeJruby { ScriptingContainer jruby ->
jruby.currentDirectory = projectDir
jruby.runScriptlet(
"require 'rubygems/commands/install_command'\n" +
"cmd = Gem::Commands::InstallCommand.new\n" +
"cmd.handle_options [\"--no-ri\", \"--no-rdoc\", '${gem}', '-v', '${version}', '-i', '${path}']\n" +
"begin \n" +
" cmd.execute\n" +
"rescue Gem::SystemExitException => e\n" +
" raise e unless e.exit_code == 0\n" +
"end"
)
}
}
/**
* Executes RSpec for a given plugin.
* @param plugin Plugin to run specs for
* @param args CLI arguments to pass to rspec
*/
void rake(String task) {
executeJruby { ScriptingContainer jruby ->
jruby.currentDirectory = projectDir
jruby.runScriptlet("require 'rake'")
jruby.runScriptlet(
"rake = Rake.application\n" +
"rake.init\n" +
"rake.load_rakefile\n" +
"rake['${task}'].invoke"
)
}
}
/**
* Executes Closure using a fresh JRuby environment, safely tearing it down afterwards.
* @param block Closure to run
*/
Object executeJruby(Closure<?> block) {
def jruby = new ScriptingContainer()
def env = jruby.environment
def gemDir = "${projectDir}/vendor/bundle/jruby/2.5.0".toString()
env.put "USE_RUBY", "1"
env.put "GEM_HOME", gemDir
env.put "GEM_SPEC_CACHE", "${buildDir}/cache".toString()
env.put "GEM_PATH", gemDir
try {
return block(jruby)
} finally {
jruby.terminate()
Ruby.clearGlobalRuntime()
}
}
}

View file

@ -0,0 +1,50 @@
package org.logstash.gradle.tooling
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.Input
import org.gradle.api.artifacts.Dependency
import java.nio.file.Files
class ListProjectDependencies extends DefaultTask {
@Input
String report = 'licenses.csv'
@OutputFile
File reportFile = project.file("${project.buildDir}/reports/dependency-license/" + report)
@OutputDirectory
File reportDir = reportFile.toPath().parent.toFile()
ListProjectDependencies() {
description = "Lists the projects dependencies in a CSV file"
group = "org.logstash.tooling"
}
@TaskAction
def list() {
// collect all project's dependencies
Set<Dependency> moduleDeps = new HashSet<>()
moduleDeps.addAll(project.configurations.implementation.getAllDependencies())
moduleDeps.addAll(project.configurations.runtimeClasspath.getAllDependencies())
moduleDeps.addAll(project.configurations.runtimeOnly.getAllDependencies())
def depsInGAV = moduleDeps.collect {dep ->
"${dep.group}:${dep.name}:${dep.version}"
}
// output in a CSV to be read by dependencies-report tool
Files.createDirectories(reportFile.toPath().parent)
reportFile.withWriter('utf-8') { writer ->
writer.writeLine '"artifact","moduleUrl","moduleLicense","moduleLicenseUrl",'
depsInGAV.each { s ->
writer.writeLine "\"$s\",,,,"
}
}
}
}

View file

@ -0,0 +1,28 @@
package org.logstash.gradle.tooling
import groovy.json.JsonSlurper
/**
* Helper class to obtain project specific (e.g. Elasticsearch or beats/filebeat) snapshot-DRA artifacts.
* We use it in all cases apart from release builds.
* */
class SnapshotArtifactURLs {
/**
* Returns a list of the package and package SHA(512) URLs for a given project / version / downloadedPackageName
* */
static def packageUrls(String project, String projectVersion, String downloadedPackageName) {
String artifactSnapshotVersionsApiPrefix = "https://artifacts-snapshot.elastic.co"
// e.g. https://artifacts-snapshot.elastic.co/elasticsearch/latest/8.11.5-SNAPSHOT.json
String apiResponse = "${artifactSnapshotVersionsApiPrefix}/${project}/latest/${projectVersion}.json".toURL().text
def artifactUrls = new JsonSlurper().parseText(apiResponse)
String manifestUrl = artifactUrls["manifest_url"]
// e.g. https://artifacts-snapshot.elastic.co/elasticsearch/8.11.5-12345678/manifest-8.11.5-SNAPSHOT.json
apiResponse = manifestUrl.toURL().text
def packageArtifactUrls = new JsonSlurper().parseText(apiResponse)
String packageUrl = packageArtifactUrls["projects"]["${project}"]["packages"]["${downloadedPackageName}.tar.gz"]["url"]
String packageShaUrl = packageArtifactUrls["projects"]["${project}"]["packages"]["${downloadedPackageName}.tar.gz"]["sha_url"]
return ["packageUrl": packageUrl, "packageShaUrl": packageShaUrl]
}
}

View file

@ -1,29 +0,0 @@
package org.logstash.gradle;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
/**
* Stream that can be used to forward Gradle Exec task output to an arbitrary {@link PrintStream}.
*/
public final class ExecLogOutputStream extends ByteArrayOutputStream {
/**
* Underlying {@link PrintStream} to flush output to.
*/
private final PrintStream stream;
/**
* Ctor.
* @param stream PrintStream to flush to
*/
public ExecLogOutputStream(final PrintStream stream) {
this.stream = stream;
}
@Override
public synchronized void flush() {
stream.print(toString());
reset();
}
}

View file

@ -0,0 +1,43 @@
package org.logstash.gradle.tooling
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.gradle.api.*
import org.gradle.testfixtures.ProjectBuilder
class ListProjectDependenciesTest {
static final TASK_NAME = 'generateLicenseReport'
Project project
@BeforeEach
void setUp() {
project = ProjectBuilder.builder().build()
project.getConfigurations().create("implementation")
project.getConfigurations().create("runtimeClasspath")
project.getConfigurations().create("runtimeOnly")
}
@Test
void "list dependencies"() {
// configure the project to have Jetty client as a dependency
project.getDependencies().add('implementation',
[group: "org.eclipse.jetty", name: "jetty-client", version: "9.4.43.v20210629", configuration: "implementation"])
// configure and execute the task
project.task(TASK_NAME, type: ListProjectDependencies) {
report = "test.csv"
reportFile = project.buildDir.toPath().resolve("test.csv").toFile()
}
def task = project.tasks.findByName(TASK_NAME)
task != null
task.list()
// Verify the CSV generated
List<String> fileContents = new File("${project.buildDir}/test.csv").readLines()
assert fileContents.size() == 2
assert fileContents[0] == '"artifact","moduleUrl","moduleLicense","moduleLicenseUrl",'
assert fileContents[1] == '"org.eclipse.jetty:jetty-client:9.4.43.v20210629",,,,'
}
}

View file

@ -1,81 +1,54 @@
#!/usr/bin/env bash
set -e
set -x
set -eo pipefail
function get_package_type {
# determines OS packaging system; at the moment either rpm or deb
source /etc/os-release
if [[ $ID == "ubuntu" || $ID == "debian" || $ID_LIKE == "debian" ]]; then
PACKAGE_TYPE="deb"
elif [[ $ID_LIKE == *"rhel"* || $ID_LIKE == *"fedora"* || $ID_LIKE == *"suse"* ]]; then
PACKAGE_TYPE="rpm"
else
echo "^^^ +++ Unsupported Linux distribution [$ID]. Acceptance packaging tests only support deb or rpm based distributions. Exiting."
exit 1
fi
}
# 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-Xmx1g"
export GRADLE_OPTS="-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
export GRADLE_OPTS="-Xmx4g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
export OSS=true
SELECTED_TEST_SUITE=$1
# The acceptance test in our CI infrastructure doesn't clear the workspace between run
# this mean the lock of the Gemfile can be sticky from a previous run, before generating any package
# we will clear them out to make sure we use the latest version of theses files
# If we don't do this we will run into gem Conflict error.
[ -f Gemfile ] && rm Gemfile
[ -f Gemfile.lock ] && rm Gemfile.lock
# When running these tests in a Jenkins matrix, in parallel, once one Vagrant job is done, the Jenkins ProcessTreeKiller will kill any other Vagrant processes with the same
# BUILD_ID unless you set this magic flag: https://wiki.jenkins.io/display/JENKINS/ProcessTreeKiller
export BUILD_ID=dontKillMe
LS_HOME="$PWD"
QA_DIR="$PWD/qa"
# Always run the halt, even if the test times out or an exit is sent
cleanup() {
cd $QA_DIR
bundle check || bundle install
bundle exec rake qa:vm:halt
}
trap cleanup EXIT
cd $LS_HOME
# Cleanup any stale VMs from old jobs first
cleanup
get_package_type
if [[ $SELECTED_TEST_SUITE == $"redhat" ]]; then
echo "Generating the RPM, make sure you start with a clean environment before generating other packages."
cd $LS_HOME
rake artifact:rpm
echo "Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "Acceptance: Running the tests"
bundle exec rake qa:vm:setup["redhat"]
bundle exec rake qa:vm:ssh_config
bundle exec rake qa:acceptance:redhat
bundle exec rake qa:vm:halt["redhat"]
elif [[ $SELECTED_TEST_SUITE == $"debian" ]]; then
echo "Generating the DEB, make sure you start with a clean environment before generating other packages."
cd $LS_HOME
rake artifact:deb
echo "Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "Acceptance: Running the tests"
bundle exec rake qa:vm:setup["debian"]
bundle exec rake qa:vm:ssh_config
bundle exec rake qa:acceptance:debian
bundle exec rake qa:vm:halt["debian"]
elif [[ $SELECTED_TEST_SUITE == $"all" ]]; then
echo "Building Logstash artifacts"
cd $LS_HOME
rake artifact:all
echo "Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "Acceptance: Running the tests"
bundle exec rake qa:vm:setup
bundle exec rake qa:vm:ssh_config
bundle exec rake qa:acceptance:all
bundle exec rake qa:vm:halt
# in CI (Buildkite), packaging artifacts are pre-built from a previous step
if [[ $BUILDKITE == true ]]; then
export LS_ARTIFACTS_PATH="$HOME/build"
echo "--- Downloading artifacts from \"build/*${PACKAGE_TYPE}\" to $LS_ARTIFACTS_PATH"
set -x
# also creates build/ under $HOME
buildkite-agent artifact download "build/*${PACKAGE_TYPE}" $HOME
set +x
echo "--- Running gradle"
./gradlew clean bootstrap
else
echo "--- Detected a distribution that supports \033[33m[$PACKAGE_TYPE]\033[0m packages. Running gradle."
./gradlew clean bootstrap
echo "--- Building Logstash artifacts"
rake artifact:$PACKAGE_TYPE
fi
echo "--- Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "--- Acceptance: Running the tests"
rake qa:acceptance:all

View file

@ -0,0 +1,3 @@
#!/bin/bash
./gradlew installDefaultGems

75
ci/docker_acceptance_tests.sh Executable file
View file

@ -0,0 +1,75 @@
#!/usr/bin/env bash
set -e
set -x
# 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-Xmx1g"
export GRADLE_OPTS="-Xmx4g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
# Can run either a specific flavor, or all flavors -
# eg `ci/acceptance_tests.sh oss` will run tests for open source container
# `ci/acceptance_tests.sh full` will run tests for the default container
# `ci/acceptance_tests.sh ubi8` will run tests for the ubi8 based container
# `ci/acceptance_tests.sh` will run tests for all containers
SELECTED_TEST_SUITE=$1
# The acceptance test in our CI infrastructure doesn't clear the workspace between run
# this mean the lock of the Gemfile can be sticky from a previous run, before generating any package
# we will clear them out to make sure we use the latest version of theses files
# If we don't do this we will run into gem Conflict error.
[ -f Gemfile ] && rm Gemfile
[ -f Gemfile.lock ] && rm Gemfile.lock
LS_HOME="$PWD"
QA_DIR="$PWD/qa"
cd $QA_DIR
bundle check || bundle install
echo "Building Logstash artifacts"
cd $LS_HOME
if [[ $SELECTED_TEST_SUITE == "oss" ]]; then
echo "--- Building $SELECTED_TEST_SUITE docker images"
cd $LS_HOME
rake artifact:docker_oss
echo "--- Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "--- Acceptance: Running the tests"
bundle exec rspec docker/spec/oss/*_spec.rb
elif [[ $SELECTED_TEST_SUITE == "full" ]]; then
echo "--- Building $SELECTED_TEST_SUITE docker images"
cd $LS_HOME
rake artifact:docker
echo "--- Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "--- Acceptance: Running the tests"
bundle exec rspec docker/spec/full/*_spec.rb
elif [[ $SELECTED_TEST_SUITE == "ubi8" ]]; then
echo "--- Building $SELECTED_TEST_SUITE docker images"
cd $LS_HOME
rake artifact:docker_ubi8
echo "--- Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "--- Acceptance: Running the tests"
bundle exec rspec docker/spec/ubi8/*_spec.rb
else
echo "--- Building all docker images"
cd $LS_HOME
rake artifact:docker_only
echo "--- Acceptance: Installing dependencies"
cd $QA_DIR
bundle install
echo "--- Acceptance: Running the tests"
bundle exec rspec docker/spec/**/*_spec.rb
fi

View file

@ -1,2 +1,4 @@
#!/bin/bash
# we may pass "persistent_queues" to FEATURE_FLAG to enable PQ in the integration tests
export DOCKER_ENV_OPTS="${DOCKER_ENV_OPTS} -e FEATURE_FLAG"
ci/docker_run.sh logstash-integration-tests ci/integration_tests.sh $@

View file

@ -6,6 +6,7 @@ set -x # We want verbosity here, this mostly runs on CI and we want to easily de
#Note - ensure that the -e flag is NOT set, and explicitly check the $? status to allow for clean up
REMOVE_IMAGE=false
DOCKER_EXTERNAL_JDK=""
if [ -z "$branch_specifier" ]; then
# manual
REMOVE_IMAGE=true
@ -33,8 +34,13 @@ cleanup() {
}
trap cleanup EXIT
if [ -n "$JDK" ]; then
echo "JDK to use $JDK"
DOCKER_EXTERNAL_JDK="--mount type=bind,source=$JDK,target=$JDK,readonly --env BUILD_JAVA_HOME=$JDK"
fi
# Run the command, skip the first argument, which is the image name
docker run $DOCKER_ENV_OPTS --cidfile=docker_cid --sig-proxy=true --rm $IMAGE_NAME ${@:2}
docker run $DOCKER_ENV_OPTS --cidfile=docker_cid --sig-proxy=true $DOCKER_EXTERNAL_JDK --rm $IMAGE_NAME ${@:2}
exit_code=$?
# Remove the container cid since we ran cleanly, no need to force rm it if we got to this point

49
ci/dra_common.sh Executable file
View file

@ -0,0 +1,49 @@
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"
if [ "${arch}" != "aarch64" ]; then
# No logstash-ubi8 for AARCH64
images="logstash logstash-oss logstash-ubi8"
fi
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
}
function upload_to_bucket {
local file="${1:?file required}"
local version="${2:?stack-version required}"
info "Uploading ${file}..."
gsutil cp "${file}" "gs://logstash-ci-artifacts/dra/${version}/"
}
# 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-Xmx1g"
# 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_OPT environment variable
STACK_VERSION=`cat versions.yml | sed -n 's/^logstash\:[[:space:]]\([[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\)$/\1/p'`
# ARCH is a Environment variable set in Jenkins
if [ -z "$ARCH" ]; then
ARCH=aarch64
fi

90
ci/dra_docker.sh Executable file
View file

@ -0,0 +1,90 @@
#!/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")/dra_common.sh
# WORKFLOW_TYPE is a CI externally configured environment variable that could assume "snapshot" or "staging" values
case "$WORKFLOW_TYPE" in
snapshot)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
rake artifact:docker || error "artifact:docker build failed."
rake artifact:docker_oss || error "artifact:docker_oss build failed."
rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
else
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker || error "artifact:docker build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker_oss || error "artifact:docker_oss build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
staging)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
RELEASE=1 rake artifact:docker || error "artifact:docker build failed."
RELEASE=1 rake artifact:docker_oss || error "artifact:docker_oss build failed."
RELEASE=1 rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
RELEASE=1 rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
else
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker || error "artifact:docker build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker_oss || error "artifact:docker_oss build failed."
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:dockerfiles || error "artifact:dockerfiles build failed."
if [ "$ARCH" != "aarch64" ]; then
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 rake artifact:docker_ubi8 || error "artifact:docker_ubi8 build failed."
fi
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
*)
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
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 TO INTERMEDIATE BUCKET"
# Note the deb, rpm tar.gz AARCH64 files generated has already been loaded by the dra_x86_64.sh
images="logstash logstash-oss"
if [ "$ARCH" != "aarch64" ]; then
# No logstash-ubi8 for AARCH64
images="logstash logstash-oss logstash-ubi8"
fi
for image in ${images}; do
upload_to_bucket "build/$image-${STACK_VERSION}-docker-image-${ARCH}.tar.gz" ${STACK_VERSION}
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-ubi8 logstash-ironbank; do
upload_to_bucket "build/${image}-${STACK_VERSION}-docker-build-context.tar.gz" ${STACK_VERSION}
done
fi
echo "####################################################################"
echo "##################### Finishing $0"
echo "####################################################################"

139
ci/dra_upload.sh Executable file
View file

@ -0,0 +1,139 @@
#!/bin/bash -iex
#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")/dra_common.sh
PLAIN_STACK_VERSION=$STACK_VERSION
# 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=main
fi
if [ -n "$VERSION_QUALIFIER_OPT" ]; then
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
PLAIN_STACK_VERSION="${PLAIN_STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
case "$WORKFLOW_TYPE" in
snapshot)
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
;;
staging)
;;
*)
error "Worklflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
info "Uploading artifacts for ${WORKFLOW_TYPE} workflow on branch: ${RELEASE_BRANCH}"
info "Download all the artifacts for version ${STACK_VERSION}"
mkdir build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.deb build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}.csv build/
# no arch
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.deb build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.rpm build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-no-jdk.zip build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.deb build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.rpm build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-no-jdk.zip build/
# windows
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-windows-x86_64.zip build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-windows-x86_64.zip build/
# unix x86
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-amd64.deb build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-x86_64.rpm build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-linux-x86_64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-darwin-x86_64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-amd64.deb build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-x86_64.rpm build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-linux-x86_64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-darwin-x86_64.tar.gz build/
# unix ARM
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-arm64.deb build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-aarch64.rpm build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-linux-aarch64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-arm64.deb build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-aarch64.rpm build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-linux-aarch64.tar.gz build/
if [ "$RELEASE_VER" != "7.17" ]; then
# Version 7.17.x doesn't generates ARM artifacts for Darwin
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-darwin-aarch64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-darwin-aarch64.tar.gz build/
fi
# docker
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-docker-build-context.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ironbank-${STACK_VERSION}-docker-build-context.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-docker-build-context.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ubi8-${STACK_VERSION}-docker-build-context.tar.gz build/
# docker x86
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-docker-image-x86_64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-docker-image-x86_64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ubi8-${STACK_VERSION}-docker-image-x86_64.tar.gz build/
# docker ARM
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}-docker-image-aarch64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-oss-${STACK_VERSION}-docker-image-aarch64.tar.gz build/
# Commenting out ubi8 for aarch64 for the time being. This image itself is not being built, and it is not expected
# by the release manager.
# See https://github.com/elastic/infra/blob/master/cd/release/release-manager/project-configs/8.5/logstash.gradle
# for more details.
#gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-ubi8-${STACK_VERSION}-docker-image-aarch64.tar.gz build/
gsutil cp gs://logstash-ci-artifacts/dra/${STACK_VERSION}/logstash-${STACK_VERSION}.csv build/
info "Downloaded ARTIFACTS"
for file in build/logstash-*; do shasum $file;done
mkdir -p build/distributions/dependencies-reports/
mv build/logstash-${STACK_VERSION}.csv build/distributions/dependencies-${STACK_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
# ensure the latest image has been pulled
docker pull docker.elastic.co/infra/release-manager:latest
# collect the artifacts for use with the unified build
docker run --rm \
--name release-manager \
-e VAULT_ADDR \
-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 "${PLAIN_STACK_VERSION}" \
--artifact-set main
echo "####################################################################"
echo "##################### Finishing $0"
echo "####################################################################"

63
ci/dra_x86_64.sh Executable file
View file

@ -0,0 +1,63 @@
#!/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")/dra_common.sh
# WORKFLOW_TYPE is a CI externally configured environment variable that could assume "snapshot" or "staging" values
case "$WORKFLOW_TYPE" in
snapshot)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
else
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
STACK_VERSION=${STACK_VERSION}-SNAPSHOT
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
staging)
info "Building artifacts for the $WORKFLOW_TYPE workflow..."
if [ -z "$VERSION_QUALIFIER_OPT" ]; then
RELEASE=1 SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
else
# Qualifier is passed from CI as optional field and specify the version postfix
# in case of alpha or beta releases:
# e.g: 8.0.0-alpha1
VERSION_QUALIFIER="$VERSION_QUALIFIER_OPT" RELEASE=1 SKIP_DOCKER=1 rake artifact:all || error "rake artifact:all build failed."
STACK_VERSION="${STACK_VERSION}-${VERSION_QUALIFIER_OPT}"
fi
info "Build complete, setting STACK_VERSION to $STACK_VERSION."
;;
*)
error "Workflow (WORKFLOW_TYPE variable) is not set, exiting..."
;;
esac
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 TO INTERMEDIATE BUCKET"
for file in build/logstash-*; do
upload_to_bucket $file ${STACK_VERSION}
done
# Upload Dependencies Report
upload_to_bucket "build/distributions/dependencies-reports/logstash-${STACK_VERSION}.csv" ${STACK_VERSION}
echo "####################################################################"
echo "##################### Finishing $0"
echo "####################################################################"

View file

@ -5,12 +5,16 @@
# 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-Xmx1g"
export GRADLE_OPTS="-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
export GRADLE_OPTS="-Xmx4g -Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
export SPEC_OPTS="--order rand --format documentation"
export CI=true
export OSS=true
if [ -n "$BUILD_JAVA_HOME" ]; then
GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.java.home=$BUILD_JAVA_HOME"
fi
if [[ $1 = "setup" ]]; then
echo "Setup only, no tests will be run"
exit 0

View file

@ -1,7 +1,12 @@
#!/bin/bash -i
export GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
export GRADLE_OPTS="-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
./gradlew installDefaultGems
bin/dependencies-report --csv report.csv
result=$?
# We want this to show on the CI server
cat report.csv
exit $result

View file

@ -1,48 +0,0 @@
@echo off
setlocal enabledelayedexpansion
if "%WORKSPACE%" == "" (
echo Error: environment variable WORKSPACE must be defined. Aborting..
exit /B 1
)
:: see if %WORKSPACE% is already mapped to a drive
for /f "tokens=1* delims==> " %%G IN ('subst') do (
set sdrive=%%G
:: removing extra space
set sdrive=!sdrive:~0,2!
set spath=%%H
if /I "!spath!" == "%WORKSPACE%" (
set use_drive=!sdrive!
goto :found_drive
)
)
:: no existing mapping
:: try to assign "%WORKSPACE%" to the first drive letter which works
for %%i in (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z) do (
set "drive=%%i:"
subst !drive! "%WORKSPACE%" >nul
if not errorlevel 1 (
set use_drive=!drive!
goto :found_drive
)
)
echo Error: unable to subst drive to path %WORKSPACE%. Aborting...
exit /B 1
:found_drive
echo Using drive !use_drive! for %WORKSPACE%
:: change current directory to that drive
!use_drive!
echo Running core tests..
call .\gradlew.bat test --console=plain --no-daemon --info
if errorlevel 1 (
echo Error: failed to run core tests. Aborting..
exit /B 1
)

106
ci/unit_tests.ps1 Normal file
View file

@ -0,0 +1,106 @@
<#
.SYNOPSIS
This is a gradle wrapper script to help run the Logstash unit tests on Windows.
.PARAMETER UnnamedArgument1
Optionally allows to specify a subset of tests.
Allows values are "ruby" or "java".
If unset, all tests are executed.
.EXAMPLE
.\ci\unit_tests.ps1
Runs all unit tests.
.\ci\unit_tests.ps1 java
Runs only Java unit tests.
#>
$selectedTestSuite="all"
if ($args.Count -eq 1) {
$selectedTestSuite=$args[0]
}
$startingPath = Get-Location
## Map a drive letter to the current path to avoid path length issues
# First, check if there is already a mapping
$currentDir = $PWD.Path
$substOutput = subst
# Filter the subst output based on the path
$matchedLines = $substOutput | Where-Object { $_ -like "*$currentDir*" }
if ($matchedLines) {
# $currentDir seems to be already mapped to another drive letter; switch to this drive
# Extract the drive letter from the matched lines
$driveLetter = $matchedLines | ForEach-Object {
# Split the line by colon and extract the drive letter
($_ -split ':')[0]
}
$drivePath = "$driveLetter`:"
Write-Output "$currentDir is already mapped to $drivePath."
Set-Location -Path $drivePath
Write-Output "Changing drive to $drivePath."
}
else {
# $currentDir isn't mapped to a drive letter, let's find a free drive letter and change to it
# Loop through drive letters A to Z; we don't use the 'A'..'Z' for BWC with Windows 2016 / Powershell < 7
for ($driveLetterAscii = 65; $driveLetterAscii -le 90; $driveLetterAscii++) {
$drivePath = [char]$driveLetterAscii + ":"
# check if the drive letter is available
if (-not (Test-Path $drivePath)) {
# found a free drive letter, create the virtual drive mapping and switch to it
subst $drivePath $currentDir
Write-Output "Mapped $currentDir to $drivePath"
Set-Location -Path $drivePath
Write-Output "Changing drive to $drivePath."
# exit the loop since we found a free drive letter
break
}
}
}
if (Test-Path Env:BUILD_JAVA_HOME) {
if (Test-Path Env:GRADLE_OPTS) {
$env:GRADLE_OPTS=$env:GRADLE_OPTS + " " + "-Dorg.gradle.java.home=" + $env:BUILD_JAVA_HOME
} else {
$env:GRADLE_OPTS="-Dorg.gradle.java.home=" + $env:BUILD_JAVA_HOME
}
}
$testOpts = "GRADLE_OPTS: $env:GRADLE_OPTS, BUILD_JAVA_HOME: $env:BUILD_JAVA_HOME"
try {
if ($selectedTestSuite -eq "java") {
Write-Host "~~~ :java: Running Java tests via Gradle using $testOpts"
$CIScript = ".\gradlew.bat javaTests --console=plain --no-daemon --info"
Invoke-Expression $CIScript
}
elseif ($selectedTestSuite -eq "ruby") {
Write-Host "~~~ :ruby: Running Ruby tests via Gradle using $testOpts"
$CIScript = ".\gradlew.bat rubyTests --console=plain --no-daemon --info"
Invoke-Expression $CIScript
}
else {
Write-Host "~~~ Running all tests via Gradle using $testOpts"
$CIScript = ".\gradlew.bat test --console=plain --no-daemon --info"
Invoke-Expression $CIScript
}
if ($LASTEXITCODE -ne 0) {
throw "Test script $CIScript failed with a non-zero code: $LASTEXITCODE"
}
} catch {
# tests failed
Write-Host "^^^ +++"
exit 1
}
# switch back to the path when the script started
Set-Location -Path $startingPath

View file

@ -5,21 +5,25 @@
# 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-Xmx1g"
export GRADLE_OPTS="-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
export GRADLE_OPTS="-Xmx4g -Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dorg.gradle.logging.level=info -Dfile.encoding=UTF-8"
export SPEC_OPTS="--order rand --format documentation"
export CI=true
export OSS=true
export TEST_DEBUG=true
if [ -n "$BUILD_JAVA_HOME" ]; then
GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.java.home=$BUILD_JAVA_HOME"
fi
SELECTED_TEST_SUITE=$1
if [[ $SELECTED_TEST_SUITE == $"java" ]]; then
echo "Running Java Tests"
./gradlew javaTests --console=plain
./gradlew javaTests --console=plain --warning-mode all
elif [[ $SELECTED_TEST_SUITE == $"ruby" ]]; then
echo "Running Ruby unit tests"
./gradlew rubyTests --console=plain
./gradlew rubyTests --console=plain --warning-mode all
else
echo "Running Java and Ruby unit tests"
./gradlew test --console=plain

View file

@ -17,9 +17,9 @@
################################################################
## GC configuration
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly
## Locale
# Set the locale language
@ -42,6 +42,9 @@
# ensure UTF-8 encoding by default (e.g. filenames)
-Dfile.encoding=UTF-8
# Set enableADS to true to enable Logstash to run on certain versions of the JDK
-Djdk.io.File.enableADS=true
# use our provided JNA always versus the system one
#-Djna.nosys=true
@ -49,6 +52,8 @@
-Djruby.compile.invokedynamic=true
# Force Compilation
-Djruby.jit.threshold=0
# Make sure joni regexp interruptability is enabled
-Djruby.regexp.interruptible=true
## heap dumps
@ -74,3 +79,9 @@
# Entropy source for randomness
-Djava.security.egd=file:/dev/urandom
# Copy the logging context from parent threads to children
-Dlog4j2.isThreadContextMapInheritable=true
17-:--add-opens java.base/sun.nio.ch=ALL-UNNAMED
17-:--add-opens java.base/java.io=ALL-UNNAMED

View file

@ -4,7 +4,7 @@ name = LogstashPropertiesConfig
appender.console.type = Console
appender.console.name = plain_console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]}%notEmpty{[%X{plugin.id}]} %m%n
appender.json_console.type = Console
appender.json_console.name = json_console
@ -14,23 +14,24 @@ appender.json_console.layout.eventEol = true
appender.rolling.type = RollingFile
appender.rolling.name = plain_rolling
appender.rolling.fileName = ${sys:ls.logs}/logstash-${sys:ls.log.format}.log
appender.rolling.filePattern = ${sys:ls.logs}/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling.fileName = ${sys:ls.logs}/logstash-plain.log
appender.rolling.filePattern = ${sys:ls.logs}/logstash-plain-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling.policies.type = Policies
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling.policies.time.interval = 1
appender.rolling.policies.time.modulate = true
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %-.10000m%n
appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]}%notEmpty{[%X{plugin.id}]} %m%n
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size = 100MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 30
appender.rolling.avoid_pipelined_filter.type = PipelineRoutingFilter
appender.json_rolling.type = RollingFile
appender.json_rolling.name = json_rolling
appender.json_rolling.fileName = ${sys:ls.logs}/logstash-${sys:ls.log.format}.log
appender.json_rolling.filePattern = ${sys:ls.logs}/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}-%i.log.gz
appender.json_rolling.fileName = ${sys:ls.logs}/logstash-json.log
appender.json_rolling.filePattern = ${sys:ls.logs}/logstash-json-%d{yyyy-MM-dd}-%i.log.gz
appender.json_rolling.policies.type = Policies
appender.json_rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.json_rolling.policies.time.interval = 1
@ -42,10 +43,25 @@ appender.json_rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.json_rolling.policies.size.size = 100MB
appender.json_rolling.strategy.type = DefaultRolloverStrategy
appender.json_rolling.strategy.max = 30
appender.json_rolling.avoid_pipelined_filter.type = PipelineRoutingFilter
appender.routing.type = PipelineRouting
appender.routing.name = pipeline_routing_appender
appender.routing.pipeline.type = RollingFile
appender.routing.pipeline.name = appender-${ctx:pipeline.id}
appender.routing.pipeline.fileName = ${sys:ls.logs}/pipeline_${ctx:pipeline.id}.log
appender.routing.pipeline.filePattern = ${sys:ls.logs}/pipeline_${ctx:pipeline.id}.%i.log.gz
appender.routing.pipeline.layout.type = PatternLayout
appender.routing.pipeline.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
appender.routing.pipeline.policy.type = SizeBasedTriggeringPolicy
appender.routing.pipeline.policy.size = 100MB
appender.routing.pipeline.strategy.type = DefaultRolloverStrategy
appender.routing.pipeline.strategy.max = 30
rootLogger.level = ${sys:ls.log.level}
rootLogger.appenderRef.console.ref = ${sys:ls.log.format}_console
rootLogger.appenderRef.rolling.ref = ${sys:ls.log.format}_rolling
rootLogger.appenderRef.routing.ref = pipeline_routing_appender
# Slowlog
@ -62,14 +78,14 @@ appender.json_console_slowlog.layout.eventEol = true
appender.rolling_slowlog.type = RollingFile
appender.rolling_slowlog.name = plain_rolling_slowlog
appender.rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}.log
appender.rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-plain.log
appender.rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-plain-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling_slowlog.policies.type = Policies
appender.rolling_slowlog.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling_slowlog.policies.time.interval = 1
appender.rolling_slowlog.policies.time.modulate = true
appender.rolling_slowlog.layout.type = PatternLayout
appender.rolling_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %.10000m%n
appender.rolling_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
appender.rolling_slowlog.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling_slowlog.policies.size.size = 100MB
appender.rolling_slowlog.strategy.type = DefaultRolloverStrategy
@ -77,8 +93,8 @@ appender.rolling_slowlog.strategy.max = 30
appender.json_rolling_slowlog.type = RollingFile
appender.json_rolling_slowlog.name = json_rolling_slowlog
appender.json_rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}.log
appender.json_rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}-%d{yyyy-MM-dd}-%i.log.gz
appender.json_rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-json.log
appender.json_rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-json-%d{yyyy-MM-dd}-%i.log.gz
appender.json_rolling_slowlog.policies.type = Policies
appender.json_rolling_slowlog.policies.time.type = TimeBasedTriggeringPolicy
appender.json_rolling_slowlog.policies.time.interval = 1
@ -99,3 +115,33 @@ logger.slowlog.additivity = false
logger.licensereader.name = logstash.licensechecker.licensereader
logger.licensereader.level = error
# Silence http-client by default
logger.apache_http_client.name = org.apache.http
logger.apache_http_client.level = fatal
# Deprecation log
appender.deprecation_rolling.type = RollingFile
appender.deprecation_rolling.name = deprecation_plain_rolling
appender.deprecation_rolling.fileName = ${sys:ls.logs}/logstash-deprecation.log
appender.deprecation_rolling.filePattern = ${sys:ls.logs}/logstash-deprecation-%d{yyyy-MM-dd}-%i.log.gz
appender.deprecation_rolling.policies.type = Policies
appender.deprecation_rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.deprecation_rolling.policies.time.interval = 1
appender.deprecation_rolling.policies.time.modulate = true
appender.deprecation_rolling.layout.type = PatternLayout
appender.deprecation_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]}%notEmpty{[%X{plugin.id}]} %m%n
appender.deprecation_rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.deprecation_rolling.policies.size.size = 100MB
appender.deprecation_rolling.strategy.type = DefaultRolloverStrategy
appender.deprecation_rolling.strategy.max = 30
logger.deprecation.name = org.logstash.deprecation, deprecation
logger.deprecation.level = WARN
logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_plain_rolling
logger.deprecation.additivity = false
logger.deprecation_root.name = deprecation
logger.deprecation_root.level = WARN
logger.deprecation_root.appenderRef.deprecation_rolling.ref = deprecation_plain_rolling
logger.deprecation_root.additivity = false

View file

@ -57,6 +57,29 @@
#
# pipeline.unsafe_shutdown: false
#
# Set the pipeline event ordering. Options are "auto" (the default), "true" or "false".
# "auto" will automatically enable ordering if the 'pipeline.workers' setting
# is also set to '1'.
# "true" will enforce ordering on the pipeline and prevent logstash from starting
# if there are multiple workers.
# "false" will disable any extra processing necessary for preserving ordering.
#
# pipeline.ordered: auto
#
# Sets the pipeline's default value for `ecs_compatibility`, a setting that is
# available to plugins that implement an ECS Compatibility mode for use with
# the Elastic Common Schema.
# Possible values are:
# - disabled (default)
# - v1
# - v8
# The default value will be `v8` in Logstash 8, making ECS on-by-default. To ensure a
# migrated pipeline continues to operate as it did before your upgrade, opt-OUT
# of ECS for the individual pipeline in its `pipelines.yml` definition. Setting
# it here will set the default for _all_ pipelines, including new ones.
#
# pipeline.ecs_compatibility: disabled
#
# ------------ Pipeline Configuration Settings --------------
#
# Where to fetch the pipeline configuration for the main pipeline
@ -77,6 +100,9 @@
# config.reload.automatic: false
#
# How often to check if the pipeline configuration has changed (in seconds)
# Note that the unit value (s) is required. Values without a qualifier (e.g. 60)
# are treated as nanoseconds.
# Setting the interval this way is not recommended and might change in later versions.
#
# config.reload.interval: 3s
#
@ -90,6 +116,55 @@
#
# config.support_escapes: false
#
# ------------ API Settings -------------
# Define settings related to the HTTP API here.
#
# The HTTP API is enabled by default. It can be disabled, but features that rely
# on it will not work as intended.
#
# api.enabled: true
#
# By default, the HTTP API is not secured and is therefore bound to only the
# host's loopback interface, ensuring that it is not accessible to the rest of
# the network.
# When secured with SSL and Basic Auth, the API is bound to _all_ interfaces
# unless configured otherwise.
#
# api.http.host: 127.0.0.1
#
# The HTTP API web server will listen on an available port from the given range.
# Values can be specified as a single port (e.g., `9600`), or an inclusive range
# of ports (e.g., `9600-9700`).
#
# api.http.port: 9600-9700
#
# The HTTP API includes a customizable "environment" value in its response,
# which can be configured here.
#
# api.environment: "production"
#
# The HTTP API can be secured with SSL (TLS). To do so, you will need to provide
# the path to a password-protected keystore in p12 or jks format, along with credentials.
#
# api.ssl.enabled: false
# api.ssl.keystore.path: /path/to/keystore.jks
# api.ssl.keystore.password: "y0uRp4$$w0rD"
#
# The HTTP API can be configured to require authentication. Acceptable values are
# - `none`: no auth is required (default)
# - `basic`: clients must authenticate with HTTP Basic auth, as configured
# with `api.auth.basic.*` options below
# api.auth.type: none
#
# When configured with `api.auth.type` `basic`, you must provide the credentials
# that requests will be validated against. Usage of Environment or Keystore
# variable replacements is encouraged (such as the value `"${HTTP_PASS}"`, which
# resolves to the value stored in the keystore's `HTTP_PASS` variable if present
# or the same variable from the environment)
#
# api.auth.basic.username: "logstash-user"
# api.auth.basic.password: "s3cUreP4$$w0rD"
#
# ------------ Module Settings ---------------
# Define modules here. Modules definitions must be defined as an array.
# The simple way to see this is to prepend each `name` with a `-`, and keep
@ -178,22 +253,19 @@
# Default is 1024mb
# dead_letter_queue.max_bytes: 1024mb
# If using dead_letter_queue.enable: true, the interval in milliseconds where if no further events eligible for the DLQ
# have been created, a dead letter queue file will be written. A low value here will mean that more, smaller, queue files
# may be written, while a larger value will introduce more latency between items being "written" to the dead letter queue, and
# being available to be read by the dead_letter_queue input when items are are written infrequently.
# Default is 5000.
#
# dead_letter_queue.flush_interval: 5000
# If using dead_letter_queue.enable: true, the directory path where the data files will be stored.
# Default is path.data/dead_letter_queue
#
# path.dead_letter_queue:
#
# ------------ Metrics Settings --------------
#
# Bind address for the metrics REST endpoint
#
# http.host: "127.0.0.1"
#
# Bind port for the metrics REST endpoint, this option also accept a range
# (9600-9700) and logstash will pick up the first available ports.
#
# http.port: 9600-9700
#
# ------------ Debugging Settings --------------
#
# Options for log.level:
@ -212,6 +284,10 @@
# Where to find custom plugins
# path.plugins: []
#
# Flag to output log lines of each pipeline in its separate log file. Each log filename contains the pipeline.name
# Default is false
# pipeline.separate_logs: false
#
# ------------ X-Pack Settings (not applicable for OSS build)--------------
#
# X-Pack Monitoring
@ -219,7 +295,13 @@
#xpack.monitoring.enabled: false
#xpack.monitoring.elasticsearch.username: logstash_system
#xpack.monitoring.elasticsearch.password: password
#xpack.monitoring.elasticsearch.proxy: ["http://proxy:port"]
#xpack.monitoring.elasticsearch.hosts: ["https://es1:9200", "https://es2:9200"]
# an alternative to hosts + username/password settings is to use cloud_id/cloud_auth
#xpack.monitoring.elasticsearch.cloud_id: monitoring_cluster_id:xxxxxxxxxx
#xpack.monitoring.elasticsearch.cloud_auth: logstash_system:password
# another authentication alternative is to use an Elasticsearch API key
#xpack.monitoring.elasticsearch.api_key: "id:api_key"
#xpack.monitoring.elasticsearch.ssl.certificate_authority: [ "/path/to/ca.crt" ]
#xpack.monitoring.elasticsearch.ssl.truststore.path: path/to/file
#xpack.monitoring.elasticsearch.ssl.truststore.password: password
@ -236,7 +318,13 @@
#xpack.management.pipeline.id: ["main", "apache_logs"]
#xpack.management.elasticsearch.username: logstash_admin_user
#xpack.management.elasticsearch.password: password
#xpack.management.elasticsearch.proxy: ["http://proxy:port"]
#xpack.management.elasticsearch.hosts: ["https://es1:9200", "https://es2:9200"]
# an alternative to hosts + username/password settings is to use cloud_id/cloud_auth
#xpack.management.elasticsearch.cloud_id: management_cluster_id:xxxxxxxxxx
#xpack.management.elasticsearch.cloud_auth: logstash_admin_user:password
# another authentication alternative is to use an Elasticsearch API key
#xpack.management.elasticsearch.api_key: "id:api_key"
#xpack.management.elasticsearch.ssl.certificate_authority: [ "/path/to/ca.crt" ]
#xpack.management.elasticsearch.ssl.truststore.path: /path/to/file
#xpack.management.elasticsearch.ssl.truststore.password: password
@ -245,3 +333,7 @@
#xpack.management.elasticsearch.ssl.verification_mode: certificate
#xpack.management.elasticsearch.sniffing: false
#xpack.management.logstash.poll_interval: 5s
# X-Pack GeoIP plugin
# https://www.elastic.co/guide/en/logstash/current/plugins-filters-geoip.html#plugins-filters-geoip-manage_update
#xpack.geoip.download.endpoint: "https://geoip.elastic.co/v1/database"

View file

@ -70,6 +70,15 @@
# will be dropped if they would increase the size of the dead letter queue beyond this setting.
# Default is 1024mb
# dead_letter_queue.max_bytes: 1024mb
#
# If using dead_letter_queue.enable: true, the interval in milliseconds where if no further events eligible for the DLQ
# have been created, a dead letter queue file will be written. A low value here will mean that more, smaller, queue files
# may be written, while a larger value will introduce more latency between items being "written" to the dead letter queue, and
# being available to be read by the dead_letter_queue input when items are are written infrequently.
# Default is 5000.
#
# dead_letter_queue.flush_interval: 5000
#
# If using dead_letter_queue.enable: true, the directory path where the data files will be stored.
# Default is path.data/dead_letter_queue

View file

@ -1,4 +1,3 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@ -179,7 +178,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@ -187,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

199
docker/Makefile Normal file
View file

@ -0,0 +1,199 @@
SHELL=/bin/bash
ELASTIC_REGISTRY ?= docker.elastic.co
# Determine the version to build.
ELASTIC_VERSION := $(shell ../vendor/jruby/bin/jruby bin/elastic-version)
ifdef STAGING_BUILD_NUM
VERSION_TAG := $(ELASTIC_VERSION)-$(STAGING_BUILD_NUM)
else
VERSION_TAG := $(ELASTIC_VERSION)
endif
ifdef DOCKER_ARCHITECTURE
ARCHITECTURE := $(DOCKER_ARCHITECTURE)
else
ARCHITECTURE := $(shell uname -m)
endif
IMAGE_FLAVORS ?= oss full ubi8
DEFAULT_IMAGE_FLAVOR ?= full
IMAGE_TAG := $(ELASTIC_REGISTRY)/logstash/logstash
HTTPD ?= logstash-docker-artifact-server
all: build-from-local-artifacts build-from-local-oss-artifacts public-dockerfiles
# Build from artifacts on the local filesystem, using an http server (running
# in a container) to provide the artifacts to the Dockerfile.
build-from-local-full-artifacts: dockerfile env2yaml
docker run --rm -d --name=$(HTTPD) \
-p 8000:8000 --expose=8000 -v $(ARTIFACTS_DIR):/mnt \
python:3 bash -c 'cd /mnt && python3 -m http.server'
timeout 120 bash -c 'until curl -s localhost:8000 > /dev/null; do sleep 1; done'
docker build --network=host -t $(IMAGE_TAG)-full:$(VERSION_TAG) -f $(ARTIFACTS_DIR)/Dockerfile-full data/logstash || \
(docker kill $(HTTPD); false); \
docker tag $(IMAGE_TAG)-full:$(VERSION_TAG) $(IMAGE_TAG):$(VERSION_TAG);
docker kill $(HTTPD)
build-from-local-oss-artifacts: dockerfile env2yaml
docker run --rm -d --name=$(HTTPD) \
-p 8000:8000 --expose=8000 -v $(ARTIFACTS_DIR):/mnt \
python:3 bash -c 'cd /mnt && python3 -m http.server'
timeout 120 bash -c 'until curl -s localhost:8000 > /dev/null; do sleep 1; done'
docker build --network=host -t $(IMAGE_TAG)-oss:$(VERSION_TAG) -f $(ARTIFACTS_DIR)/Dockerfile-oss data/logstash || \
(docker kill $(HTTPD); false);
-docker kill $(HTTPD)
build-from-local-ubi8-artifacts: dockerfile env2yaml
docker run --rm -d --name=$(HTTPD) \
-p 8000:8000 --expose=8000 -v $(ARTIFACTS_DIR):/mnt \
python:3 bash -c 'cd /mnt && python3 -m http.server'
timeout 120 bash -c 'until curl -s localhost:8000 > /dev/null; do sleep 1; done'
docker build --network=host -t $(IMAGE_TAG)-ubi8:$(VERSION_TAG) -f $(ARTIFACTS_DIR)/Dockerfile-ubi8 data/logstash || \
(docker kill $(HTTPD); false);
-docker kill $(HTTPD)
COPY_FILES = $(ARTIFACTS_DIR)/docker/config/pipelines.yml $(ARTIFACTS_DIR)/docker/config/logstash-oss.yml $(ARTIFACTS_DIR)/docker/config/logstash-full.yml $(ARTIFACTS_DIR)/docker/config/log4j2.properties $(ARTIFACTS_DIR)/docker/pipeline/default.conf $(ARTIFACTS_DIR)/docker/bin/docker-entrypoint $(ARTIFACTS_DIR)/docker/env2yaml/env2yaml
$(ARTIFACTS_DIR)/docker/config/pipelines.yml: data/logstash/config/pipelines.yml
$(ARTIFACTS_DIR)/docker/config/logstash-oss.yml: data/logstash/config/logstash-oss.yml
$(ARTIFACTS_DIR)/docker/config/logstash-full.yml: data/logstash/config/logstash-full.yml
$(ARTIFACTS_DIR)/docker/config/log4j2.properties: data/logstash/config/log4j2.properties
$(ARTIFACTS_DIR)/docker/pipeline/default.conf: data/logstash/pipeline/default.conf
$(ARTIFACTS_DIR)/docker/bin/docker-entrypoint: data/logstash/bin/docker-entrypoint
$(ARTIFACTS_DIR)/docker/env2yaml/env2yaml: data/logstash/env2yaml/env2yaml
$(ARTIFACTS_DIR)/docker/%:
cp -f $< $@
docker_paths:
mkdir -p $(ARTIFACTS_DIR)/docker/
mkdir -p $(ARTIFACTS_DIR)/docker/bin
mkdir -p $(ARTIFACTS_DIR)/docker/config
mkdir -p $(ARTIFACTS_DIR)/docker/env2yaml
mkdir -p $(ARTIFACTS_DIR)/docker/pipeline
COPY_IRONBANK_FILES = $(ARTIFACTS_DIR)/ironbank/scripts/config/pipelines.yml $(ARTIFACTS_DIR)/ironbank/scripts/config/logstash.yml $(ARTIFACTS_DIR)/ironbank/scripts/config/log4j2.properties $(ARTIFACTS_DIR)/ironbank/scripts/pipeline/default.conf $(ARTIFACTS_DIR)/ironbank/scripts/bin/docker-entrypoint $(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/env2yaml.go $(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/go.mod $(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/go.sum $(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/vendor/modules.txt $(ARTIFACTS_DIR)/ironbank/LICENSE $(ARTIFACTS_DIR)/ironbank/README.md
$(ARTIFACTS_DIR)/ironbank/scripts/config/pipelines.yml: data/logstash/config/pipelines.yml
$(ARTIFACTS_DIR)/ironbank/scripts/config/logstash.yml: data/logstash/config/logstash-full.yml
$(ARTIFACTS_DIR)/ironbank/scripts/config/log4j2.properties: data/logstash/config/log4j2.properties
$(ARTIFACTS_DIR)/ironbank/scripts/pipeline/default.conf: data/logstash/pipeline/default.conf
$(ARTIFACTS_DIR)/ironbank/scripts/bin/docker-entrypoint: data/logstash/bin/docker-entrypoint
$(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/env2yaml.go: data/logstash/env2yaml/env2yaml.go
$(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/go.mod: ironbank/go/src/env2yaml/go.mod
$(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/go.sum: ironbank/go/src/env2yaml/go.sum
$(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/vendor/modules.txt: ironbank/go/src/env2yaml/vendor/modules.txt
$(ARTIFACTS_DIR)/ironbank/LICENSE: ironbank/LICENSE
$(ARTIFACTS_DIR)/ironbank/README.md: ironbank/README.md
$(ARTIFACTS_DIR)/ironbank/%:
cp -f $< $@
ironbank_docker_paths:
mkdir -p $(ARTIFACTS_DIR)/ironbank/
mkdir -p $(ARTIFACTS_DIR)/ironbank/scripts
mkdir -p $(ARTIFACTS_DIR)/ironbank/scripts/bin
mkdir -p $(ARTIFACTS_DIR)/ironbank/scripts/config
mkdir -p $(ARTIFACTS_DIR)/ironbank/scripts/go/src/env2yaml/vendor
mkdir -p $(ARTIFACTS_DIR)/ironbank/scripts/pipeline
public-dockerfiles: public-dockerfiles_oss public-dockerfiles_full public-dockerfiles_ubi8 public-dockerfiles_ironbank
public-dockerfiles_full: templates/Dockerfile.erb docker_paths $(COPY_FILES)
../vendor/jruby/bin/jruby -S ../bin/bundle exec erb -T "-" \
created_date="${BUILD_DATE}" \
elastic_version="${ELASTIC_VERSION}" \
arch="${ARCHITECTURE}" \
version_tag="${VERSION_TAG}" \
release="${RELEASE}" \
image_flavor="full" \
local_artifacts="false" \
templates/Dockerfile.erb > "${ARTIFACTS_DIR}/Dockerfile-full" && \
cd $(ARTIFACTS_DIR)/docker && \
cp $(ARTIFACTS_DIR)/Dockerfile-full Dockerfile && \
tar -zcf ../logstash-$(VERSION_TAG)-docker-build-context.tar.gz Dockerfile bin config env2yaml pipeline
public-dockerfiles_oss: templates/Dockerfile.erb docker_paths $(COPY_FILES)
../vendor/jruby/bin/jruby -S ../bin/bundle exec erb -T "-" \
created_date="${BUILD_DATE}" \
elastic_version="${ELASTIC_VERSION}" \
arch="${ARCHITECTURE}" \
version_tag="${VERSION_TAG}" \
release="${RELEASE}" \
image_flavor="oss" \
local_artifacts="false" \
templates/Dockerfile.erb > "${ARTIFACTS_DIR}/Dockerfile-oss" && \
cd $(ARTIFACTS_DIR)/docker && \
cp $(ARTIFACTS_DIR)/Dockerfile-oss Dockerfile && \
tar -zcf ../logstash-oss-$(VERSION_TAG)-docker-build-context.tar.gz Dockerfile bin config env2yaml pipeline
public-dockerfiles_ubi8: templates/Dockerfile.erb docker_paths $(COPY_FILES)
../vendor/jruby/bin/jruby -S ../bin/bundle exec erb -T "-" \
created_date="${BUILD_DATE}" \
elastic_version="${ELASTIC_VERSION}" \
arch="${ARCHITECTURE}" \
version_tag="${VERSION_TAG}" \
release="${RELEASE}" \
image_flavor="ubi8" \
local_artifacts="false" \
templates/Dockerfile.erb > "${ARTIFACTS_DIR}/Dockerfile-ubi8" && \
cd $(ARTIFACTS_DIR)/docker && \
cp $(ARTIFACTS_DIR)/Dockerfile-ubi8 Dockerfile && \
tar -zcf ../logstash-ubi8-$(VERSION_TAG)-docker-build-context.tar.gz Dockerfile bin config env2yaml pipeline
public-dockerfiles_ironbank: templates/hardening_manifest.yaml.erb templates/Dockerfile.erb ironbank_docker_paths $(COPY_IRONBANK_FILES)
../vendor/jruby/bin/jruby -S ../bin/bundle exec erb -T "-" \
elastic_version="${ELASTIC_VERSION}" \
templates/hardening_manifest.yaml.erb > $(ARTIFACTS_DIR)/ironbank/hardening_manifest.yaml && \
../vendor/jruby/bin/jruby -S ../bin/bundle exec erb -T "-" \
created_date="${BUILD_DATE}" \
elastic_version="${ELASTIC_VERSION}" \
arch="${ARCHITECTURE}" \
version_tag="${VERSION_TAG}" \
release="${RELEASE}" \
image_flavor="ironbank" \
local_artifacts="false" \
templates/Dockerfile.erb > "${ARTIFACTS_DIR}/Dockerfile-ironbank" && \
cd $(ARTIFACTS_DIR)/ironbank && \
cp $(ARTIFACTS_DIR)/Dockerfile-ironbank Dockerfile && \
tar -zcf ../logstash-ironbank-$(VERSION_TAG)-docker-build-context.tar.gz scripts Dockerfile hardening_manifest.yaml LICENSE README.md
# Push the image to the dedicated push endpoint at "push.docker.elastic.co"
push:
$(foreach FLAVOR, $(IMAGE_FLAVORS), \
docker tag $(IMAGE_TAG)-$(FLAVOR):$(VERSION_TAG) push.$(IMAGE_TAG)-$(FLAVOR):$(VERSION_TAG); \
docker push push.$(IMAGE_TAG)-$(FLAVOR):$(VERSION_TAG); \
docker rmi push.$(IMAGE_TAG)-$(FLAVOR):$(VERSION_TAG); \
)
# Also push the default version, with no suffix like '-oss' or '-full'
docker tag $(IMAGE_TAG):$(VERSION_TAG) push.$(IMAGE_TAG):$(VERSION_TAG);
docker push push.$(IMAGE_TAG):$(VERSION_TAG);
docker rmi push.$(IMAGE_TAG):$(VERSION_TAG);
# Compile "env2yaml", the helper for configuring logstash.yml via environment
# variables.
env2yaml:
docker run --rm \
-v "$(PWD)/data/logstash/env2yaml:/usr/src/env2yaml" \
-w /usr/src/env2yaml golang:1 go build
# Generate the Dockerfiles from ERB templates.
dockerfile: templates/Dockerfile.erb
$(foreach FLAVOR, $(IMAGE_FLAVORS), \
../vendor/jruby/bin/jruby -S ../bin/bundle exec erb -T "-" \
created_date="${BUILD_DATE}" \
elastic_version="${ELASTIC_VERSION}" \
arch="${ARCHITECTURE}" \
version_tag="${VERSION_TAG}" \
image_flavor="${FLAVOR}" \
local_artifacts="true" \
templates/Dockerfile.erb > "${ARTIFACTS_DIR}/Dockerfile-${FLAVOR}" ; \
)
clean:
rm -f ${ARTIFACTS_DIR}/env2yaml/env2yaml-* ${ARTIFACTS_DIR}/Dockerfile
.PHONY: clean push

34
docker/README.md Normal file
View file

@ -0,0 +1,34 @@
## Description
This repository contains the official [Logstash][logstash] Docker image from
[Elastic][elastic].
Documentation can be found on the [Elastic website](https://www.elastic.co/guide/en/logstash/current/docker.html).
[logstash]: https://www.elastic.co/products/logstash
[elastic]: https://www.elastic.co/
## Supported Docker versions
The images have been tested on Docker version 18.09.2, build 6247962
## Requirements
A full build requires:
* Docker
* GNU Make
* Python 3.5 with Virtualenv
* JRuby 9.1+
## Running a build
To build an image check out the corresponding branch for the version and run the rake task
Like this:
```
git checkout 7.0
rake artifact:docker
# and for the OSS package
rake artifact:docker_oss
```
This image is built on [Centos 7][centos-7].
[centos-7]: https://github.com/CentOS/sig-cloud-instance-images/blob/50281d86d6ed5c61975971150adfd0ede86423bb/docker/Dockerfile

24
docker/bin/elastic-version Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env ruby
#
# Print the Elastic Stack version for the current branch, as defined in
# the 'version.json' file.
#
require 'yaml'
def get_hard_coded_version
version_info = YAML::safe_load(IO.read('../versions.yml'))
version_info['logstash']
end
def qualify(version)
qualifier = ENV['VERSION_QUALIFIER']
qualifier.nil? || qualifier.empty? ? version : [version, qualifier].join("-")
end
def get_version
version = get_hard_coded_version()
version = qualify(version)
ENV["RELEASE"] == "1" ? version : [version, "SNAPSHOT"].join("-")
end
puts get_version

View file

@ -0,0 +1,15 @@
#!/bin/bash -e
# Map environment variables to entries in logstash.yml.
# Note that this will mutate logstash.yml in place if any such settings are found.
# This may be undesirable, especially if logstash.yml is bind-mounted from the
# host system.
env2yaml /usr/share/logstash/config/logstash.yml
export LS_JAVA_OPTS="-Dls.cgroup.cpuacct.path.override=/ -Dls.cgroup.cpu.path.override=/ $LS_JAVA_OPTS"
if [[ -z $1 ]] || [[ ${1:0:1} == '-' ]] ; then
exec logstash "$@"
else
exec "$@"
fi

View file

@ -0,0 +1,16 @@
status = error
name = LogstashPropertiesConfig
appender.console.type = Console
appender.console.name = plain_console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]}%notEmpty{[%X{plugin.id}]} %m%n
appender.json_console.type = Console
appender.json_console.name = json_console
appender.json_console.layout.type = JSONLayout
appender.json_console.layout.compact = true
appender.json_console.layout.eventEol = true
rootLogger.level = ${sys:ls.log.level}
rootLogger.appenderRef.console.ref = ${sys:ls.log.format}_console

View file

@ -0,0 +1,2 @@
http.host: "0.0.0.0"
xpack.monitoring.elasticsearch.hosts: [ "http://elasticsearch:9200" ]

View file

@ -0,0 +1 @@
http.host: "0.0.0.0"

View file

@ -0,0 +1,6 @@
# This file is where you define your pipelines. You can define multiple.
# For more information on multiple pipelines, see the documentation:
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html
- pipeline.id: main
path.config: "/usr/share/logstash/pipeline"

View file

@ -0,0 +1,192 @@
// env2yaml
//
// Merge environment variables into logstash.yml.
// For example, running Docker with:
//
// docker run -e pipeline.workers=6
//
// or
//
// docker run -e PIPELINE_WORKERS=6
//
// will cause logstash.yml to contain the line:
//
// pipeline.workers: 6
//
package main
import (
"errors"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"os"
"strings"
)
// If the given string can be parsed as YAML, then do so and return the
// resulting entity. Otherwise, return the string unmodified.
func FromYamlIfPossible(str string) interface{} {
var entity interface{}
err := yaml.Unmarshal([]byte(str), &entity)
if err == nil {
return entity
} else {
return str
}
}
// Given a setting name, return a downcased version with delimiters removed.
func squashSetting(setting string) string {
downcased := strings.ToLower(setting)
de_dotted := strings.Replace(downcased, ".", "", -1)
de_underscored := strings.Replace(de_dotted, "_", "", -1)
return de_underscored
}
// Given a setting name like "pipeline.workers" or "PIPELINE_UNSAFE_SHUTDOWN",
// return the canonical setting name. eg. 'pipeline.unsafe_shutdown'
func normalizeSetting(setting string) (string, error) {
valid_settings := []string{
"api.enabled",
"api.http.host",
"api.http.port",
"api.environment",
"node.name",
"path.data",
"pipeline.id",
"pipeline.workers",
"pipeline.output.workers",
"pipeline.batch.size",
"pipeline.batch.delay",
"pipeline.unsafe_shutdown",
"pipeline.java_execution",
"pipeline.ecs_compatibility",
"pipeline.ordered",
"pipeline.plugin_classloaders",
"pipeline.separate_logs",
"path.config",
"config.string",
"config.test_and_exit",
"config.reload.automatic",
"config.reload.interval",
"config.debug",
"config.support_escapes",
"queue.type",
"path.queue",
"queue.page_capacity",
"queue.max_events",
"queue.max_bytes",
"queue.checkpoint.acks",
"queue.checkpoint.writes",
"queue.checkpoint.interval",
"queue.drain",
"dead_letter_queue.enable",
"dead_letter_queue.max_bytes",
"dead_letter_queue.flush_interval",
"path.dead_letter_queue",
"http.enabled", // DEPRECATED: prefer `api.enabled`
"http.environment", // DEPRECATED: prefer `api.environment`
"http.host", // DEPRECATED: prefer `api.http.host`
"http.port", // DEPRECATED: prefer `api.http.port`
"log.level",
"log.format",
"modules",
"path.logs",
"path.plugins",
"monitoring.cluster_uuid",
"xpack.monitoring.enabled",
"xpack.monitoring.collection.interval",
"xpack.monitoring.elasticsearch.hosts",
"xpack.monitoring.elasticsearch.username",
"xpack.monitoring.elasticsearch.password",
"xpack.monitoring.elasticsearch.proxy",
"xpack.monitoring.elasticsearch.api_key",
"xpack.monitoring.elasticsearch.cloud_auth",
"xpack.monitoring.elasticsearch.cloud_id",
"xpack.monitoring.elasticsearch.sniffing",
"xpack.monitoring.elasticsearch.ssl.certificate_authority",
"xpack.monitoring.elasticsearch.ssl.verification_mode",
"xpack.monitoring.elasticsearch.ssl.truststore.path",
"xpack.monitoring.elasticsearch.ssl.truststore.password",
"xpack.monitoring.elasticsearch.ssl.keystore.path",
"xpack.monitoring.elasticsearch.ssl.keystore.password",
"xpack.management.enabled",
"xpack.management.logstash.poll_interval",
"xpack.management.pipeline.id",
"xpack.management.elasticsearch.hosts",
"xpack.management.elasticsearch.username",
"xpack.management.elasticsearch.password",
"xpack.management.elasticsearch.proxy",
"xpack.management.elasticsearch.api_key",
"xpack.management.elasticsearch.cloud_auth",
"xpack.management.elasticsearch.cloud_id",
"xpack.management.elasticsearch.sniffing",
"xpack.management.elasticsearch.ssl.certificate_authority",
"xpack.management.elasticsearch.ssl.verification_mode",
"xpack.management.elasticsearch.ssl.truststore.path",
"xpack.management.elasticsearch.ssl.truststore.password",
"xpack.management.elasticsearch.ssl.keystore.path",
"xpack.management.elasticsearch.ssl.keystore.password",
"xpack.geoip.download.endpoint",
"cloud.id",
"cloud.auth",
}
for _, valid_setting := range valid_settings {
if squashSetting(setting) == squashSetting(valid_setting) {
return valid_setting, nil
}
}
return "", errors.New("Invalid setting: " + setting)
}
func main() {
if len(os.Args) != 2 {
log.Fatalf("usage: env2yaml FILENAME")
}
settingsFilePath := os.Args[1]
settingsFile, err := ioutil.ReadFile(settingsFilePath)
if err != nil {
log.Fatalf("error: %v", err)
}
// Read the original settings file into a map.
settings := make(map[string]interface{})
err = yaml.Unmarshal(settingsFile, &settings)
if err != nil {
log.Fatalf("error: %v", err)
}
// Merge any valid settings found in the environment.
foundNewSettings := false
for _, line := range os.Environ() {
kv := strings.SplitN(line, "=", 2)
key := kv[0]
value := kv[1]
setting, err := normalizeSetting(key)
if err == nil {
foundNewSettings = true
log.Printf("Setting '%s' from environment.", setting)
settings[setting] = FromYamlIfPossible(value)
}
}
if foundNewSettings {
output, err := yaml.Marshal(&settings)
if err != nil {
log.Fatalf("error: %v", err)
}
stat, err := os.Stat(settingsFilePath)
if err != nil {
log.Fatalf("error: %v", err)
}
err = ioutil.WriteFile(settingsFilePath, output, stat.Mode())
if err != nil {
log.Fatalf("error: %v", err)
}
}
}

View file

@ -0,0 +1,5 @@
module logstash/env2yaml
go 1.21
require gopkg.in/yaml.v2 v2.4.0

View file

@ -0,0 +1,3 @@
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

View file

@ -0,0 +1,12 @@
input {
beats {
port => 5044
}
}
output {
stdout {
codec => rubydebug
}
}

View file

@ -0,0 +1,14 @@
input {
heartbeat {
interval => 5
message => 'Hello from Logstash 💓'
}
}
output {
elasticsearch {
hosts => [ 'elasticsearch' ]
user => 'elastic'
password => 'changeme'
}
}

280
docker/ironbank/LICENSE Normal file
View file

@ -0,0 +1,280 @@
ELASTIC LICENSE AGREEMENT
PLEASE READ CAREFULLY THIS ELASTIC LICENSE AGREEMENT (THIS "AGREEMENT"), WHICH
CONSTITUTES A LEGALLY BINDING AGREEMENT AND GOVERNS ALL OF YOUR USE OF ALL OF
THE ELASTIC SOFTWARE WITH WHICH THIS AGREEMENT IS INCLUDED ("ELASTIC SOFTWARE")
THAT IS PROVIDED IN OBJECT CODE FORMAT, AND, IN ACCORDANCE WITH SECTION 2 BELOW,
CERTAIN OF THE ELASTIC SOFTWARE THAT IS PROVIDED IN SOURCE CODE FORMAT. BY
INSTALLING OR USING ANY OF THE ELASTIC SOFTWARE GOVERNED BY THIS AGREEMENT, YOU
ARE ASSENTING TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE
WITH SUCH TERMS AND CONDITIONS, YOU MAY NOT INSTALL OR USE THE ELASTIC SOFTWARE
GOVERNED BY THIS AGREEMENT. IF YOU ARE INSTALLING OR USING THE SOFTWARE ON
BEHALF OF A LEGAL ENTITY, YOU REPRESENT AND WARRANT THAT YOU HAVE THE ACTUAL
AUTHORITY TO AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT ON BEHALF OF
SUCH ENTITY.
Posted Date: April 20, 2018
This Agreement is entered into by and between Elasticsearch BV ("Elastic") and
You, or the legal entity on behalf of whom You are acting (as applicable,
"You").
1. OBJECT CODE END USER LICENSES, RESTRICTIONS AND THIRD PARTY OPEN SOURCE
SOFTWARE
1.1 Object Code End User License. Subject to the terms and conditions of
Section 1.2 of this Agreement, Elastic hereby grants to You, AT NO CHARGE and
for so long as you are not in breach of any provision of this Agreement, a
License to the Basic Features and Functions of the Elastic Software.
1.2 Reservation of Rights; Restrictions. As between Elastic and You, Elastic
and its licensors own all right, title and interest in and to the Elastic
Software, and except as expressly set forth in Sections 1.1, and 2.1 of this
Agreement, no other license to the Elastic Software is granted to You under
this Agreement, by implication, estoppel or otherwise. You agree not to: (i)
reverse engineer or decompile, decrypt, disassemble or otherwise reduce any
Elastic Software provided to You in Object Code, or any portion thereof, to
Source Code, except and only to the extent any such restriction is prohibited
by applicable law, (ii) except as expressly permitted in this Agreement,
prepare derivative works from, modify, copy or use the Elastic Software Object
Code or the Commercial Software Source Code in any manner; (iii) except as
expressly permitted in Section 1.1 above, transfer, sell, rent, lease,
distribute, sublicense, loan or otherwise transfer, Elastic Software Object
Code, in whole or in part, to any third party; (iv) use Elastic Software
Object Code for providing time-sharing services, any software-as-a-service,
service bureau services or as part of an application services provider or
other service offering (collectively, "SaaS Offering") where obtaining access
to the Elastic Software or the features and functions of the Elastic Software
is a primary reason or substantial motivation for users of the SaaS Offering
to access and/or use the SaaS Offering ("Prohibited SaaS Offering"); (v)
circumvent the limitations on use of Elastic Software provided to You in
Object Code format that are imposed or preserved by any License Key, or (vi)
alter or remove any Marks and Notices in the Elastic Software. If You have any
question as to whether a specific SaaS Offering constitutes a Prohibited SaaS
Offering, or are interested in obtaining Elastic's permission to engage in
commercial or non-commercial distribution of the Elastic Software, please
contact elastic_license@elastic.co.
1.3 Third Party Open Source Software. The Commercial Software may contain or
be provided with third party open source libraries, components, utilities and
other open source software (collectively, "Open Source Software"), which Open
Source Software may have applicable license terms as identified on a website
designated by Elastic. Notwithstanding anything to the contrary herein, use of
the Open Source Software shall be subject to the license terms and conditions
applicable to such Open Source Software, to the extent required by the
applicable licensor (which terms shall not restrict the license rights granted
to You hereunder, but may contain additional rights). To the extent any
condition of this Agreement conflicts with any license to the Open Source
Software, the Open Source Software license will govern with respect to such
Open Source Software only. Elastic may also separately provide you with
certain open source software that is licensed by Elastic. Your use of such
Elastic open source software will not be governed by this Agreement, but by
the applicable open source license terms.
2. COMMERCIAL SOFTWARE SOURCE CODE
2.1 Limited License. Subject to the terms and conditions of Section 2.2 of
this Agreement, Elastic hereby grants to You, AT NO CHARGE and for so long as
you are not in breach of any provision of this Agreement, a limited,
non-exclusive, non-transferable, fully paid up royalty free right and license
to the Commercial Software in Source Code format, without the right to grant
or authorize sublicenses, to prepare Derivative Works of the Commercial
Software, provided You (i) do not hack the licensing mechanism, or otherwise
circumvent the intended limitations on the use of Elastic Software to enable
features other than Basic Features and Functions or those features You are
entitled to as part of a Subscription, and (ii) use the resulting object code
only for reasonable testing purposes.
2.2 Restrictions. Nothing in Section 2.1 grants You the right to (i) use the
Commercial Software Source Code other than in accordance with Section 2.1
above, (ii) use a Derivative Work of the Commercial Software outside of a
Non-production Environment, in any production capacity, on a temporary or
permanent basis, or (iii) transfer, sell, rent, lease, distribute, sublicense,
loan or otherwise make available the Commercial Software Source Code, in whole
or in part, to any third party. Notwithstanding the foregoing, You may
maintain a copy of the repository in which the Source Code of the Commercial
Software resides and that copy may be publicly accessible, provided that you
include this Agreement with Your copy of the repository.
3. TERMINATION
3.1 Termination. This Agreement will automatically terminate, whether or not
You receive notice of such Termination from Elastic, if You breach any of its
provisions.
3.2 Post Termination. Upon any termination of this Agreement, for any reason,
You shall promptly cease the use of the Elastic Software in Object Code format
and cease use of the Commercial Software in Source Code format. For the
avoidance of doubt, termination of this Agreement will not affect Your right
to use Elastic Software, in either Object Code or Source Code formats, made
available under the Apache License Version 2.0.
3.3 Survival. Sections 1.2, 2.2. 3.3, 4 and 5 shall survive any termination or
expiration of this Agreement.
4. DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY
4.1 Disclaimer of Warranties. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE
LAW, THE ELASTIC SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
AND ELASTIC AND ITS LICENSORS MAKE NO WARRANTIES WHETHER EXPRESSED, IMPLIED OR
STATUTORY REGARDING OR RELATING TO THE ELASTIC SOFTWARE. TO THE MAXIMUM EXTENT
PERMITTED UNDER APPLICABLE LAW, ELASTIC AND ITS LICENSORS SPECIFICALLY
DISCLAIM ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NON-INFRINGEMENT WITH RESPECT TO THE ELASTIC SOFTWARE, AND WITH
RESPECT TO THE USE OF THE FOREGOING. FURTHER, ELASTIC DOES NOT WARRANT RESULTS
OF USE OR THAT THE ELASTIC SOFTWARE WILL BE ERROR FREE OR THAT THE USE OF THE
ELASTIC SOFTWARE WILL BE UNINTERRUPTED.
4.2 Limitation of Liability. IN NO EVENT SHALL ELASTIC OR ITS LICENSORS BE
LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT OR INDIRECT DAMAGES,
INCLUDING, WITHOUT LIMITATION, FOR ANY LOSS OF PROFITS, LOSS OF USE, BUSINESS
INTERRUPTION, LOSS OF DATA, COST OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, IN CONNECTION WITH
OR ARISING OUT OF THE USE OR INABILITY TO USE THE ELASTIC SOFTWARE, OR THE
PERFORMANCE OF OR FAILURE TO PERFORM THIS AGREEMENT, WHETHER ALLEGED AS A
BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, EVEN IF ELASTIC
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
5. MISCELLANEOUS
This Agreement completely and exclusively states the entire agreement of the
parties regarding the subject matter herein, and it supersedes, and its terms
govern, all prior proposals, agreements, or other communications between the
parties, oral or written, regarding such subject matter. This Agreement may be
modified by Elastic from time to time, and any such modifications will be
effective upon the "Posted Date" set forth at the top of the modified
Agreement. If any provision hereof is held unenforceable, this Agreement will
continue without said provision and be interpreted to reflect the original
intent of the parties. This Agreement and any non-contractual obligation
arising out of or in connection with it, is governed exclusively by Dutch law.
This Agreement shall not be governed by the 1980 UN Convention on Contracts
for the International Sale of Goods. All disputes arising out of or in
connection with this Agreement, including its existence and validity, shall be
resolved by the courts with jurisdiction in Amsterdam, The Netherlands, except
where mandatory law provides for the courts at another location in The
Netherlands to have jurisdiction. The parties hereby irrevocably waive any and
all claims and defenses either might otherwise have in any such action or
proceeding in any of such courts based upon any alleged lack of personal
jurisdiction, improper venue, forum non conveniens or any similar claim or
defense. A breach or threatened breach, by You of Section 2 may cause
irreparable harm for which damages at law may not provide adequate relief, and
therefore Elastic shall be entitled to seek injunctive relief without being
required to post a bond. You may not assign this Agreement (including by
operation of law in connection with a merger or acquisition), in whole or in
part to any third party without the prior written consent of Elastic, which
may be withheld or granted by Elastic in its sole and absolute discretion.
Any assignment in violation of the preceding sentence is void. Notices to
Elastic may also be sent to legal@elastic.co.
6. DEFINITIONS
The following terms have the meanings ascribed:
6.1 "Affiliate" means, with respect to a party, any entity that controls, is
controlled by, or which is under common control with, such party, where
"control" means ownership of at least fifty percent (50%) of the outstanding
voting shares of the entity, or the contractual right to establish policy for,
and manage the operations of, the entity.
6.2 "Basic Features and Functions" means those features and functions of the
Elastic Software that are eligible for use under a Basic license, as set forth
at https://www.elastic.co/subscriptions, as may be modified by Elastic from
time to time.
6.3 "Commercial Software" means the Elastic Software Source Code in any file
containing a header stating the contents are subject to the Elastic License or
which is contained in the repository folder labeled "x-pack", unless a LICENSE
file present in the directory subtree declares a different license.
6.4 "Derivative Work of the Commercial Software" means, for purposes of this
Agreement, any modification(s) or enhancement(s) to the Commercial Software,
which represent, as a whole, an original work of authorship.
6.5 "License" means a limited, non-exclusive, non-transferable, fully paid up,
royalty free, right and license, without the right to grant or authorize
sublicenses, solely for Your internal business operations to (i) install and
use the applicable Features and Functions of the Elastic Software in Object
Code, and (ii) permit Contractors and Your Affiliates to use the Elastic
software as set forth in (i) above, provided that such use by Contractors must
be solely for Your benefit and/or the benefit of Your Affiliates, and You
shall be responsible for all acts and omissions of such Contractors and
Affiliates in connection with their use of the Elastic software that are
contrary to the terms and conditions of this Agreement.
6.6 "License Key" means a sequence of bytes, including but not limited to a
JSON blob, that is used to enable certain features and functions of the
Elastic Software.
6.7 "Marks and Notices" means all Elastic trademarks, trade names, logos and
notices present on the Documentation as originally provided by Elastic.
6.8 "Non-production Environment" means an environment for development, testing
or quality assurance, where software is not used for production purposes.
6.9 "Object Code" means any form resulting from mechanical transformation or
translation of Source Code form, including but not limited to compiled object
code, generated documentation, and conversions to other media types.
6.10 "Source Code" means the preferred form of computer software for making
modifications, including but not limited to software source code,
documentation source, and configuration files.
6.11 "Subscription" means the right to receive Support Services and a License
to the Commercial Software.
GOVERNMENT END USER ADDENDUM TO THE ELASTIC LICENSE AGREEMENT
This ADDENDUM TO THE ELASTIC LICENSE AGREEMENT (this "Addendum") applies
only to U.S. Federal Government, State Government, and Local Government
entities ("Government End Users") of the Elastic Software. This Addendum is
subject to, and hereby incorporated into, the Elastic License Agreement,
which is being entered into as of even date herewith, by Elastic and You (the
"Agreement"). This Addendum sets forth additional terms and conditions
related to Your use of the Elastic Software. Capitalized terms not defined in
this Addendum have the meaning set forth in the Agreement.
1. LIMITED LICENSE TO DISTRIBUTE (DSOP ONLY). Subject to the terms and
conditions of the Agreement (including this Addendum), Elastic grants the
Department of Defense Enterprise DevSecOps Initiative (DSOP) a royalty-free,
non-exclusive, non-transferable, limited license to reproduce and distribute
the Elastic Software solely through a software distribution repository
controlled and managed by DSOP, provided that DSOP: (i) distributes the
Elastic Software complete and unmodified, inclusive of the Agreement
(including this Addendum) and (ii) does not remove or alter any proprietary
legends or notices contained in the Elastic Software.
2. CHOICE OF LAW. The choice of law and venue provisions set forth shall
prevail over those set forth in Section 5 of the Agreement.
"For U.S. Federal Government Entity End Users. This Agreement and any
non-contractual obligation arising out of or in connection with it, is
governed exclusively by U.S. Federal law. To the extent permitted by
federal law, the laws of the State of Delaware (excluding Delaware choice
of law rules) will apply in the absence of applicable federal law.
For State and Local Government Entity End Users. This Agreement and any
non-contractual obligation arising out of or in connection with it, is
governed exclusively by the laws of the state in which you are located
without reference to conflict of laws. Furthermore, the Parties agree that
the Uniform Computer Information Transactions Act or any version thereof,
adopted by any state in any form ('UCITA'), shall not apply to this
Agreement and, to the extent that UCITA is applicable, the Parties agree to
opt out of the applicability of UCITA pursuant to the opt-out provision(s)
contained therein."
3. ELASTIC LICENSE MODIFICATION. Section 5 of the Agreement is hereby
amended to replace
"This Agreement may be modified by Elastic from time to time, and any
such modifications will be effective upon the "Posted Date" set forth at
the top of the modified Agreement."
with:
"This Agreement may be modified by Elastic from time to time; provided,
however, that any such modifications shall apply only to Elastic Software
that is installed after the "Posted Date" set forth at the top of the
modified Agreement."
V100820.0

34
docker/ironbank/README.md Normal file
View file

@ -0,0 +1,34 @@
# Logstash
Logstash is part of the [Elastic Stack](https://www.elastic.co/products) along with Elasticsearch, Kibana, and Beats. Logstash is a server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite "stash." (Ours is Elasticsearch, naturally.). Logstash has over 200 plugins, and you can write your own very easily as well.
For more info, see <https://www.elastic.co/products/logstash>
### Installation instructions
Please follow the documentation on [how to install Logstash with Docker](https://www.elastic.co/guide/en/logstash/current/docker.html).
## Documentation and Getting Started
You can find the documentation and getting started guides for Logstash
on the [elastic.co site](https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html).
### Where to file issues and PRs
- [Issues](https://github.com/elastic/logstash/issues)
- [PRs](https://github.com/elastic/logstash/pulls)
**Please open new issues and pull requests for plugins under its own repository**
For example, if you have to report an issue/enhancement for the Elasticsearch output, please do so [here](https://github.com/logstash-plugins/logstash-output-elasticsearch/issues).
## Need Help?
- [Logstash Forum](https://discuss.elastic.co/c/logstash)
- [Logstash Documentation](https://www.elastic.co/guide/en/logstash/current/index.html)
- [Elastic Support](https://www.elastic.co/subscriptions)
## Project Principles
* Community: If a newbie has a bad time, it's a bug.
* Software: Make it work, then make it right, then make it fast.
* Technology: If it doesn't do a thing today, we can make it do it tomorrow.

View file

@ -0,0 +1,5 @@
module env2yaml
go 1.13
require gopkg.in/yaml.v2 v2.3.0

View file

@ -0,0 +1,3 @@
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

View file

@ -0,0 +1,2 @@
# gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v2

View file

@ -0,0 +1,196 @@
# This Dockerfile was generated from templates/Dockerfile.erb
<% if local_artifacts == 'false' -%>
<% url_root = 'https://artifacts.elastic.co/downloads/logstash' -%>
<% else -%>
<% url_root = 'http://localhost:8000' -%>
<% end -%>
<% if image_flavor == 'oss' -%>
<% tarball = "logstash-oss-#{elastic_version}-linux-$(arch).tar.gz" -%>
<% license = 'Apache 2.0' -%>
<% else -%>
<% tarball = "logstash-#{elastic_version}-linux-$(arch).tar.gz" -%>
<% license = 'Elastic License' -%>
<% end -%>
<% if image_flavor == 'ubi8' %>
<% base_image = 'docker.elastic.co/ubi8/ubi-minimal' -%>
<% package_manager = 'microdnf' -%>
# Minimal distributions do not ship with en language packs.
<% locale = 'C.UTF-8' -%>
<% elsif image_flavor == 'ironbank' -%>
<% package_manager = 'yum' -%>
<% else -%>
<% base_image = 'ubuntu:20.04' -%>
<% package_manager = 'apt-get' -%>
<% locale = 'en_US.UTF-8' -%>
<% end -%>
<% if image_flavor == 'ironbank' -%>
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8
ARG BASE_TAG=8.10
ARG LOGSTASH_VERSION=<%= elastic_version %>
ARG GOLANG_VERSION=1.17.8
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS env2yaml
ARG GOLANG_VERSION
# install golang
RUN yum update -y && yum install -y git
COPY go${GOLANG_VERSION}.linux-amd64.tar.gz /opt/go.tar.gz
RUN tar -C /usr/local -xzf /opt/go.tar.gz
ENV PATH=$PATH:/usr/local/go/bin
# compile the env2yaml tool
COPY v2.3.0.tar.gz /opt/env2yaml.tar.gz
COPY scripts/go /usr/local/src/go
WORKDIR /usr/local/src/go/src/env2yaml
RUN mkdir -p vendor/gopkg.in
RUN tar -zxf /opt/env2yaml.tar.gz -C vendor/gopkg.in
RUN mv vendor/gopkg.in/yaml-2.3.0 vendor/gopkg.in/yaml.v2
ENV GOPATH=/usr/local/src/go
RUN go build -mod vendor
# stage 1: unpack logstash
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS builder
ARG LOGSTASH_VERSION
WORKDIR /usr/share/
COPY logstash-${LOGSTASH_VERSION}-linux-x86_64.tar.gz /opt/logstash.tar.gz
RUN tar zxf /opt/logstash.tar.gz && \
mv /usr/share/logstash-${LOGSTASH_VERSION} /usr/share/logstash
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
<% else -%>
FROM <%= base_image %>
<% end -%>
RUN for iter in {1..10}; do \
<% if image_flavor == 'full' || image_flavor == 'oss' -%>
export DEBIAN_FRONTEND=noninteractive && \
<% end -%>
<%= package_manager %> update -y && \
<% if image_flavor != 'ironbank' -%>
<%= package_manager %> upgrade -y && \
<% end -%>
<%= package_manager %> install -y procps findutils tar gzip curl && \
<% if image_flavor == 'ubi8' -%>
<%= package_manager %> install -y openssl && \
<% end -%>
<% if image_flavor == 'ubi8' || image_flavor == 'ironbank' -%>
<%= package_manager %> install -y which shadow-utils && \
<% else -%>
<%= package_manager %> install -y locales && \
<% end -%>
<%= package_manager %> clean all && \
<% if image_flavor == 'full' || image_flavor == 'oss' -%>
locale-gen 'en_US.UTF-8' && \
<%= package_manager %> clean metadata && \
<% end -%>
exit_code=0 && break || exit_code=$? && \
echo "packaging error: retry $iter in 10s" && \
<%= package_manager %> clean all && \
<% if image_flavor == 'full' || image_flavor == 'oss' -%>
<%= package_manager %> clean metadata && \
<% end -%>
sleep 10; done; \
(exit $exit_code)
# Provide a non-root user to run the process.
RUN groupadd --gid 1000 logstash && \
adduser --uid 1000 --gid 1000 \
<% if image_flavor != 'ironbank' %>--home <% else %>--home-dir <% end %>/usr/share/logstash --no-create-home \
logstash
<% if image_flavor == 'ironbank' %>
WORKDIR /usr/share/logstash
COPY --from=env2yaml /usr/local/src/go/src/env2yaml/env2yaml /usr/local/bin/env2yaml
COPY --from=builder --chown=1000:0 /usr/share/logstash /usr/share/logstash
<% end -%>
# Add Logstash itself.
RUN \
<% if image_flavor != 'ironbank' %> curl -Lo - <%= url_root %>/<%= tarball %> | \
tar zxf - -C /usr/share && \
mv /usr/share/logstash-<%= elastic_version %> /usr/share/logstash && \
<% end -%>
chown --recursive logstash:logstash /usr/share/logstash/ && \
chown -R logstash:root /usr/share/logstash && \
chmod -R g=u /usr/share/logstash && \
mkdir /licenses/ && \
mv /usr/share/logstash/NOTICE.TXT /licenses/NOTICE.TXT && \
mv /usr/share/logstash/LICENSE.txt /licenses/LICENSE.txt && \
<% if image_flavor != 'ironbank' -%>
find /usr/share/logstash -type d -exec chmod g+s {} \; && \
<% end -%>
ln -s /usr/share/logstash /opt/logstash
<% if image_flavor != 'ironbank' %>
WORKDIR /usr/share/logstash
<% end -%>
ENV ELASTIC_CONTAINER true
ENV PATH=/usr/share/logstash/bin:$PATH
# Provide a minimal configuration, so that simple invocations will provide
# a good experience.
<% if image_flavor != 'ironbank' -%>
COPY config/pipelines.yml config/pipelines.yml
<% if image_flavor == 'oss' -%>
COPY config/logstash-oss.yml config/logstash.yml
<% else -%>
COPY config/logstash-full.yml config/logstash.yml
<% end -%>
COPY config/log4j2.properties config/
COPY pipeline/default.conf pipeline/logstash.conf
RUN chown --recursive logstash:root config/ pipeline/
# Ensure Logstash gets the correct locale by default.
ENV LANG=<%= locale %> LC_ALL=<%= locale %>
COPY env2yaml/env2yaml /usr/local/bin/
# Place the startup wrapper script.
COPY bin/docker-entrypoint /usr/local/bin/
<% else -%>
COPY scripts/config/pipelines.yml config/pipelines.yml
COPY scripts/config/logstash.yml config/logstash.yml
COPY scripts/config/log4j2.properties config/
COPY scripts/pipeline/default.conf pipeline/logstash.conf
RUN chown --recursive logstash:root config/ pipeline/
# Place the startup wrapper script.
COPY scripts/bin/docker-entrypoint /usr/local/bin/
<% end -%>
RUN chmod 0755 /usr/local/bin/docker-entrypoint
USER 1000
EXPOSE 9600 5044
<% if image_flavor != 'ironbank' -%>
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.vendor="Elastic" \
org.opencontainers.image.vendor="Elastic" \
org.label-schema.name="logstash" \
org.opencontainers.image.title="logstash" \
org.label-schema.version="<%= elastic_version %>" \
org.opencontainers.image.version="<%= elastic_version %>" \
org.label-schema.url="https://www.elastic.co/products/logstash" \
org.label-schema.vcs-url="https://github.com/elastic/logstash" \
org.label-schema.license="<%= license %>" \
org.opencontainers.image.licenses="<%= license %>" \
org.opencontainers.image.description="Logstash is a free and open server-side data processing pipeline that ingests data from a multitude of sources, transforms it, and then sends it to your favorite 'stash.'" \
org.label-schema.build-date=<%= created_date %> \
<% if image_flavor == 'ubi8' -%> license="<%= license %>" \
description="Logstash is a free and open server-side data processing pipeline that ingests data from a multitude of sources, transforms it, and then sends it to your favorite 'stash.'" \
name="logstash" \
maintainer="info@elastic.co" \
summary="Logstash is a free and open server-side data processing pipeline that ingests data from a multitude of sources, transforms it, and then sends it to your favorite 'stash.'" \
vendor="Elastic" \
<% end -%>
org.opencontainers.image.created=<%= created_date %>
<% end -%>
<% if image_flavor == 'ironbank' -%>
HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD curl -I -f --max-time 5 http://localhost:9600 || exit 1
<% end -%>
ENTRYPOINT ["/usr/local/bin/docker-entrypoint"]

View file

@ -0,0 +1,70 @@
---
apiVersion: v1
# The repository name in registry1, excluding /ironbank/
name: "elastic/logstash/logstash"
# List of tags to push for the repository in registry1
# The most specific version should be the first tag and will be shown
# on ironbank.dsop.io
tags:
- "<%= elastic_version %>"
- "latest"
# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_TAG: "8.10"
LOGSTASH_VERSION: "<%= elastic_version %>"
GOLANG_VERSION: "1.21.8"
# Docker image labels
labels:
org.opencontainers.image.title: "logstash"
## Human-readable description of the software packaged in the image
org.opencontainers.image.description: "Logstash is a free and open server-side data processing pipeline that ingests data from a multitude of sources, transforms it, and then sends it to your favorite 'stash.'"
## License(s) under which contained software is distributed
org.opencontainers.image.licenses: "Elastic License"
## URL to find more information on the image
org.opencontainers.image.url: "https://www.elastic.co/products/logstash"
## Name of the distributing entity, organization or individual
org.opencontainers.image.vendor: "Elastic"
org.opencontainers.image.version: "<%= elastic_version %>"
## Keywords to help with search (ex. "cicd,gitops,golang")
# mil.dso.ironbank.image.keywords: "FIXME"
## This value can be "opensource" or "commercial"
# mil.dso.ironbank.image.type: "FIXME"
## Product the image belongs to for grouping multiple images
mil.dso.ironbank.product.name: "Logstash"
# List of resources to make available to the offline build context
resources:
- filename: logstash-<%= elastic_version %>-linux-x86_64.tar.gz
url: <artifact_path>/logstash-<%= elastic_version %>-linux-x86_64.tar.gz
validation:
type: sha512
value: <INSERT SHA512 VALUE FROM https://artifacts.elastic.co/downloads/logstash/logstash-<%= elastic_version %>-linux-x86_64.tar.gz.sha512>
- filename: go1.17.8.linux-amd64.tar.gz
url: https://dl.google.com/go/go1.17.8.linux-amd64.tar.gz
validation:
type: sha256
value: 980e65a863377e69fd9b67df9d8395fd8e93858e7a24c9f55803421e453f4f99
- filename: v2.3.0.tar.gz
url: https://github.com/go-yaml/yaml/archive/v2.3.0.tar.gz
validation:
type: sha512
value: ba934e9cb5ebd2346d3897308b71d13bc6471a8dbc0dc0d46a02644ee6b6553d20c20393471b81025b572a9b03e3326bde9c3e8be156474f1a1f91ff027b6a4f
# List of project maintainers
maintainers:
- name: "Joao Duarte"
username: "joaodiasduarte"
email: "joao@elastic.co"
- name: "Rob Bavey"
username: "robbavey"
email: "rob.bavey@elastic.co"
- name: "Kaise Cheng"
username: "kaisecheng"
email: "kaise.cheng@elastic.co"

View file

@ -20,7 +20,6 @@ release-state can be: released | prerelease | unreleased
:filebeat: https://www.elastic.co/guide/en/beats/filebeat/{branch}/
:lsissue: https://github.com/elastic/logstash/issues/
:security: X-Pack Security
:stack: https://www.elastic.co/guide/en/elastic-stack/current/
[[introduction]]
== Logstash Introduction

View file

@ -0,0 +1,10 @@
/////
These settings control attributes for Logstash core content
in the Logstash Reference (LSR) only.
Shared attributes for the plugin docs (in the LSR and VPR) should
go in /docs/include/attributes-lsplugins.asciidoc instead
with a corresponding change to the VPR settings in
logstash-docs/docs/versioned-plugins/include/attributes-ls-vpr.asciidoc
/////

View file

@ -0,0 +1,12 @@
/////
These settings control attributes in the LSR only.
They correspond to the VPR settings in logstash-docs/docs/versioned-plugins/include/attributes-ls-vpr.asciidoc
When we update one, we must update settings in the other location,
Attribute text formatted without hard wrap is deliberate.
Otherwise, text breaks at return and content isn't displayed in its entirety.
/////
:ecs-default: The `pipeline.ecs_compatibility` setting is available in {logstash-ref}/logstash-settings-file.html[`logstash.yml`] and `pipelines.yml`. Any value in `pipeline.ecs_compatibility` other than `disabled` is considered BETA and unsupported until Logstash 8.0 and the final 7.x version are released. Having this pipeline level flag set will cause even patch-level upgrades to automatically consume breaking changes in the upgraded plugins, changing the shape of data the plugin produces.

View file

@ -118,8 +118,8 @@ endif::[]
* Value type is {logstash-ref}/configuration-file-structure.html#boolean[boolean]
* Default value is `true`
Disable or enable metric logging for this specific plugin instance
by default we record all the metrics we can, but you can disable metrics collection
Disable or enable metric logging for this specific plugin instance.
By default we record all the metrics we can, but you can disable metrics collection
for a specific plugin.
ifeval::["{versioned_docs}"!="true"]
@ -146,6 +146,8 @@ Adding a named ID in this case will help in monitoring Logstash when using the m
}
}
NOTE: Variable substitution in the `id` field only supports environment variables
and does not support the use of values from the secret store.
ifeval::["{versioned_docs}"!="true"]
[id="plugins-{type}s-{plugin}-periodic_flush"]

View file

@ -112,6 +112,8 @@ input {
}
---------------------------------------------------------------------------------------------------
NOTE: Variable substitution in the `id` field only supports environment variables
and does not support the use of values from the secret store.
ifeval::["{versioned_docs}"!="true"]
[id="plugins-{type}s-{plugin}-tags"]
@ -152,7 +154,8 @@ a new input will not override the existing type. A type set at
the shipper stays with that event for its life even
when sent to another Logstash server.
ifeval::["{type}"=="input" and "{plugin}"=="beats"]
ifeval::["{type}"=="input"]
ifeval::["{plugin}"=="beats"]
ifeval::["{versioned_docs}"!="true"]
NOTE: The Beats shipper automatically sets the `type` field on the event.
@ -168,4 +171,5 @@ Logstash, it is ignored.
endif::[]
endif::[]
endif::[]

Some files were not shown because too many files have changed in this diff Show more