Multiple CDEFs line

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
mperez
Posts: 2
Joined: Mon Jan 31, 2005 7:48 am

Multiple CDEFs line

Post by mperez »

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.
mperez
Posts: 2
Joined: Mon Jan 31, 2005 7:48 am

Post by mperez »

Btw, if you make inside cacti a CDEF definitions which points to itself, it sends the database into a weird state, that can't display any CDEF at all.
:wink:
JMoMo
Cacti User
Posts: 60
Joined: Mon Nov 08, 2004 12:11 am

Post by JMoMo »

This sounds like a bug -- if you think so, you should really bug this in the Cacti bug database. See the main cacti.net page for the bug page.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests