Re: [SPAM] Re: How to create a new Data Type and Consolidation Function?
Dan Cech <[email protected]>
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <[email protected]> |
On 4/12/2011 3:06 PM, Long V wrote: > Example: assume resolution 1 we keep 4 PDP. Resolution 2 we keep 4 CDP. Then if > our zoom time range is time 5 to 8 then it'll trigger res_1 so we have to > multiply by 60. If our zoom time range is time 1 to 8 then it'll trigger res_2 > and we have to know it's res_2 so we have to multiply by 120 instead of 60. I haven't tried it myself but I suspect you could do this using TIME: DEF:res=rrdfile.rrd:res:AVERAGE CDEF:ts=res,POP,TIME CDEF:res_mult=res,POP,ts,PREV(ts),- CDEF:res_delta=res,res_mult,* The "res,POP" construct above is just to get around the requirement that a CDEF reference at least one DEF. Would that get the job done? Dan