[rrd-users] Bar graph by hour, day, month
linux at thehobsons.co.uk
Mon Sep 29 11:48:28 CEST 2014
Bruno Suarez <bsuarez at free.fr> wrote:
Some clarification is needed, it could be that you are using terms that mean one thing to you and something else to us.
> I want to make graphs of water consumption.
> I have a counter that is incremented for every liter of water consumed,
> this counter will be stored in the database and reset every minute.
Can you clarify that.
I take you mean you'll be reading the counter and updating the RRD file every minute, but does the act of reading the counter reset it to zero or not ?
> In the end I would make graphs (bar) to view the water consumption for
> each period (eg 5 min, 1 hour, 1 day, 1 month ...)
Do you want the bars to match specific time periods - eg have a bar that covers 1st Sept to 30th Sept and so on ?
5 minutes is fairly easy - if your RRD consolidates data to a minimum resolution of 5 minutes then that's what you'll get. But once you get up to days and weeks it gets harder - depending on what you want.
Showing a graph of "the last 7 days" or "the last 31 days" is easy. Doing it for "the last calendar week" (Sun -Sat or Mon-Sun) or "last calendar month" (1st to 28th/30th/31st) is somewhat harder.
More information about the rrd-users