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] Create API route to check the status of ML jobs #42018

Closed
Zacqary opened this issue Jul 25, 2019 · 2 comments
Closed

[Logs UI] Create API route to check the status of ML jobs #42018

Zacqary opened this issue Jul 25, 2019 · 2 comments
Assignees
Labels
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 v7.4.0

Comments

@Zacqary
Copy link
Contributor

Zacqary commented Jul 25, 2019

Part of #41509

Acceptance criteria

POST /api/infra/log_analysis/jobs/status

  • This returns a confimation of the presence and integrity of the three ML jobs.
  • Each job ID follows the format of kibana.infra-ui.${spaceId}.${sourceId}.${jobType}. This allows us to know the expected job ID even if a job's status is missing
interface GetJobStatusRequest {
  data: {
    sourceId: string;
  };
}
interface GetJobStatusSuccessResponse {
  data: {
    jobs: Array<{
      jobId: string;
      jobType: JobType;
      jobStatus: JobStatus;
    }>;
  };
}

type JobType = 'log_entry_rate' | 'rare_log_categories' | 'high_log_categories'
type JobStatus = 'created' | 'missing' | 'running'
interface GetJobStatusFailureResponse {
  errors: Array<HTTPError>
}

interface HTTPError {
  statusCode: number;
  error: string;
  message: string;
  attributes?: Object;
}
@Zacqary Zacqary added 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 v7.4.0 labels Jul 25, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-logs-ui

@weltenwort
Copy link
Member

The existing ml module route /api/ml/jobs/jobs_summary can be used to query multiple job status. There is no need for a custom API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 v7.4.0
Projects
None yet
Development

No branches or pull requests

4 participants