Commit graph

93 commits

Author SHA1 Message Date
Colin Surprenant
454a856df8 do not call agent.converge_state_and_update before agent.execute 2020-06-30 11:14:26 -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
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
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
João Duarte
e9c9865f40
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:53:38 +00:00
andsel
fc0ced5708 Fixed time format that introduced flaky tests depending on time
Fixes #11652
2020-03-04 14:53:29 +00:00
andsel
3695580b92 Adaptations to internal collector to send data directly to monitoring cluster Close 11573
Fixes #11541
2020-02-28 14:26:19 +00:00
andsel
2925b491f9 Added precation notice when internal monitoring collector is used. Closes #11346
Fixes #11511
2020-01-27 15:06:46 +00:00
Karol Bucek
d8398351a2
Feat: x-pack cloud id/auth for monitoring/management (#11496)
resolves #11488
2020-01-14 22:06:50 +01:00
Joao Duarte
526a8f89ad introduce enterprise license level
Fixes #11407
2019-12-10 12:31:16 +00:00
Joao Duarte
3294a4be61 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
andsel
2a25547fbc Changed the xpack metrics pipeline to use a customized ES output plugin to put document_type for /_monitoring, closes #11312
Fixes #11321
2019-11-21 16:10:01 +00:00
Mike Place
252d5e7686
Enhance GET _node/stats/pipelines API for Metricbeat monitoring (#10576)
* 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-22 08:31:13 +02:00
Mike Place
cc3c5ec00f
Refactoring of LIR serializer and exposing pipeline metrics (#10561)
* [WIP] Add ephemeral id and hash to pipeline stats

Refs #10119

* Fix incorrect hash id

* Add graph metrics

* Include node update

* LIR serializer refactor

* Remove commented code

* Remove more commented code

* Update spec

* Remove license and add encoding

* Style change to make code more vertical.

* Implement review suggestions

* Remove commented code

* Fix spec path

* Add cluster UUID

* Add graph?=true parameter

* Add options to pipelines/

* Use pluginmetadata

* Replicate change from java_pipeline to ruby pipeline
2019-05-01 12:45:11 +02:00
Jake Landis
8bd7223bbf monitoring: bump to system_api_version 7
Fixes #10562
2019-03-17 15:12:15 +00:00
Ry Biesemeyer
67b8d43dff fix events_count to return total
Fixes #10564
2019-03-16 00:10:39 +00:00
Jake Landis
4867674eac 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
Jake Landis
ad65518304 update to send api version 6
Fixes #10518
2019-03-07 16:19:44 +00:00
Jake Landis
0ca34f07bb Central management typeless API
This commit adopts Elasticsearch's typeless API for central management.

Relates: https://github.com/elastic/elasticsearch/issues/3863

Fixes #10421
2019-03-07 16:19:17 +00:00
Colin Surprenant
6990d08be5
rename config option .url and .ca to .hosts and .certificate_authority (#10380) 2019-02-05 17:39:30 -05:00
Colin Surprenant
f08b8c5076
fix agent silent exit upon pipelines reloading (#10346) 2019-01-31 15:48:50 -05:00
João Duarte
fe7607abd4
only start monitoring pipeline after valid license (#10106)
Avoid unecessary logging errors and resource usage by only starting
the monitoring pipeline if we can validate the license.
2018-11-07 17:28:48 +00:00
Guy Boertje
3fdee027d9
Add SC and EB input TLS support for the Logstash ArcSight module (#10056)
* Add SC and EB input TLS support for the Logstash ArcSight module
I added the ssl for the smart connector (tcp) and ssl and sasl for the
event broker.
Needs verification on a current stack.

* So this is the actual extent of changes (I thought it was to simple)
Fixed the docs omission
Fixed the load path issue
Fixed the ERB binding context problem
Added some basic happy path tests

* remove module settings in logstash.yml

* Overwrite my logstash.yml with the content on master

* Add comments to yaml fixtures
2018-10-23 09:12:12 +01:00
Joao Duarte
78bc47d1c9 support ssl verification mode in monitoring and management
Fixes #9866
2018-08-31 08:01:27 +00:00
Ry Biesemeyer
807cbc1071 x-pack monitoring: prevent failures to emit metrics events before agent started
Before the monitoring pipeline is started, it is not possible to emit events
from the metrics input; not only is the `agent` nil (resulting in a cryptic
`NoMethodError` when we attempt to get its `ephemeral_id`), but the `queue`
will also be `nil` until the `run` method is invoked.

Instead, start the poller once we are sent `run` and are guaranteed to have a
`queue` on which to put the events; when the snapshot poller is running, skip
any invocations before `agent` is available.

Resolves: elastic/logstash#9462

Fixes #9627
2018-07-05 20:57:02 +00:00
Josh Soref
c6cd247ec3 Multiple spelling corrections (#9782)
* spelling: actually
* spelling: already
* spelling: concurrency
* spelling: constructor
* spelling: destinations
* spelling: different
* spelling: elasticsearch
* spelling: encoding
* spelling: error
* spelling: explicitly
* spelling: failings
* spelling: falsey
* spelling: guarantees
* spelling: having
* spelling: implementation
* spelling: logstash
* spelling: module
* spelling: multiple
* spelling: omitted
* spelling: overridden
* spelling: pipeline
* spelling: raspberry
* spelling: receive
* spelling: recommended
* spelling: registered
* spelling: registering
* spelling: shutdown
* spelling: signal
* spelling: specified
* spelling: successful
* spelling: successfully
* spelling: valuefied
* spelling: vector
2018-07-04 10:41:10 +01:00
Jake Landis
e22457252f Introduction of the Azure module (experimental)
This module leverages the Azure Event Hub to read events from the activity log and sql diagnostics.  Please note this module is considered experimental till otherwise noted.

This change also introduces logstash-input-azure_event_hubs as a default plugin

Fixes #9729
2018-07-02 16:34:49 +00:00
Armin
30e055b1bf JAVAFICATION: Move more of the Java pipeline to Java
Fixes #9723
2018-06-12 13:50:15 +00:00
Jake Landis
d538b524f8 Fix relative path for arcsight module. Fixes #9714
Fixes #9715
2018-06-07 14:36:28 +00:00
Armin
8759050aa4 JAVAFICATION: Port UniversalPlugin class to Java
Fixes #9632
2018-05-22 11:37:52 +00:00
Armin
c0abde28a6 JAVAFICATION: Port Loggable Module to Java
Fixes #9587
2018-05-17 12:17:31 +00:00
Armin
8ebde04ae8 Load tests via JUnit
Fixes #9575
2018-05-15 16:15:39 +00:00
Shaunak Kashyap
6a895a417e
Revert "[X-Pack Monitoring] Report pipeline protocol (#9516)" (#9568)
This reverts commit dc168a10b5.
2018-05-14 07:51:54 -07:00
Shaunak Kashyap
dc168a10b5
[X-Pack Monitoring] Report pipeline protocol (#9516)
* Add getter for pipeline protocol

* Refactoring: extract bare string into constant

* Report pipeline protocol to Monitoring as part of logstash_state docs

* Report all protocols, not just first one

* Refactoring: rename constant to be more descriptive

* De-dupe protocols list before sending to monitoring

* Checking for single protocol

* Adding missing require

This was being masked and was uncovered when this test suite was run by itself

* Raising error if multiple protocols are specified

* Adding back comma
2018-05-11 13:30:42 -07:00
Dan Hermann
5b576f96d4 Port Logger and SlowLogger to Java
Fixes #9520
2018-05-03 22:21:32 +00:00
Armin
1cc89532d7 JAVAFICATION: Port Ruby Error Definitions to Java
Fixes #9489
2018-04-26 12:44:00 +00:00
Jenkins CI
93cad10da1 Migrate x-pack-logstash source to logstash 2018-04-24 10:46:15 -05:00