[rrd-users] Plotting yesterdays value
Nicholas Piper
nick at nickpiper.co.uk
Wed Nov 26 16:58:44 MET 2003
Hi Everyone,
I have a few graphs, each one is to effectively keep one value per
day.
It's been a while since I did this, and I never did have it all quite
straight in my mind; so I'm sorry if I don't make as much sense as I
might.
To take one example: There is a graph that shows how many of our
clients computers crashed per day.
We only find out how many crashed after that day ends. When the
automatic reports come in from clients, we collect them up and detail
the information in a MySQL database. At 8am I assume we've had as many
reports for yesterday as we are going to get, and I use a python
script to fetch the count from MySQL and submit it to rrdtool with a
timestamp of 11pm, the day before.
I used this command to create the rrd archive:
rrdtool create crashes.rrd -b 955490400 -s 86400 \
DS:Crashes:GAUGE:86400:NaN:NaN \
DS:EvtLogCrashes:GAUGE:86400:NaN:NaN \
DS:EvtLogOK:GAUGE:86400:NaN:NaN \
\
RRA:AVERAGE:0.9:1:100 \
RRA:AVERAGE:0.5:7:52 \
RRA:AVERAGE:0.5:28:100
I used 86400 in a few places, so that I get just one value per day.
955490400 is 2000-04-11 at 11pm. I used 11pm there, to try and get
rrdtool to expect new data points every day (due to 86400) at 11pm.
The data kept though, seems to be interpolated by rrdtool to be at
midnight: (this is the end of the first block of values given by
rrdtool dump)
<!-- 2003-11-22 00:00:00 GMT / 1069459200 --> <row><v> 3.3708333333e+01 </v><v> 1.5666666667e+01 </v><v> 3.0450000000e+02 </v></row>
<!-- 2003-11-23 00:00:00 GMT / 1069545600 --> <row><v> 2.6708333333e+01 </v><v> 7.9166666667e+00 </v><v> 3.1600000000e+02 </v></row>
<!-- 2003-11-24 00:00:00 GMT / 1069632000 --> <row><v> 2.0208333333e+01 </v><v> 6.1250000000e+00 </v><v> 3.1591666667e+02 </v></row>
<!-- 2003-11-25 00:00:00 GMT / 1069718400 --> <row><v> 2.5875000000e+01 </v><v> 9.1250000000e+00 </v><v> 3.1391666667e+02 </v></row>
That means the values are not quite what I told rrdtool they were. If
I don't do my events at 11pm, and do them at midnight, they are for
the wrong day.
Because they are kept in the rrd as 00:00:00 GMT, it's not so easy to
read. The values <v> 2.5875000000e+01 </v><v> 9.1250000000e+00 </v><v>
3.1391666667e+02 </v> where for the 24th, NOT the 25th as this dump
might indicate.
This particular rrd has had some data added which does not show up in
the dump yet:
At 2003-11-25 23:00:00.00: rrdtool update crashes.rrd -t EvtLogOK:EvtLogCrashes:Crashes 1069801200.0:312:12:46
Why doesn't that show up in the dump, OR the graphs? It will show up
tomorrow, once it's not the most recent data added. This is meaning
that my plots never show the most up to date data (yesterdays), only
the day /before/ yesterday.
I'll try explain further and more coherently if required! I'm hoping
there is something fundamental I don't understand that I can learn and
then fix my problem. For example, why does rrdtool insist on keeping
data points at midnight, rather than 11pm?
Nick
--
Part 4 MEng Cybernetics; Reading, UK http://www.nickpiper.co.uk/
GPG Encrypted mail welcome! 1024D/3ED8B27F
Choose life. Be Vegan :-) Please reduce needless cruelty + suffering !
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list