Forecast API
Forecast API
GET
http://<your-kubecost-address>/forecasting/forecast/<monitoringEndpoint>
The Forecast API predicts a range of total future spending for any of Kubecost's three major monitoring data sets; Allocation, Assets, and CloudCosts, as established via the monitoringEndpoint
(more below).
Request Body
predictionWindow*
string
Range of future spend to predict. The larger the value of this parameter, the wider the confidence bounds may become. Should be formatted in number of days, ex: predictionWindow=30d
aggregate
string
Does not ever support job
, daemonSet
, or statefulSet
. Does not affect predicted cost values.
Schema
Regardless of the value of predictionWindow
, results will be returned in daily intervals.
predictedCost
will be the closest approximation of future costs for the day defined in the window
field. The bounds of the confidence interval are displayed with the values lowerConfidenceLimit
and upperConfidenceLimit
.
Forecast Container
The Forecast Container powers multiple cost prediction features in Kubecost including Forecasting and Anomaly Detection. It reads the last 100 days of cost data to form a reliable model of prediction when querying with the Forecast API.
The Forecasting Container can be disabled by setting the Helm flag:
Configuring monitoringEndpoint
monitoringEndpoint
The Forecast API requires a configurable endpoint which establishes from which monitoring data you want to forecast:
Examples
Forecast future cloud cost spend for the next 60 days:
Last updated