[collectd] rrdtool plugin: no LAST?
Bruno Prémont
bonbons at linux-vserver.org
Sat Jul 28 11:02:38 CEST 2012
Marc,
On Fri, 27 July 2012 Mark <gajillion at gmail.com> wrote:
> Bruno,
> I'm fairly certain it's one of the four native aggregate functions used
> when creating an RRA. From the 'rrdcreate' man page:
>
> "The data is also processed with the consolidation function (CF) of the
> archive. There are several consolidation functions that consolidate primary
> data points via an aggregate function: AVERAGE, MIN, MAX, LAST."
>
> The way I understand it, LAST is basically the last data point with no
> manipulation. It's not necessarily useful for graphing because it's rather
> spiky, but it's a good value for labels.
Well, for labels RRDtool is able to obtain a value equivalent to LAST.
Sample cmdline to render load graph with collectd RRDs:
/usr/bin/rrdtool graph - -a SVG --full-size-mode -s 'end-2h' -e '1343465308' \
-w '1230' -h '431' \
'-t' 'localhost/load/load' \
'-n' 'DEFAULT:0:Bitstream Vera Sans' \
'-v' 'System load' \
'DEF:s_avg=/var/lib/collectd/localhost/load/load.rrd:shortterm:AVERAGE' \
'DEF:s_min=/var/lib/collectd/localhost/load/load.rrd:shortterm:MIN' \
'DEF:s_max=/var/lib/collectd/localhost/load/load.rrd:shortterm:MAX' \
'DEF:m_avg=/var/lib/collectd/localhost/load/load.rrd:midterm:AVERAGE' \
'DEF:m_min=/var/lib/collectd/localhost/load/load.rrd:midterm:MIN' \
'DEF:m_max=/var/lib/collectd/localhost/load/load.rrd:midterm:MAX' \
'DEF:l_avg=/var/lib/collectd/localhost/load/load.rrd:longterm:AVERAGE' \
'DEF:l_min=/var/lib/collectd/localhost/load/load.rrd:longterm:MIN' \
'DEF:l_max=/var/lib/collectd/localhost/load/load.rrd:longterm:MAX' \
'AREA:s_max#B7EFB7' \
'AREA:s_min#FFFFFF' \
'LINE1:s_avg#00E000: 1m average' \
'GPRINT:s_min:MIN:%4.2lf Min,' \
'GPRINT:s_avg:AVERAGE:%4.2lf Avg,' \
'GPRINT:s_max:MAX:%4.2lf Max,' \
'GPRINT:s_avg:LAST:%4.2lf Last\n' \
'LINE1:m_avg#0000FF: 5m average' \
'GPRINT:m_min:MIN:%4.2lf Min,' \
'GPRINT:m_avg:AVERAGE:%4.2lf Avg,' \
'GPRINT:m_max:MAX:%4.2lf Max,' \
'GPRINT:m_avg:LAST:%4.2lf Last\n' \
'LINE1:l_avg#FF0000:15m average' \
'GPRINT:l_min:MIN:%4.2lf Min,' \
'GPRINT:l_avg:AVERAGE:%4.2lf Avg,' \
'GPRINT:l_max:MAX:%4.2lf Max,' \
'GPRINT:l_avg:LAST:%4.2lf Last\n'
The RRD has following RRAs:
rra[0] { cf="AVERAGE", rows=2400, pdp_per_row=1 }
rra[1] { cf="MIN", rows=2400, pdp_per_row=1 }
rra[2] { cf="MAX", rows=2400, pdp_per_row=1 }
rra[3] { cf="AVERAGE", rows=2469, pdp_per_row=14 }
rra[4] { cf="MIN", rows=2469, pdp_per_row=14 }
rra[5] { cf="MAX", rows=2469, pdp_per_row=14 }
rra[6] { cf="AVERAGE", rows=2420, pdp_per_row=100 }
rra[7] { cf="MIN", rows=2420, pdp_per_row=100 }
rra[8] { cf="MAX", rows=2420, pdp_per_row=100 }
rra[9] { cf="AVERAGE", rows=2403, pdp_per_row=446 }
rra[10]{ cf="MIN", rows=2403, pdp_per_row=446 }
rra[11]{ cf="MAX", rows=2403, pdp_per_row=446 }
rra[12]{ cf="AVERAGE", rows=2401, pdp_per_row=5270 }
rra[13]{ cf="MIN", rows=2401, pdp_per_row=5270 }
rra[14]{ cf="MAX", rows=2401, pdp_per_row=5270 }
So no LAST RRA in the RRD file itself, though graphing code can still
fetch a LAST value (not sure how LAST is determined base on the graphing
time-span though).
Bruno
> Mark
>
>
> On Fri, Jul 27, 2012 at 3:18 PM, Bruno Prémont <bonbons at linux-vserver.org>wrote:
>
> > Hi Marc,
> >
> > On Fri, 27 July 2012 Mark <gajillion at gmail.com> wrote:
> > > Hi all,
> > > We're trying to use collectd to front-end Cacti and I've just discovered
> > > that the RRDTool Plugin does MAX, MIN, AVERAGE, but doesn't store LAST.
> > > Most of our Cacti graphs use LAST to display the current value. Am I
> > > missing something obvious or is LAST just not supported?
> >
> > Isn't LAST just a special access to RRD's RRAs, as in always present?
More information about the collectd
mailing list