predictMetrics
predictorName
- the prediction preset to use:query
- the metrics to use for the prediction. A telemetry query that returns metrics, created using the Telemetry.query()
function followed by .compileQuery()
.predictionPoints(points: Int)
- the number of points to the horizon.includeHistory(start?: Instant, end?: Instant)
- call this builder method to include the result of the query
in the return value. Optionally a start and end can be added to limit the included history using the instant format. When not specifying the start and end the whole history will be included.AsyncScriptResult[PredictionResponse]
PredictionResponse
, which contains the following fields:PredictionResponse.request
- the request made to the prediction API of type PredictionRequest
.PredictionResponse.history
- optional, the history used for prediction of type MetricTelemetry
. Empty if .includeHistory()
was not used.PredictionResponse.prediction
- the predicted metrics.PredictionRequest
type has the following fields:PredictionRequest.query
- the query provided to predictMetrics
.PredictionRequest.predictor
- the name and configuration of the predictor.PredictionRequest.horizon
- the prediction horizon.PredictionRequest.predictionPointCount
- the number of predicted points.PredictionRequest.historyResponse
- options of the history response.MetricTelemetry
has the following fields:MetricTelemetry.result.data
- the two dimensional array with values and time stamps.myHost
for the next four hours based on the last four weeks of data: