Loading...
Loading...
Create and manage Elastic ML anomaly detection jobs via the API. Use when setting up jobs on an index or data stream, configuring jobs and datafeeds, or opening, starting, or stopping them.
npx skill4agent add elastic/agent-skills elasticsearch-anomaly-detectionelasticelasticGET /GET /_cat/indicesGET /{index}/_mappingGET /{index}/_settings/index.modePOST /_queryelasticPrerequisite: ML anomaly detection requires a Platinum-equivalent license on self-managed clusters. Serverless projects include ML. The caller needsto create and manage jobs.manage_mlRelated skill: For interpreting anomaly scores, influencers, and model behavior after a job is running, use— not this skill.elasticsearch-anomaly-detection-explainer
GET /_cat/indicesGET /{index}/_mapping@timestampanalysis_config.detectorshigh_countcountlow_countlow_counthigh_countmeanhigh_meanlow_meanfield_namePUT /_ml/anomaly_detectors/{job_id}analysis_config.bucket_span15mdata_description.time_field@timestampanalysis_config.detectors{
"analysis_config": {
"bucket_span": "15m",
"detectors": [{ "function": "high_count" }]
},
"data_description": { "time_field": "@timestamp" }
}{
"analysis_config": {
"bucket_span": "15m",
"detectors": [{ "function": "low_count" }]
},
"data_description": { "time_field": "@timestamp" }
}PUT /_ml/anomaly_detectors/{job_id}closedPUT /_ml/datafeeds/datafeed-{job_id}job_idindicesmatch_alldatafeed-{job_id}{
"job_id": "{job_id}",
"indices": ["{index}"],
"query": { "match_all": {} }
}POST /_ml/anomaly_detectors/{job_id}/_openopenedPOST /_ml/datafeeds/datafeed-{job_id}/_startstartedGET /_ml/anomaly_detectors/{job_id}/_statsstate: "opened"GET /_ml/datafeeds/datafeed-{job_id}/_statsstate: "started"GET /_ml/anomaly_detectors/{job_id}bucket_spantime_fieldPOST /_ml/datafeeds/datafeed-{job_id}/_stopPOST /_ml/anomaly_detectors/{job_id}/_closebucket_spantime_fieldPUTindicesby_field_nameover_field_namepartition_field_name| HTTP API (shorthand) | |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |