Commit graph

166 commits

Author SHA1 Message Date
kaisecheng
1913de1bf7
update golang image to 1.17.1(#13260)
update golang image to 1.17.1 to get rid of expired DST Root CA X3
disable download manager test cases to silent Faraday::SSLError

Fixed: #13261

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2021-10-01 18:51:09 +02:00
kaisecheng
8c83282bae
geoip integrate air-gapped bootstrap script (#13104)
This PR integrates Elasticsearch bootstrap script to help users keep Logstah geoip plugin run without online update check.
Add `xpack.geoip.download.endpoint` option to config geoip database service endpoint.
Users can point to `http://localhost:8080/overview.json` when using the script to bootstrap nginx docker
2021-09-27 18:56:22 +02:00
kaisecheng
827bbd9270
fix geoip external DB shutdown nil exception (#13224)
Fixed: #13208
2021-09-15 14:42:28 +01: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
Karol Bucek
b1ec341b6d
Test: resolve integration failure due ECS mode (#13044)
otherwise this caused a LogStash::ConfigurationError:
GeoIP Filter in ECS-Compatiblity mode requires a `target` when `source` is not an `ip` sub-field, eg. [client][ip]
2021-07-01 15:26:21 +02:00
kaisecheng
5a209ba830
Add geoip database metrics to /node/stats API (#13004)
This PR adds geoip database status, last update timestamp, download stats counter to Node Stats API
2021-06-23 17:35:15 +02:00
Ry Biesemeyer
49e6b0e010
Allow per-pipeline config of ECS Compatibility mode via Central Management (#12861)
* spec: noop refactor of xpack central management

* spec: validate central management settings loading

* central management: allow pipeline.ordered and pipeline.ecs_compatibility settings
2021-06-17 13:59:53 -07:00
kaisecheng
42c4bbab9f
fix database manager with multiple pipelines (#12862)
This PR adds support to geoip multiple pipelines which have a single instance
to manage database download to avoid individual download per pipeline
2021-06-17 00:19:24 +02:00
João Duarte
0b08838d2a
bump devutils dependency to 2.x (#12857)
* update filter_spec to not use insist
* fix ruby tests adding rspec/wait require
2021-06-08 12:31:55 +01:00
João Duarte
1f670e62b2
turn off data streams in internal monitoring collection (#12941)
Since we default to data streams in 8.0.0, the internal collection for monitoring stops working due to the ES output trying to send data to the logs- data stream instead of the monitoring endpoint.
2021-05-27 16:24:48 +01:00
kaisecheng
e60340ad08
Geoip disable database manager (#12905) 2021-05-12 19:47:22 +02:00
kaisecheng
03fb24bd54
Geoip use cc indefinitely (#12888)
This PR allows using CC database indefinitely if Logstash hasn't used EULA database ever
Fixed: #12859
2021-05-11 17:30:18 +02:00
kaisecheng
76bff0aa91
change download path for geoip plugin (#12863)
The database was downloaded in plugin/vendor
This PR changes the working directory to `path.data`
2021-05-04 11:03:31 +02:00
kaisecheng
08f758c028
GeoIP database copy all files from .tgz alongside database (#12824)
This PR changes the behavior of copying license files from .tgz
Originally, only two files, MaxMind LICENSE.txt and COPYRIGHT.txt, are required
Now more files, README.txt and Elastic ToC, are potentially required
Instead of targeting the files, this change copies all content in .tgz
2021-04-15 14:35:18 +02:00
Andrea Selva
6f55066b17
Fix Date class clash when used in pipelines with Date filter and GeoIP and pin open-ssl to 0.10.5 (#12811)
This commit contains two fixes
* Fix Date class clash when used in pipelines with Date filter and GeoIP
* Pinned jruby-openssl version 0.10.5 to avoid SSL errors
2021-04-13 14:19:54 +02:00
kaisecheng
4eeaa4af92
Fix integration test to allow wildcard deletion in elasticsearch (#12806) 2021-04-08 17:12:03 +02:00
kaisecheng
ca76c0c484
GeoIP database add license files (#12756)
GeoIP database service provides LICENSE.txt and COPYRIGHT.txt 
along with the database in .tgz

Fixed: #12560
2021-03-25 19:34:19 +01:00
Ry Biesemeyer
d5becc0082
internal-monitoring: use configured ssl verification mode (#12749)
Upstream `ElasticsearchOptions#es_options_from_settings` already uses the
setting `elasticsearch.ssl.verification_mode` to produce an appropriate
boolean-valued `ssl_certificate_verification` in our `es_settings` hash, so
we can rely on it instead of re-checking equality with a string.
2021-03-16 10:02:05 -07:00
kaisecheng
ba6513e85a
change domain and endpoint of GeoIP database service (#12727)
Fixed: #12560
2021-03-09 10:39:28 +01:00
João Duarte
9643a33b99
update jruby to 9.2.16.0 (#12699)
fix define_method+super calls due to jruby/jruby#6571
2021-03-04 09:32:50 +00:00
Andrea Selva
bca169f348
Temporarly silenced an x-pack monitoring test, waiting to be fixed the root cause (#12712)
The fail cause is documented  in issue #12711
2021-03-03 17:53:11 +01:00
kaisecheng
fce949a1eb
fix broken test case of term of service (#12715)
Fixed: #12560
2021-03-03 14:00:07 +01:00
kaisecheng
e332842cb3
GeoIP clean up database after new download (#12689)
This commit adds a clean-up step to remove .gz and .mmdb 
which is not in the metadata after pointing to the new GeoIP database

Fixed: #12560
2021-03-02 14:30:44 +01:00
kaisecheng
54b370ea48
Geoip database service (#12675)
geoip database service in xpack
dependency update and license note

Fixed: #12560
2021-02-18 14:18:28 +01:00
andsel
91996cf2a2 Fix Logstash pipelines management in case of slow loading pipelines or disabled webserver (#12571)
This commit avoid an error in gathering monitoring information when webserver is disabled or is not yet started;
which could happen with slow loading pipelines or no pipelines defined from the central management UI.
2021-02-16 05:54:12 -08:00
kaisecheng
4bc9dad69c
Remove ruby execution engine (#12517)
* remove Logstash::Pipeline
* remove logstash/event, Logstash::SignalEvent
* remove Engine.Ruby on java side
* remove config pipeline.java_execution
Fixed: #11236
2020-12-15 10:41:27 +01:00
kaisecheng
606cfe5dfb
hash function of pipeline config with metadata (#12389)
add metadata in the hash function

Fixed #12387
2020-11-09 14:11:45 +01:00
kaisecheng
0f55de9c9e
add wildcard support in xpack pipeline id (#12370)
add wildcard support in xpack pipeline id
do the pattern matching with glob
add warning msg to wildcard with legacy api
check invalid pipeline in bootstrap
test cases for invalid checking
2020-11-03 11:02:07 +01:00
kaisecheng
999601cd90
replace direct access of hidden indices with system indices api (#12279)
* replace direct hidden indices access with system indices api

* fulfill backward compatibility

* fix log msg, rename class, simplify response handling

* modularise fetcher
2020-10-06 21:19:36 +02:00
Ry Biesemeyer
bba5e5dcc2 specs: don't start ES connection pool when only validating config
Accidentally succeeding at connecting to an HTTP resource that is not a real,
live Elasticsearch (such as an Elastic Cloud instance that has been shut down
and reaped) can cause client initialization to fail.
2020-08-04 02:24:59 -07:00
Colin Surprenant
87df15d236 ignore default username when no password is set
fixes a regression introduced with the api_key support for xpack monitoring and management in #11864 which disabled the possibility to not use any authentication by relying on the default options and only enabling monitoring for example. It now ignores the default username option when no password is explicitly set.
2020-07-13 14:54:10 -07:00
Rob Bavey
d706e50b27 [build] Ensure more gradle tasks using task avoidance API
Release Manager builds were failing as `downloadEs` task was being
needlessly run during `rake artifact:all` task. When run with
`RELEASE=1`. this was causing build failures due to the non-availability
of Elasticsearch release artifacts. This commit aims to avoid running
the `downloadES` task when it is not needed, continuing the work done
in #11914

This commit also removes code that was repeated in different parts of
the build script.
2020-07-13 13:39:00 -07:00
Colin Surprenant
454a856df8 do not call agent.converge_state_and_update before agent.execute 2020-06-30 11:14:26 -07:00
Rob Bavey
7b935bc7a1 Use BUILD_JAVA_HOME FOR JAVA_HOME in xpack integration tests 2020-06-04 07:33:52 -07:00
Colin Surprenant
f4ce80d956
add support for api_key authentication in xpack management and monitoring. (#11864) 2020-06-03 10:56:47 -04:00
Joao Duarte
d449fcf25a emit deprecation entry for netflow and azure modules
point users towards the beats modules instead
2020-05-29 15:26:23 +01:00
Rob Bavey
ac95667c11
Use task avoidance API in gradle scripts (#11914)
* Use task avoidance API in gradle scripts

This commit uses the task avoidance api (tasks.register vs task.create/
task DSL), as recommended since Gradle 5.1

This should reduce the execution of unnecessary tasks in build jobs, and
hopefully improve build resiliency and execution time.
2020-05-29 10:25:52 -04:00
Rob Bavey
62454c6671
Remove obsolete setting from Elasticsearch integration test (#11873)
https://github.com/elastic/elasticsearch/pull/56211 removed the ability
to turn off certain features in Elasticsearch. This commit removes
the setting of `xpack.monitoring.enabled`, as this is now
obsolete.
2020-05-06 11:40:12 -04:00
Andrea Selva
832d597278
Refactor: move PipelineConfig from Ruby to Java (#11824)
Reimplement the Ruby class PipelinceConfig in Java trying to keep the method signatures to limit the changes in client code, this is a step of other that intend to move all the configuration code in Java language.
Having all that code in Java unlock some reasoning about how to better implement it and probably an improvement in performance during process startup.
Moved also the spec into a JUnit and fixed here and there the failing tests

Closes: #11824
2020-04-29 18:16:49 +02:00
Colin Surprenant
eed526e8ce remove plugin internal validation call
Fixes #11818
2020-04-23 17:44:19 +00:00
João Duarte
0d127737aa
reinstate x-pack.monitoring settings in logstash.yml (#11822) 2020-04-22 15:28:47 +01:00
Ry Biesemeyer
f1e301e0d7 settings: deprecate unit-less TimeValue values
We have "required" units for a variety of `TimeValue` settings when they are
provided as a `String`, but unquoted values in YAML have been passed through as
Integers, where we long assumed nanosecond units. This frequently leads to
surprise (e.g., when `config.reload.interval` is set to `60`, we consume 100%
of CPU in a tight loop trying to reload and re-parse the configs every 60
nanoseconds).

By making the setting retain the TimeValue object for the entirety of its
lifecycle, we can issue a deprecation notice the first time an Integer value is
encountered. As a secondary benefit, our usage of the setting value in code
becomes more clear since we are empowered to ask `TimeValue` for a numeric
value in a specific scale.

Fixes #11803
2020-04-20 16:15:49 +00:00
Laurent Huet
83f0ac4cd7 add proxy support (central management & monitoring)
Fixes #11799
2020-04-20 13:35:36 +00:00
Karol Bucek
afce87a67e Fix: cloud_id not propagating from monitoring config
Fixes #11800
2020-04-16 18:52:42 +00:00
Andrea Selva
6a74872d50
Moved code out of LogStash::Compiler to org.logstash.config.ir.ConfigCompiler 2020-04-15 12:21:39 +02:00
Rob Bavey
2899c9f379 Handle Boolean Edges
Fixes #11779
2020-04-13 20:09:27 +00:00
Rob Bavey
5e6065f414 Incorporate review comments
Fixes #11777
2020-04-13 14:11:07 +00:00
Rob Bavey
54c451f48d Fix hard coded constraint on pipeline name for metrics
Fixes #11777
2020-04-13 14:11:07 +00:00
Rob Bavey
58314a7f0e
Update gradle version to 6.3 (#11742)
* Update gradle version to 6.3

Gradle versions prior to 6.3 cannot run under JDK14.
This commit upgrades the version of Gradle to 6.3, and removes all deprecation warnings that can currently be removed.

Changes include:
* Increase gradle memory to 2g
* Increase gradle memory in the license check job to 2g
* Replace use of `testCompile`
* Replace `runtime` with `runtimeOnly`
* Remove`compile` depedencies from gradle files
* Replace deprecated archive methods
* Fix dependencies report build
* Make jruby dependencies 'api', fix archiveVersion
* Set `duplicatesStrategy` for all tasks of type Copy
* Use `configureEach` for global 'withType' calls
** Use the recommended Tasks API calls
(https://blog.gradle.org/preview-avoiding-task-configuration-time)
* Run `./gradlew wrapper` earlier to improve caching
* Use copy with chown for resources that need to be run during `./gradlew wrapper`
2020-04-07 12:49:36 -04:00
Colin Surprenant
5a25c6f8e9 simplify batch classes, do not compute JE empty batches, refactor RE worker loop (#11737)
cleanup RubyArray "rawtypes"
remove all LinkedHashSet from batch and queue classes
avoid processing empty batches in Java worker loop
cleanup AckedReadBatch and MemoryReadBatch
refactor Ruby worker loop similar to Java Execution to not use batch merge
remove QueueBatch merge and replace LinkedHashSet with ArrayList
2020-04-02 16:26:54 -04:00