[rrd-users] How to create charts for every month

Matt Chung itsmemattchung at gmail.com
Mon May 24 15:29:48 CEST 2010


Hey Vinod,
Provided that your archives have the historical data, this is definitely
possible.

One way to do this is to setup your data definitions with the correct time
frame and then set the --start and --end parameters for your graph.

Step 1: Setting up the data definitions
#(Keep in mind, "myrrd.rrd" and "latency" below are arbitrary values)

#Data for last month
DEF:1_month_ago=myrrd.rrd:latency:AVERAGE:end=MIDNIGHT:start=end-1month

#Data for 2 months ago
DEF:2_months_ago=myrrd.rrd:latency:AVERAGE:end=MIDNIGHT-1month:start=end-1month

#Data for 3 months ago
DEF:3_months_ago=myrrd.rrd:latency:AVERAGE:end=MIDNIGHT-2month:start=end-1month

If you intend to only plot one month per graph, you can just set your
--start and --end parameters accordingly as you were doing before.  If you
would like to transpose several months on to the same graph (for example,
the last 3 months) you can then use the shift function to set the Data
definitions in the correct time frame.  The link from Alex's website
provides a great example on how to do this:
http://www.vandenbogaerdt.nl/rrdtool/shift.php

I hope this helps.



On Mon, May 24, 2010 at 2:49 AM, Vinod Sharma <vk.kaushik2006 at gmail.com>wrote:

> Hi,
>
> I have a .rrd which has data since last year. i.e. June 09. Now I want to
> create charts for every month i.e. chart for June 09, July 09, till April
> 10. Is there any way I can select the months data to create charts. Till now
> I am trying to select the data based on the days. i.e.
>
> --start=midnight-7d
> --end=start+1d
>
> The above gives me the data for 7day ago, is there any way i can get data
> like Jan, Feb etc.
>
> Thanks,
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20100524/02f33359/attachment.htm 


More information about the rrd-users mailing list