----- Original Message -----
From: <[email protected]>
To: "Simon Hobson" <[email protected]>
Cc: <[email protected]>
Sent: Monday, September 29, 2014 4:07 PM
Subject: Re: [rrd-users] Bar graph by hour, day, month
Hi,
My water meter delivers one pulse per liter consumed. I have a script that
counts the pulses (raspberry and piface).
Periodically I want to store in the RRD database the number of pulses.
The first solution is to periodically store the number of impusions since
the last backup.
The second solution is to periodically store the total impusions since the
start of counting
There may be another solution:
Don't store and count. Just feed to RRDtool as soon as a pulse comes in.
Your counter type would still be ABSOLUTE, you would feed number 1 (1
liter). No need to remember anything, except that it would be wise to create
an idle timer. If no pulses are generated for 24 hours (or any other
suitable number), then feed number 0 to RRDtool and reset the idle timer.
(and, of course, don't forget to set the timeout value in your database to
an appropriate value, larger than 24 hours or the number you chose).
For graphs, displaying data on last 5 minutes, last hour, last day, last
month should be enough.
What Simon tried to explain to you, is that "last month" is tricky. You
probably expect to get columns for each day. If you are aware how RRDtool
works (by design) and if you do not mind seeing days which start at midnight
UTC, then no problem.
_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users