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 create ML categorization jobs #42017

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

[Logs UI] Create API route to create ML categorization jobs #42017

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/create

  • This creates the three ML jobs required for the analysis screen.
  • Each job will have a job ID that follows the format kibana.infra-ui.${spaceId}.${sourceId}.${jobType}. This format is deterministic so that when we check for the jobs' existence later, we know what the ID should be even if that job was removed or not successfully created.
interface CreateJobsRequest {
  data: {
    sourceId: string;
    categorizationFieldName: string;
    filterQuery?: string; // the UI would probably limit this to a event.dataset filter
    timeRange: {
      startTime: number;
      endTime: number;
    };
    runContinuously: boolean;
  };
}
interface CreateJobsSuccessResponse {
  data: {
    jobs: Array<{
      jobId: string;
      jobType: JobType;
      jobStatus: 'created';
    }>;
  };
}

type JobType = 'log_entry_rate' | 'rare_log_categories' | 'high_log_categories';
interface CreateJobsFailureResponse {
    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

Given that the existing module API will be extended to support our requirements (#42409), there is no need for a custom API. Instead, the ml module's /api/ml/modules/setup/:moduleId route should be used.

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