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

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

Closed
ph opened this issue Dec 31, 2019 · 5 comments · Fixed by #15306
Closed
Assignees
Labels
bug Team:Integrations Label for the Integrations team

Comments

@ph
Copy link
Contributor

ph commented Dec 31, 2019

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
}

@ph
Copy link
Contributor Author

ph commented Dec 31, 2019

@ycombinator could you take a look?

@ph
Copy link
Contributor Author

ph commented Dec 31, 2019

I haven't checked the beat modules, so we might want to double-check it to make sure the module is not affected by a similar bug.

@ycombinator
Copy link
Contributor

ycombinator commented Dec 31, 2019

I checked the beat module, and it is okay. It's not making any HTTP calls in its metricsets' New functions.

@radoondas
Copy link
Member

Hey @ycombinator & @ph, I am a bit confused if this one is bug which we will fix or this is not a bug for Logstash output in the end. Can you please clarify? Thanks!

@ph
Copy link
Contributor Author

ph commented Jan 2, 2020

@radoondas It's a bug, but it's not related tot he Logstash output but to Metricbeat's Logstash module, the module that query the Logstash API to collect metrics and send them to Elasticsearch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants