Commit graph

20 commits

Author SHA1 Message Date
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]
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
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
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
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
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
kaisecheng
3e9cc40142
add the missing logstash config supported by env2yaml for docker (#13178) (#13180)
Fixed: #13138
2021-08-30 18:09:03 +01: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
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
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
Drew Boswell
4ef0204098 add ssl verification_mode to env2yaml 2020-08-21 14:28:12 +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
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
andsel
e070af8e43 Adding plugin.id to docker images
Fixes #11593
2020-02-10 16:22:21 +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
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
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