rrdtool 霍尔特-温特斯功能
我写这篇文章主要是因为我正在使用 rrdtool holt-winters 功能,但遗憾的是它不能像我想的那样工作,首先我将为您编写 rrd 文件命令行创建:
`/usr/bin/rrdtool create /home/spread/httphw/rrd/httpr.rrd --start $_[7]-60 --step 60 DS:200:GAUGE:120:U:U RRA:AVERAGE:0.5:1:1440 RRA:HWPREDICT:1440:0.1:0.0035:288 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797`;
之后我基本上插入数据,然后绘制像这样的图表:
`/usr/bin/rrdtool graph file.png --start $start --end $time --width 600 --height 200 --imgformat PNG DEF:doscents=$rrd:200:AVERAGE DEF:pred=$rrd:200:HWPREDICT DEF:dev=$rrd:200:DEVPREDICT DEF:fail=$rrd:200:FAILURES TICK:fail#ffffa0:1.0:"Failures Average" CDEF:scale200=doscents,8,* CDEF:upper=pred,dev,2,*,+ CDEF:lower=pred,dev,2,*,- CDEF:scaledupper=upper,8,* CDEF:scaledlower=lower,8,* LINE1:scale200#0000ff:"Average" LINE1:scaledupper#ff0000:"Upper Bound Average" LINE1:scaledlower#ff0000:"Lower Bound Average"`;
这是图像 RRDTOOL IMAGE
我得到一个类似的图表,但是正如您所看到的,有黄线表明存在错误,但事实并非如此,我的意思是,该点的活动线稍微偏离红色区域,但它不是错误,我基本上需要了解我必须设置的值,并基于什么,我尝试了一下,但我不太了解系统。
rrdtool专家有什么建议吗?
预先非常感谢
I mainly write because I'm using the rrdtool holt-winters feature, but sadly it does not work as I would, starting I'll write for you the rrd file command line creation:
`/usr/bin/rrdtool create /home/spread/httphw/rrd/httpr.rrd --start $_[7]-60 --step 60 DS:200:GAUGE:120:U:U RRA:AVERAGE:0.5:1:1440 RRA:HWPREDICT:1440:0.1:0.0035:288 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797`;
After that I basically insert data and then I draw the graph like that:
`/usr/bin/rrdtool graph file.png --start $start --end $time --width 600 --height 200 --imgformat PNG DEF:doscents=$rrd:200:AVERAGE DEF:pred=$rrd:200:HWPREDICT DEF:dev=$rrd:200:DEVPREDICT DEF:fail=$rrd:200:FAILURES TICK:fail#ffffa0:1.0:"Failures Average" CDEF:scale200=doscents,8,* CDEF:upper=pred,dev,2,*,+ CDEF:lower=pred,dev,2,*,- CDEF:scaledupper=upper,8,* CDEF:scaledlower=lower,8,* LINE1:scale200#0000ff:"Average" LINE1:scaledupper#ff0000:"Upper Bound Average" LINE1:scaledlower#ff0000:"Lower Bound Average"`;
Here's the image RRDTOOL IMAGE
The I get a graph like that, but as you can see there's yellow lines that indicates that there has been an error when that's not true, I mean, the activity line at that point is slightly out from the red area but it does not an error, I basically need to understand the values I gotta set up and based on what, I tried it out but I don't really understand the system really well.
Any sugestion from an rrdtool expert?
Many thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就 Holt-Winters 而言,超出预期范围是一个错误。
Being outside the expected range is an error, as far as Holt-Winters is concerned.
Holt-Winters FAILURES RRA 比“超出范围
HWPREDICT+-2*DEVPREDICT
”稍微复杂一些。事实上,还有额外的threshold
和window
参数,它们(如果未指定,如您的情况)分别默认为 7 和 9。这些会导致在比较之前对
window
样本进行平滑处理,并且仅当存在一系列threshold
连续错误时才触发FAILURE标志。因此,您会在您执行的位置看到 FAILURE 触发器,而不是在左侧较大的区域(在范围内平均向下)。这可以更好地反映我们的范围行为,而不是稍微过早的斜率或暂时的峰值。
如果您想避免这种情况,并且每次数据超出预测范围时都有一个 FAILURE 标志,则将 FAILURE 参数设置为 1 和 1。为此,您需要显式定义额外的 HW RRA,而不是让它们像您现在一样隐式定义。
另外,使用纯数字名称的 DS 是一种不好的做法。它可能会导致 RPN 计算混乱。 DS 名称始终以小写字母开头。
The Holt-Winters FAILURES RRA is a slightly more complex than just 'outside the range
HWPREDICT+-2*DEVPREDICT
'. In fact, there are the additionalthreshold
andwindow
parameters, which (if not specified, as in your case) default to 7 and 9 respectively.These cause a smoothing of the samples over
window
samples before comparison, and only trigger a FAILURE flag when there is a sequence ofthreshold
consecutive errors.As a result, you see a FAILURE trigger where you do, and not in the larger area to the left (which averages down within the range). This results in a better indicator of consistently our of range behaviour, rather than a slope slightly too early or a temporary spike.
If you want to avoid this, and have a FAILURE flag every time the data goes outside of the predicted bounds, then set the FAILURE parameters to 1 and 1. To do this, you would need to explicitly define the additional HW RRAs rather than having them defined implicitly as you do now.
On a separate note, is is bad practice to have a DS with a purely numerical name. It can cause confusion in the RPN calculations. Always have a DS name start with a lowercase letter.