I am pretty new to prometheus,
I am trying to predict the next 5 hours cpu usage on node 1 and node 2.
My code is
'''
predict_linear(cpu_usage[5m],5*3600)
''' Since the cpu_usage includes two nodes, when I use the equation above, I got two prediction results, which I do not want it.
The results is below:
{node=node1} xxxxxxxx(prediction result 1)
{node=node2} xxxxxxxx(prediction result 2)
So I improve my code by adding '''
sum(predict_linear(cpu_usage[5m],5*3600)).
''' I am not sure it is the right way or not. I read the document and it mentioned that predic_linear is only for gauge.
Also, I am confused about the timestamp after I predict. for example, the prediction result on current timestamp 00:00:000, does it mean the value is for next 5 hours result on current timestamp?
Thanks guys,
Really appreciate it.
UC Berkeley School of Information
SRE Engineering Management
415-509-1893https://www.linkedin.com/in/qizhang2