Skip to content

Commit

Permalink
Remove experimental log message when xpack.enabled flag is set (#10222)
Browse files Browse the repository at this point in the history
* Remove experimental log message when xpack.enabled flag is set

* Add CHANGELOG entry

* Generate docs
  • Loading branch information
ycombinator authored Jan 23, 2019
1 parent 0a8a37f commit bb535f9
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Release Dropwizard module as GA. {pull}10240[10240]
- Release Graphite module as GA. {pull}10240[10240]
- Release http.server metricset as GA. {pull}10240[10240]
- Making RabbitMQ Metricbeat module GA. {pull}10165[10165]
- Release use of xpack.enabled: true flag in Elasticsearch and Kibana modules as GA. {pull}10222[10222]

*Packetbeat*

Expand Down
4 changes: 4 additions & 0 deletions metricbeat/docs/modules/elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ metricbeat.modules:
# Set to false to fetch all entries
#index_recovery.active_only: true
# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false
----

This module supports TLS connections when using `ssl` config field, as described in <<configuration-ssl>>.
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/docs/modules/kibana.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ metricbeat.modules:
hosts: ["localhost:5601"]
basepath: ""
enabled: true
# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false
----

This module supports TLS connections when using `ssl` config field, as described in <<configuration-ssl>>.
Expand Down
8 changes: 8 additions & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ metricbeat.modules:
# Set to false to fetch all entries
#index_recovery.active_only: true

# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false

#----------------------------- envoyproxy Module -----------------------------
- module: envoyproxy
metricsets: ["server"]
Expand Down Expand Up @@ -368,6 +372,10 @@ metricbeat.modules:
basepath: ""
enabled: true

# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false

#----------------------------- Kubernetes Module -----------------------------
# Node metrics, from kubelet:
- module: kubernetes
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/module/elasticsearch/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@

# Set to false to fetch all entries
#index_recovery.active_only: true

# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false
5 changes: 0 additions & 5 deletions metricbeat/module/elasticsearch/metricset.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package elasticsearch

import (
"github.com/elastic/beats/libbeat/common/cfgwarn"
"github.com/elastic/beats/libbeat/logp"
"github.com/elastic/beats/metricbeat/helper"
"github.com/elastic/beats/metricbeat/mb"
Expand Down Expand Up @@ -65,10 +64,6 @@ func NewMetricSet(base mb.BaseMetricSet, servicePath string) (*MetricSet, error)
return nil, err
}

if config.XPack {
cfgwarn.Experimental("The experimental xpack.enabled flag in " + base.FullyQualifiedName() + " metricset is enabled.")
}

ms := &MetricSet{
base,
servicePath,
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/module/kibana/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
hosts: ["localhost:5601"]
basepath: ""
enabled: true

# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false
5 changes: 0 additions & 5 deletions metricbeat/module/kibana/metricset.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package kibana

import (
"github.com/elastic/beats/libbeat/common/cfgwarn"
"github.com/elastic/beats/libbeat/logp"
"github.com/elastic/beats/metricbeat/mb"
)
Expand All @@ -38,10 +37,6 @@ func NewMetricSet(base mb.BaseMetricSet) (*MetricSet, error) {
return nil, err
}

if config.XPackEnabled {
cfgwarn.Experimental("The experimental xpack.enabled flag in the " + base.FullyQualifiedName() + " metricset is enabled.")
}

return &MetricSet{
base,
config.XPackEnabled,
Expand Down
5 changes: 0 additions & 5 deletions metricbeat/module/kibana/stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"strings"
"time"

"github.com/elastic/beats/libbeat/common/cfgwarn"
"github.com/elastic/beats/metricbeat/helper"
"github.com/elastic/beats/metricbeat/helper/elastic"
"github.com/elastic/beats/metricbeat/mb"
Expand Down Expand Up @@ -86,16 +85,12 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
}

if ms.XPackEnabled {
cfgwarn.Experimental("The experimental xpack.enabled flag in the " + ms.FullyQualifiedName() + " metricset is enabled.")

// Use legacy API response so we can passthru usage as-is
statsHTTP.SetURI(statsHTTP.GetURI() + "&legacy=true")
}

var settingsHTTP *helper.HTTP
if ms.XPackEnabled {
cfgwarn.Experimental("The experimental xpack.enabled flag in the " + ms.FullyQualifiedName() + " metricset is enabled.")

isSettingsAPIAvailable := kibana.IsSettingsAPIAvailable(kibanaVersion)
if err != nil {
return nil, err
Expand Down
8 changes: 8 additions & 0 deletions x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ metricbeat.modules:
# Set to false to fetch all entries
#index_recovery.active_only: true

# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false

#------------------------------ Envoyproxy Module ------------------------------
- module: envoyproxy
metricsets: ["server"]
Expand Down Expand Up @@ -377,6 +381,10 @@ metricbeat.modules:
basepath: ""
enabled: true

# Set to true to send data collected by module to X-Pack
# Monitoring instead of metricbeat-* indices.
#xpack.enabled: false

#------------------------------ Kubernetes Module ------------------------------
# Node metrics, from kubelet:
- module: kubernetes
Expand Down

0 comments on commit bb535f9

Please sign in to comment.