Closed crisdarocha closed 1 week ago
Pinging @elastic/stack-monitoring (Stack monitoring)
Pinging @elastic/integrations (Team:Integrations)
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!
Still relevant!
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!
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.