简体   繁体   中英

How can I find long term trends using RRD?

Newbie in rrdtool. I want to look at efforts required to establish a line of best fit on RRD charts so that we can detect long term trends - ie value is increasing over time. I have been recently using the Perl module Statistics::LineFit to help establish regression trends. Maybe there is a tool in RRD itself which makes it easier to do a linear regression fit?

Looked at the PREDICT, PREDICTSIGMA documentations and tried below settings but this gives me below error. Any suggestions please.

rrdtool graph image.png --imgformat=PNG \
--start=-7days --end=+3days --width=1000 --height=200 --alt-autoscale-max \ DEF:value=value.rrd:value:AVERAGE:start=-14days \ 
LINE1:value#ff0000:value \ 
CDEF:predict=86400,-7,1800,value,PREDICT \ 
CDEF:sigma=86400,-7,1800,value,PREDICTSIGMA \ 
CDEF:upper=predict,sigma,3,*,+ \ 
CDEF:lower=predict,sigma,3,*,- \ 
LINE1:predict#00ff00:prediction \ 
LINE1:upper#0000ff:upper\ certainty\ limit \ 
LINE1:lower#0000ff:lower\ certainty\ limit \ CDEF:exceeds=value,UN,0,value,lower,upper,LIMIT,UN,IF \ 
TICK:exceeds#aa000080:1

ERROR

[ERROR: invalid rpn expression in: 86400,-7,1800,value,PREDICT]

您可能希望查看rrdtool 1.4中的PREDICT和PREDICTSIGMA函数......也许它们有所帮助。

Good question. I'm also an RRD noob and I hope you get a good answer. My only comment from my experience is this:

Are you aware of the xport command? Having to make specific, custom use of my graph data, I finally just exported the data to XML, processing it externally. xport is very similar to graph except you get text instead of a graphic file.

I would hope it doesn't come to this, but in principle you could compute your line and superimpose it on the rrdtool graph using Imagemagick or something.

Google gave me this " Trend / Prediction with RRDtool ". I am able to find the long term trends using the hints given on this page. Hope this is helpful for other as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM