[rrd-users] Bar graph by hour, day, month
Alex van den Bogaerdt
alex at vandenbogaerdt.nl
Mon Sep 29 09:21:24 CEST 2014
> I want to make graphs of water consumption.
This is possible.
> 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.
Which means you should use the ABSOLUTE counter type.
You will end up with a rate, liters per second. This is a good thing, don't
try to change it.
> 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 ...)
I don't think RRDtool can do this, at least not out of the box. You can come
pretty close though. Carefully plan your RRAs, so that each row contains the
amount of time you will want to view. At graph time, design your graph so
that it displays a known amount of time and a known RRA, use a CDEF to
multiply the rate (which is in liters per second) by the amount of seconds
each row displays. You should end up with the amount of liters in each row.
Start experimenting. Make sure you know what you put into RRDtool (e.g. keep
track of the data, in a logfile outside RRDtool) and come back with some
example graphs if it doesn't work like you want it to.
If you are new to RRDtool, work your way though the tutorials first, so that
you don't have to ask questions which are already answered a million times.
HTH
Alex
More information about the rrd-users
mailing list