Creating projection line on graphs

Hi all,

I was wondering if it is possible to create a projection line per date on a graph? For example, we have computers that need to be updated, eg 200 in the next 5 days, so we would have a line that reduces by 40 computers per day? That way at the end of the 5 days we have the projection and the actual amount?

Kind regards,

This depends on which data source you are using. Graphite, InfluxDB and Prometheus all have support for Holt Winters and other functions like linear regression. Grafana’s time range can also be changed to a future date.

Some resources:

Hi Daniellee,

Thank you for the response. I have had a look and it seems to be on the right sort of lines but the function seems to be used for data that already exists in prometheus.

The idea that I am looking for is for a future projection, eg, in two days time we are looking to have 20 machines left to update so we have two lines ones for the amount we are actually at and a line for where we want to be.

I have attached an image, I am looking to make the yellow line.
Kind regards,

So you can use something like linear regression and then just change the time range in Grafana to be in the future. For example, now+10d

Here is a not very good example that uses linear regression (because the line is flat):

daniellee Can you share the dashboard… Ive been trying to figure out how to do this and have not yet found it…

Hi Daniellee, i’d be very interested to know the trick as well because neither holtWintersForecast nor linearRegression are working for me

This is done using graphite and has two queries:

  • Query A: alias(scaleToSeconds(sumSeries(keepLastValue(mystats.*.count, 100)), 600), 'total')
  • Query B: alias(linearRegression(#A, '-30d', '-10min'), 'forecast')

Hope that helps

i got the same result with -30d, -10min