-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Comments
Pinging @elastic/stack-monitoring (Stack monitoring) |
Pinging @elastic/integrations (Team:Integrations) |
Hi! We're labeling this issue as |
Still relevant! |
Hi! We're labeling this issue as |
Still relevant if not fixed yet. |
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
).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:
When setting
xpack.ml.enabled: false
, the response changes to: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.
xpack.ml.enabled: false
in theelasticsearch.yml
fileGET _ml/anomaly_detectors/_all/_stats
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 ifml
isenabled/available
upfront.The text was updated successfully, but these errors were encountered: