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

[Logs UI] [ML] Use ML's mlAnomalySearch for all searches on the anomaly index #67861

Closed
jgowdyelastic opened this issue Jun 1, 2020 · 2 comments · Fixed by #68905
Closed
Assignees
Labels
chore Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Milestone

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 Feature:Logs UI Logs UI feature label Jun 1, 2020
@jgowdyelastic jgowdyelastic changed the title [Logs UI] [ML] Use ML's mlAnomalySearch for all searches on the anomaly index [Logs UI] [ML] Use ML's mlAnomalySearch for all searches on the anomaly index Jun 1, 2020
@jasonrhodes
Copy link
Member

Thanks for this ticket, @jgowdyelastic !

@weltenwort weltenwort added the Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services label Jun 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants