Skip to content

[Metricbeat] When Logstash module is enable and we fail to reach it, metricbeat refuses to starts #15276

@ph

Description

@ph

Looking at the code of the Logstash module I believe the module is also affected by a similar bug defined in #15258 for Kibana. I also looked at the Elasticsearch module but I think this one is OK.

func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
ms, err := logstash.NewMetricSet(base)
if err != nil {
return nil, err
}
if ms.XPack {
logstashVersion, err := logstash.GetVersion(ms)
if err != nil {
return nil, err
}
arePipelineGraphAPIsAvailable := logstash.ArePipelineGraphAPIsAvailable(logstashVersion)
if err != nil {
return nil, err
}
if !arePipelineGraphAPIsAvailable {
const errorMsg = "The %v metricset with X-Pack enabled is only supported with Logstash >= %v. You are currently running Logstash %v"
return nil, fmt.Errorf(errorMsg, ms.FullyQualifiedName(), logstash.PipelineGraphAPIsAvailableVersion, logstashVersion)
}
}
return &MetricSet{
ms,
}, nil
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions