mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
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
This commit is contained in:
parent
de95de3ae5
commit
b3c85356b0
3 changed files with 19 additions and 1 deletions
16
x-pack/lib/monitoring/outputs/elasticsearch_monitoring.rb
Normal file
16
x-pack/lib/monitoring/outputs/elasticsearch_monitoring.rb
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
# or more contributor license agreements. Licensed under the Elastic License;
|
||||||
|
# you may not use this file except in compliance with the Elastic License.
|
||||||
|
|
||||||
|
module LogStash module Outputs
|
||||||
|
class ElasticSearchMonitoring < LogStash::Outputs::ElasticSearch
|
||||||
|
config_name "elasticsearch_monitoring"
|
||||||
|
|
||||||
|
# This is need to avoid deprecation warning in output
|
||||||
|
config :document_type, :validate => :string
|
||||||
|
|
||||||
|
def use_event_type?(client)
|
||||||
|
true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end; end
|
|
@ -11,7 +11,7 @@ input {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
output {
|
output {
|
||||||
elasticsearch {
|
elasticsearch_monitoring {
|
||||||
<% if cloud_id? %>
|
<% if cloud_id? %>
|
||||||
cloud_id => "<%= cloud_id %>"
|
cloud_id => "<%= cloud_id %>"
|
||||||
<% if cloud_auth %>
|
<% if cloud_auth %>
|
||||||
|
|
|
@ -11,11 +11,13 @@ require "logstash/plugins/registry"
|
||||||
require "logstash/modules/util"
|
require "logstash/modules/util"
|
||||||
require "monitoring/monitoring"
|
require "monitoring/monitoring"
|
||||||
require "monitoring/inputs/metrics"
|
require "monitoring/inputs/metrics"
|
||||||
|
require "monitoring/outputs/elasticsearch_monitoring"
|
||||||
require "config_management/extension"
|
require "config_management/extension"
|
||||||
require "modules/xpack_scaffold"
|
require "modules/xpack_scaffold"
|
||||||
require "filters/azure_event"
|
require "filters/azure_event"
|
||||||
|
|
||||||
LogStash::PLUGIN_REGISTRY.add(:input, "metrics", LogStash::Inputs::Metrics)
|
LogStash::PLUGIN_REGISTRY.add(:input, "metrics", LogStash::Inputs::Metrics)
|
||||||
|
LogStash::PLUGIN_REGISTRY.add(:output, "elasticsearch_monitoring", LogStash::Outputs::ElasticSearchMonitoring)
|
||||||
LogStash::PLUGIN_REGISTRY.add(:universal, "monitoring", LogStash::MonitoringExtension)
|
LogStash::PLUGIN_REGISTRY.add(:universal, "monitoring", LogStash::MonitoringExtension)
|
||||||
LogStash::PLUGIN_REGISTRY.add(:universal, "config_management", LogStash::ConfigManagement::Extension)
|
LogStash::PLUGIN_REGISTRY.add(:universal, "config_management", LogStash::ConfigManagement::Extension)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue