Commit graph

1319 commits

Author SHA1 Message Date
Karen Metts
63ed2da5ec
Doc: Expand PQ content for pipeline-pipeline (#13319) 2021-11-18 20:07:24 -05:00
Ry Biesemeyer
c3e498a24b
ECS on by default for Logstash 8, again (#13391)
* ecs: report pipeline's ECS-compatibility with INFO at startup

Because the pipeline-level setting `pipeline.ecs_compatibility` affects the
default behaviour of nearly every plugin in the pipeline, an INFO-level log
message will provide useful hints, especially to our users who upgrade to
Logstash 8 without first reading the breaking changes docs.

For example, when we have two pipelines `old` and `new` whose `pipeline.ecs_compatibility` is `disabled` and `v8` respectively, we would get the following log messages:

> ~~~
> [2021-11-04T18:43:21,810][INFO ][logstash.javapipeline    ] Pipeline `old` is configured with `pipeline.ecs_compatibility: disabled` setting. All plugins in this pipeline will default to `ecs_compatibility => disabled` unless explicitly configured otherwise.
> [2021-11-04T18:43:21,817][INFO ][logstash.javapipeline    ] Pipeline `new` is configured with `pipeline.ecs_compatibility: v8` setting. All plugins in this pipeline will default to `ecs_compatibility => v8` unless explicitly configured otherwise.
> ~~~

* ecs: make v8 the default for 8.0

* ecs: `pipeline.ecs_compatibility` defaults to `v8`

Related: elastic/logstash#11623

* doc: temporarily remove deep link from breaking changes doc to fix build
2021-11-17 13:17:23 -08:00
Karen Metts
65e163fc5b
Doc: Add breaking changes (#13376)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-11-16 18:31:49 -05:00
João Duarte
47666a7b73
[DOC] replace references to master branch with main (#13302) 2021-11-08 10:24:18 +00:00
Karen Metts
853323290f
Doc: Update central management license info (#13368) 2021-11-01 12:17:56 -04:00
Rob Bavey
15be7a98c0
Update documentation around JVM usage to reflect changes (#13350)
* Update documentation around JVM usage to reflect changes

For Logstash `8.0`, java 8 will no longer be supported, and the documentation should
reflect that.

Update troubleshooting documentation - changes made in #13349 should remove the warnings
at startup for fresh installs of Logstash, but upgrading may still have the same issues.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-10-26 14:56:19 -04:00
Ry Biesemeyer
15930ccd3e
Secure API (#13308)
* settings: add "deprecated alias" support

A deprecated alias provides a path for renaming a setting.

 - When a deprecated alias is set on its own, a deprecation notice is emitted
   but fetching the canonical setting value will reflect the value set with the
   deprecated alias.
 - When both the canonical setting (new name) and the deprecated alias (old
   name) are specified, it is an error condition.
 - When the value of the deprecated alias is queried, a warning is emitted to
   the logger and only the value explicitly set to the deprecated alias is
   returned.

Additionally, some relevant cleanup is also included:

 - Starting Logstash with invalid settings no longer results in the obtuse "An
   unexpected error occurred" with backtrace and exception data obscuring the
   issue. Instead, a simple message is emitted indicating that the settings are
   invalid along with the originating exception's message.
 - The various settings implementations share a common logger, instead of each
   implementation class providing its own. This is aimed to reduce noise from
   the logs and to ensure specs validating logging do not need to tie so
   closely to implementation details.

* settings: add password-wrapped setting

* settings: make any setting type capable of being nullable

* settings: add `Settings#names` to power programatic iteration

* cli: route CLI-flag deprecations in to deprecation logger

* settings: group API-related settings under `api.*`

retains deprecated aliases, and is fully backward-compatible.

* webserver: cleanup orphaned attr accessors for never-set ivars

* api: pull settings extraction down from agent

This net-no-change refactor introduces a new method `WebServer#from_settings`
that bridges the gap between Logstash settings and Puma-related options, so
that future additions to the API settings don't add complexity to the Agent.

It also has the benefit of initializing the API Rack App and just ONCE, instead
of once per attempted HTTP port.

* api: add optional TLS/SSL

* docs: reference API security settings

* api: when configured securely, bind to all available interfaces by default

* cleanup: remove unused cert artifacts

* tests: generate fresh webserver certificates

* certs: actually add the binary keystores 🤦
2021-10-19 14:13:20 -07:00
Karen Metts
e5c8e6e3e6
Doc: Add link to pq info from troubleshooting topic (#13320)
Fixes: #13158
Related: #13173
2021-10-15 14:44:35 -04:00
Karen Metts
fc35cba884
Doc: Fix templating error in integration plugin header (#13324) 2021-10-15 13:32:01 -04:00
Karen Metts
904d257cf8
Doc: Expand content for memqueue (#13317)
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2021-10-14 19:30:48 -04:00
João Duarte
096eb7ac48
[DOC] Clarify the scope of environment variable expansion (#13299)
Environment variable expansion only works in plugin parameters, not in conditionals.
For more on this limitation see https://github.com/elastic/logstash/issues/5115
2021-10-13 11:17:49 +01:00
Ry Biesemeyer
82081d80d7
Add support for Nanosecond-precision timetamps (#12797)
* add nanoseconds support

Migrates internals of `org.logstash.Timestamp` from legacy `org.joda.time.*`
which is limited to millisecond-precision to modern `java.time.Instant`,
allowing us to retain nanosecond granularity of `@timestamp` values.

Timestamps that are generated by Logstash (such as when creating an event that
does _not_ have a `@timestamp` field) will be generated at the highest precision
available to the JVM and/or platform (in many cases, this is microseconds).

Timestamps that are _parsed_ from user input will capture the entire provided
precision, up to and including nanosecond granularity.

Throughout the flow in the pipeline, including serialization to PQ, DLQ, and
JSON, will retain all available precision.

BREAKING: This produces an effectively-breaking change to the serialization
          format of both the persistent queue (PQ) and dead-letter queue (DLQ),
          as the serialized format this changeset contains a higher granularity
          of timestamp than previous releases of Logstash were capable of
          parsing without error.
          As such, it _MUST NOT_ be back-ported to the 7.x series.
2021-10-11 09:22:33 -07:00
Karen Metts
8a01cf6d19
Doc: Fix list formatting (#13294) 2021-10-07 09:36:31 -04:00
Karen Metts
3314f2fbdf
Doc: Rework PQ content (#13173)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-10-06 18:46:27 -04:00
Karen Metts
1299f336d9
Doc: Remove outdated info and folder (#13259) 2021-10-06 11:56:50 -04:00
Karen Metts
44ea102a7e
Doc: Add topic and expand info for in-memory queue (#13246)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-10-05 18:12:02 -04:00
Karen Metts
2d8abc4597
Doc: Add shared attribute for messaging ecs default info (#13083)
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2021-10-01 13:15:44 -04:00
Karen Metts
37e1db0c12
Doc: Add note and example for date math in conditionals (#13199)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-09-21 15:09:15 -04:00
Rob Bavey
642875d705
[Docs] Remove outdated roadmap content (#13233) 2021-09-16 13:00:11 -04:00
Logstash Machine
0ce03de17f
Release notes for 8.0.0-alpha2 (#13228)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-09-15 20:52:16 -04:00
Andrea Selva
d51afe54d5
Removed JAVA_HOME using only LS_JAVA_HOME (#13214)
Removes the usage of JAVA_HOME completely which is not anymore used for JDK path resolution.

Updated all the Logstash launching scripts to use only LS_JAVA_HOME as environment variable to
determine the JDK to use to launch Logstash. JAVA_HOME is abandoned for this job.
2021-09-15 09:29:07 +02:00
Andrea Selva
3ffdb99119
Deprecate JAVA_HOME preferring LS_JAVA_HOME (#13207)
Adds print of deprecation notices on stdout when Logstash is starting with JAVA_HOME instead of LS_JAVA_HOME
2021-09-08 11:06:53 +02:00
Andrea Selva
979ea21c5e
Introduce LS_JAVA_HOME environment variable (#13204)
This commit modifies the launch scripts to take care of the LS_JAVA_HOME giving precedence over the JAVA_HOME, which is still used it the first is not found.
2021-09-06 10:22:51 +02:00
Mat Schaffer
8073b0c35e
Add beta tag to pipeline viewer docs (#13167) 2021-09-06 10:31:31 +09:00
Rob Bavey
4707cbd94c
Bundler: freeze lockfile on run, and "normalize" platform on plugin changes (#13015)
This PR enables the upgrade of bundler to the latest version.

Prior to this PR, the ability to do so was blocked by bundler.setup in versions of bundler > `2.23` making runtime changes to `Gemfile.lock` (unless the lock file was `frozen`) based on the specific platform the application was being run on, overriding any platforms (including generic `java` platform) set during build time. This was in conflict with changes made in #12782, which prevented the logstash user writing to files in `/usr/share/logstash`.

This PR will freeze the lockfile when logstash is run, and unfreeze it when manipulating plugins (install, update, remove, install from offline pack) to allow new plugins to be added. While unfrozen, changes are also made to ensure that the platform list remains as the generic `java` platform, and not changed to the specific platform for the runtime JVM.

This PR also introduces a new runtime flag, `--enable-local-plugin-development`. This flag is intended for use by Logstash developers only, and enables a mode of operation where a Gemfile can be manipulated, eg

```
gem "logstash-integration-kafka", :path => '/users/developer/code/plugins/logstash-integration-kafka'
```

to facilitate quick and simple plugin testing.

This PR also sets the `silence_root_warning` flag to avoid bundler printing out alarming looking warning messages when `sudo` is used. This warning message was concerning for users - it would be printed out during normal operation of `bin/logstash-plugin install/update/remove` when run under `sudo`, which is the expected mode of operation when logstash is installed to run as a service via rpm/deb packages. 

This PR also updates the vagrant based integration tests to ensure that Logstash still runs after plugin update/install/remove operations, fixes up some regular expressions that would cause test failures, and removes some dead code from tests.

## Release notes

* Updated Bundler to latest version
* Ensured that `Gemfile.lock` are appropriately frozen
* Added new developer-only flag to facilitate local plugin development to allow unfrozen lockfile in a development environment
2021-08-17 09:35:30 -04:00
Karen Metts
771844c070
Doc: Move shared region tags for breaking changes to 8.0.0 content (#13131) 2021-08-16 19:14:22 -04:00
Karen Metts
b7416cad37
Doc: Add breaking changes to breaking changes page (#13130)
Adds breaking changes noted in 8.0.0-alpha1 release notes to breaking changes page
Updates [float] tags to [discrete]
2021-08-13 11:02:18 -04:00
Logstash Machine
c679de1542
Release notes draft for 8.0.0-alpha1 (#13098)
Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-fedora-32-1626957762752525520.c.elastic-ci-prod.internal>
Co-authored-by: andsel <selva.andre@gmail.com>
Co-authored-by: Karen Metts <karen.metts@elastic.co>
2021-08-03 13:46:32 -04:00
Karen Metts
f0504588df
Doc: Enhance and expand DLQ docs (#12959)
Fixes: #12923
Related: #10493
2021-07-22 16:13:23 -04:00
Karen Metts
426e883f11
Doc:Fix typo and adjust keystore text (#12779) 2021-07-20 18:14:12 -04:00
Ry Biesemeyer
4056cb1b9a
doc: add pipeline.ecs_compatibility docs (#12421) 2021-07-20 14:59:34 -07:00
Ry Biesemeyer
68f3cf3d90
ecs_compatibility: revert breaking change; keep disabled as default for 8.0.0 (#13080)
As we close in on the availability of 8.0.0 alphas, we are reassessing which
breaking changes are _necessary_, and which are merely _desired_. And while
we would love to be in a world where ECS was on by default, and have put
substantial effort into designing an upgrade path that would be as simple as
possible, we have determined that the time may not be right to change the
default value out of under our users.

This change restores the default value for `pipeline.ecs_compatibility` to
`disabled`, ensuring pipelines will continue running in Logstash 8 as they have
in Logstash 7 without modification. We will still encourage our users to be
explicit about which behaviour they desire, and will revisit making ECS on by
default at a later date.
2021-07-20 14:45:36 -07:00
Karen Metts
3f38e2b83a
Doc: Add kafka schema registry setting to troubleshooting (#13073) 2021-07-14 12:40:09 -04:00
Karen Metts
a31a7a4736
Doc: Add geoip database API to node stats (#13019) 2021-06-24 08:37:56 -04:00
Ry Biesemeyer
1a4be956c4
ecs: on-by-default plus docs (#12830)
* noop: avoid declaring default value in config file

* docs: ecs compatibility from 7.x perspective

Co-authored-by: Karen Metts <karen.metts@elastic.co>

* ecs: on by default

We know that ECS version 8 will release along-side Logstash 8.0, but its scope
is still coming into focus. In this changeset, we change the default value
of `pipeline.ecs_compatibility` from `disabled` to `v1`, which is a
significantly closer approximation to what will eventually ship in Logstash
8.0.0.

* docs: ecs from 8.x perspective

Co-authored-by: Karen Metts <karen.metts@elastic.co>

Co-authored-by: Karen Metts <karen.metts@elastic.co>
2021-06-21 11:00:08 -07:00
Karen Metts
328fc9e7e6
Doc: Add tip for checking for existing field (#12899)
Co-authored-by: Sebastian <gentunian@users.noreply.github.com>
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2021-06-15 13:33:09 -04:00
Karen Metts
f481386039
Doc: Remove unused tagged regions (#12976) 2021-06-09 19:51:07 -04:00
Andres Rodriguez
51b359b011
Add a template on how to create an issue when requesting to list a plugin in docs (#12944)
In the List a Plugin docs, we suggest users to create an issue to request we list community plugins. This commit improves that page by adding a template to create an issue.
2021-06-01 09:10:09 -04:00
Karen Metts
da3157c013
Doc: Expand definition and fix typo (#12936) 2021-05-26 15:03:22 -04:00
Karen Metts
3885b751cb
Doc: Update contributing steps and guidelines (#12879) 2021-05-10 19:09:22 -04:00
Karen Metts
ec6b05d65d
Doc: Keystore must be accessible to logstash user (#12775)
Updates docs to propagate change to other branches. The original was a direct commit to the 7.10 branch.
2021-04-30 17:41:58 -04:00
Karol Bucek
19afb54841
Docs: note on quoted field references (#12801)
see GH-5591

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-04-14 10:41:38 +02:00
Andres Rodriguez
2caea13672
[doc] Add example to cross-plugin-concepts (#12672)
Adds an example showing users how to use the environment variable to define multiple whitespace-delimited URIs
2021-04-13 10:34:18 -04:00
Roshan Poudel
5dcfea5308
Update logstash.asciidoc (#12730)
Change protocol from HTTP to HTTPS
2021-03-16 15:08:51 -04:00
Karen Metts
ddda11ba71
Doc: Add unix command for running basic pipeline (#12714)
Adds framework for showing both windows and unix examples.
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-03-05 13:49:31 -05:00
Karen Metts
26a154b3df
Docs: Replace relative paths with docs-root attributes (#12719) 2021-03-05 11:42:51 -05:00
Megan Humphreys
af641a1662
Update getting-started-with-logstash.asciidoc (#12706)
Single quotations cause errors, should be double quotes for Windows
2021-03-02 15:20:58 -05:00
Inbar Shimshon
35c0f06943
Update keystore.asciidoc 2021-02-04 11:59:53 +02:00
kaisecheng
4f6d81ded7
remove CMS from jvm options in java 14 (#12638) 2021-02-03 12:16:28 +01:00
andsel
fd446c9b70 [Doc] added instruction on how to update and when an existing LS installation is update to LS 7.12+ and use JDK15
co-authored-by: karenzone@users.noreply.github.com
2021-02-02 00:12:31 -08:00