[rrd-users] If input is already in text format and I craft a perl script to parse the text format and update rrd database, what should the step and heartbeat be?

Simon Hobson linux at thehobsons.co.uk
Tue Jun 10 18:12:47 CEST 2014


Steven Sim <unixandme at outlook.com> wrote:

> What if a single data file has data metrics for a single day ... I can easily generate the RRD and Graphs based on this single file single day. (much thanks to Steve Shipway valuable pointers)
> 
> But at the end of the month, my management would want to review the trend for the ENTIRE month.
> 
> What would be an elegant practice for the above?
> 
> to accumulate data from each day onto a single RRD file?

It's "tricky" as RRD has no concept of "day" or "month" - only multiples of step (and the consolidated multiples of it) since unix epoch. If you need reporting of numbers by calendar month then you are probably best consolidating by days, and then run multiple queries to get the data you need for each month. Ie, to get the data for January, you run a query with a start time of 00:00 1st Jan and an end time of 00:00 1st Feb. Running these queries, and presenting the results, would be done outside of RRD.

However, if you are not in the UTC timezone (or close enough that the difference doesn't matter), then you'll have to keep hourly data as |days" will naturally end up starting/ending at 00:00 UTC meaning that your data will be out by however many hours your local timezone is from UTC. If you were (say) 4 hours offset from UTC, then your local day would contain 4 hours from one day, and 20 hours from the adjacent day, when working (as RRD does) in UTC.



More information about the rrd-users mailing list