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 monitoring module elasticsearch-xpack error when Machine Learning is explicitly disabled #28087

Closed
crisdarocha opened this issue Sep 23, 2021 · 6 comments · Fixed by #39990
Assignees

Comments

@crisdarocha
Copy link

crisdarocha commented Sep 23, 2021

Summary

When using the elasticsearch-xpack module to monitor an Elasticsearch node, this one fails if Machine Learning is explicitly disabled (xpack.ml.enabled: false).

Error fetching data for metricset elasticsearch.ml_job: HTTP error 400 in : 400 Bad Request

This is due to the response from GET _ml/anomaly_detectors/_all/_stats and is independent of license level.

If Machine Learning is not disabled, the response for this API call will be at least:

{
  "count": 0,
  "jobs": []
}

When setting xpack.ml.enabled: false, the response changes to:

{
  "error": "no handler found for uri [/_ml/anomaly_detectors/_all/_stats] and method [GET]"
}

Which won't be understood by the module as "I disabled ML".

For license levels where ML is not a feature, this setting has no impact, but for licenses that could have ML, one might want to explicitly disable it and this will cause monitoring errors.

  • Steps to Reproduce:
  1. Install a single node Elasticsearch cluster
  2. Set xpack.ml.enabled: false in the elasticsearch.yml file
  3. Issue GET _ml/anomaly_detectors/_all/_stats
{
  "error": "no handler found for uri [/_ml/anomaly_detectors/_all/_stats] and method [GET]"
}

Technical details

I investigated the issue and one way to fix it is to check if the ML is enabled to avoid getting the error shown. We can use the API to get the information - under features we can check if ml is enabled/available upfront.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/stack-monitoring (Stack monitoring)

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 23, 2021
@andresrc andresrc added the Team:Integrations Label for the Integrations team label Oct 14, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 14, 2021
@botelastic
Copy link

botelastic bot commented Oct 14, 2022

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Oct 14, 2022
@crisdarocha
Copy link
Author

Still relevant!

@botelastic botelastic bot removed the Stalled label Oct 14, 2022
@matschaffer matschaffer added Team:Infra Monitoring UI - DEPRECATED Infrastructure Monitoring UI team - DEPRECATED - Use Team:Monitoring and removed Team:Integrations Label for the Integrations team labels Oct 17, 2022
@botelastic
Copy link

botelastic bot commented Oct 17, 2023

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Oct 17, 2023
@crisdarocha
Copy link
Author

Still relevant if not fixed yet.

@botelastic botelastic bot removed the Stalled label Oct 17, 2023
@smith smith added Team:Monitoring Stack Monitoring team and removed Team:Infra Monitoring UI - DEPRECATED Infrastructure Monitoring UI team - DEPRECATED - Use Team:Monitoring labels Jan 26, 2024
@jennypavlova jennypavlova self-assigned this Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants