Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export field for xpack.enabled setting #9642

Merged
merged 1 commit into from Dec 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 3 additions & 8 deletions metricbeat/module/kibana/metricset.go
Expand Up @@ -33,23 +33,18 @@ type MetricSet struct {
// NewMetricSet creates a metricset that can be used to build other metricsets
// within the Kibana module.
func NewMetricSet(base mb.BaseMetricSet) (*MetricSet, error) {
config := struct {
xPackEnabled bool `config:"xpack.enabled"`
}{
xPackEnabled: false,
}

config := DefaultConfig()
if err := base.Module().UnpackConfig(&config); err != nil {
return nil, err
}

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

return &MetricSet{
base,
config.xPackEnabled,
config.XPackEnabled,
logp.NewLogger(ModuleName),
}, nil
}