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

[APM] [ML] Use ML's mlAnomalySearch for all searches on the anomaly index #67860

Open
jgowdyelastic opened this issue Jun 1, 2020 · 0 comments
Labels
apm:ml Integration between APM and ML

Comments

@jgowdyelastic
Copy link
Member

ML has the function mlAnomalySearch which is shared via the setup contract and can be used to search the anomaly index.

mlAnomalySearch is a simple wrapper around the standard elasticsearch search function, but also adds some additional checks.

Currently only a license check is performed, but it will soon perform a user capabilities check and once ML introduces space aware jobs, it will ensure the jobs being searched are available in the current space.

Rather than calling

callAsCurrentUser('search', { 
  index: '.ml-anomalies-*',
  body: {.......}
})

you can call

mlAnomalySearch({
   body: {......}
})

Note, index can be omitted as '.ml-anomalies-*' is hardcoded.

@jgowdyelastic jgowdyelastic added the apm:ml Integration between APM and ML label Jun 1, 2020
@jgowdyelastic jgowdyelastic changed the title [APM] [ML] Use ML's mlAnomalySearch for all searches on the anomaly index [APM] [ML] Use ML's mlAnomalySearch for all searches on the anomaly index Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ml Integration between APM and ML
Projects
None yet
Development

No branches or pull requests

1 participant