Identifier for the anomaly detection job. The job must be open when you create a forecast; otherwise, an error occurs.
A period of time that indicates how far into the future to forecast. For
example, 30d corresponds to 30 days. The forecast starts at the last
record that was processed.
The period of time that forecast results are retained. After a forecast expires, the results are deleted. If set to a value of 0, the forecast is never automatically deleted.
The maximum memory the forecast can use. If the forecast needs to use more than the provided amount, it will spool to disk. Default is 20mb, maximum is 500mb and minimum is 1mb. If set to 40% or more of the job’s configured memory limit, it is automatically reduced to below that amount.
Refer to the description for the duration query parameter.
Refer to the description for the expires_in query parameter.
Refer to the description for the max_model_memory query parameter.
Default value is 20mb.
POST _ml/anomaly_detectors/low_request_rate/_forecast
{
"duration": "10d"
}
resp = client.ml.forecast(
job_id="low_request_rate",
duration="10d",
)
const response = await client.ml.forecast({
job_id: "low_request_rate",
duration: "10d",
});
response = client.ml.forecast(
job_id: "low_request_rate",
body: {
"duration": "10d"
}
)
$resp = $client->ml()->forecast([
"job_id" => "low_request_rate",
"body" => [
"duration" => "10d",
],
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"duration":"10d"}' "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_forecast"
client.ml().forecast(f -> f
.duration(d -> d
.time("10d")
)
.jobId("low_request_rate")
);
{
"duration": "10d"
}