Commit graph

10886 commits

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

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

* Apply suggestions from code review

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

* Remove reviewer questions

* Apply suggestions from code review

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

* Fix security statement

---------

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

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

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

* Apply suggestions from code review



---------

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

* Apply suggestions from code review

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

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

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

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

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

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

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

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

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

* Worker utilization metrics implementation.

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

* Unit tests added for fractured extended & simple metrics.

* Code review change requests applied.

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

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

* Integration test added for plugin-level flow metrics.

* Apply suggestions from code review

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* plugin flow: reshape docs

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2022-12-16 14:11:21 -08:00
Rob Bavey
7e25a0d76a
Update Ironbank base image to 8.7 (#14812) 2022-12-16 10:12:09 -05:00
Edmo Vamerlatti Costa
21a298635c
Fix pipeline compilation to make it fail when multiple top-level codec per plugin are specified #14810
Logstah currently does not support multiple top-level `codec` per plugin. This commit fixes the pipeline compilation ensuring that erroneously configured plugins fail to compile and result in a configuration error.
2022-12-16 13:29:22 +01:00