Hi, I'm trying to smooth a graph, averaging each point with the 4 previous points.
I'm doing this at command line, and it's working as I intended
rdtool graph ./test.png -a PNG \
DEF:data=localhost_sondadnsms_30.rrd:sondaDNSms:AVERAGE \
"CDEF:prev1=PREV(data)" \
"CDEF:prev2=PREV(prev1)" \
"CDEF:prev3=PREV(prev2)" \
"CDEF:prev4=PREV(prev3)" \
"CDEF:data2=data,prev1,prev2,prev3,prev4,+,+,+,+,5,/,1000,+" \
LINE1:datos#00a000:"Origin" \
LINE1:datos2#FF0000:"Averaged"
As you see, I use 4 CDEFS, to get the 4 previous points, (I added 1000 to the second line to be able to compare easily both lines looking at the graph).
Anyone knows how to make several CDEFS in 1 graph at cacti?, or maybe is possible to make the same with only 1 CDEF expresssion?
Thx for any help.
Multiple CDEFs line
Moderators: Developers, Moderators
Who is online
Users browsing this forum: No registered users and 0 guests