Estimate job model memory usage
Generally available; Added in 7.7.0
Body
Required
-
Estimates of the highest cardinality in a single bucket that is observed for influencer fields over the time period that the job analyzes data. To produce a good answer, values must be provided for all influencer fields. Providing values for fields that are not listed as
influencers
has no effect on the estimation. -
Estimates of the cardinality that is observed for fields over the whole time period that the job analyzes data. To produce a good answer, values must be provided for fields referenced in the
by_field_name
,over_field_name
andpartition_field_name
of any detectors. Providing values for other fields has no effect on the estimation. It can be omitted from the request if no detectors have aby_field_name
,over_field_name
orpartition_field_name
.
curl \
--request POST 'http://api.example.com/_ml/anomaly_detectors/_estimate_model_memory' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"analysis_config\": {\n \"bucket_span\": \"5m\",\n \"detectors\": [\n {\n \"function\": \"sum\",\n \"field_name\": \"bytes\",\n \"by_field_name\": \"status\",\n \"partition_field_name\": \"app\"\n }\n ],\n \"influencers\": [\n \"source_ip\",\n \"dest_ip\"\n ]\n },\n \"overall_cardinality\": {\n \"status\": 10,\n \"app\": 50\n },\n \"max_bucket_cardinality\": {\n \"source_ip\": 300,\n \"dest_ip\": 30\n }\n}"'
{
"analysis_config": {
"bucket_span": "5m",
"detectors": [
{
"function": "sum",
"field_name": "bytes",
"by_field_name": "status",
"partition_field_name": "app"
}
],
"influencers": [
"source_ip",
"dest_ip"
]
},
"overall_cardinality": {
"status": 10,
"app": 50
},
"max_bucket_cardinality": {
"source_ip": 300,
"dest_ip": 30
}
}
{
"model_memory_estimate": "21mb"
}