Commit graph

70 commits

Author SHA1 Message Date
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]
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
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
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
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
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
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
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
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
050eb98f0b
fix geoip external DB shutdown nil exception (#13224) (#13225)
Fixed: #13208
2021-09-15 15:30:52 +01: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
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
kaisecheng
ec8d182ebb
Geoip disable database manager (#12905) (#12906) 2021-05-14 10:39:37 +02: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
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
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
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
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
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
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
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
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
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
40a807d4e6 do not call agent.converge_state_and_update before agent.execute 2020-06-30 18:14:26 +00: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
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
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
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
Karol Bucek
ee2d819d44 Fix: cloud_id not propagating from monitoring config
Fixes #11800
2020-04-16 18:52:42 +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
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
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
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
andsel
6a412f7afd Added precation notice when internal monitoring collector is used. Closes #11346
Fixes #11511
2020-01-27 15:06:46 +00:00
Karol Bucek
3a1194edc5
Feat: x-pack cloud id/auth for monitoring/management (#11496)
resolves #11488
2020-01-14 21:35:32 +01: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
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
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
30adb7a565 LIR serializer refactor
Fixes #10561
2019-05-01 11:16:58 +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
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
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