Skip to content

Conversation

@tobio
Copy link
Member

@tobio tobio commented Sep 28, 2025

Requires #1329

This resource is intended to manage the state of an ML anomaly detection job. Specifically, whether the job is opened of closed. The intention here is to ultimately have four resources:

  • The anomaly detection job
  • The data feed
  • The job state (this PR)
  • The data feed state

This is intended to better align with the lifecycle of the underlying stack resources, whilst also simplifying the job and data feed resources.

@tobio tobio requested a review from nick-benoit September 28, 2025 11:59
@tobio tobio self-assigned this Sep 28, 2025
@tobio tobio force-pushed the ml-job-state branch 2 times, most recently from c37a14a to b8e3748 Compare October 23, 2025 11:48
Copy link
Contributor

@nick-benoit nick-benoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a neat way to manage Open / Close state. A few questions / comments.

This resource uses the following Elasticsearch APIs:
Open ML Job API https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.htmlClose ML Job API https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.htmlGet ML Job Stats API https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
Important Notes
This resource manages the state of an existing ML job, not the job configuration itself.The ML job must already exist before using this resource.Opening a job allows it to receive and process data.Closing a job stops data processing and frees up resources.Jobs can be opened and closed multiple times throughout their lifecycle.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: For some reason there aren't any spaces after periods in this snippet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where this frontmatter description is used, but the formatting is stripped here in all the docs. In this case, it looks like the result for stripping a markdown list back to plain text.

tobio added 2 commits October 24, 2025 14:15
* origin/main:
  chore(deps): update kibana-openapi-spec digest to dcff88f (#1383)
  chore(deps): update docker.elastic.co/kibana/kibana docker tag to v9.2.0 (#1392)
  chore(deps): update docker.elastic.co/elasticsearch/elasticsearch docker tag to v9.2.0 (#1391)
  Add ML Datafeed resource (#1340)
nick-benoit
nick-benoit previously approved these changes Oct 24, 2025
@tobio tobio merged commit 04333ba into main Oct 27, 2025
54 checks passed
@tobio tobio deleted the ml-job-state branch October 27, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants