Using rrd4j is it possible to configure MIN & MAX RRA's over a day in my timezone?

39 Views Asked by At

I would like to configure archives that use the MIN & MAX functions over the period of a day ( 24 hour period ), but I want that day to match my local timezone.

I've been reading the rrd4j and rrdtool documentation it appears that everything gets "normalized" to UTC days, hours, minutes, etc.

This would appear to be even more complicated because I'm in a timezone, EST/EDT, that honors daylight saving time.

Is it possible to do this? Or would I have to MIN/MAX over hours and then manually compute the MIN/MAX for a day myself?

1

There are 1 best solutions below

0
On BEST ANSWER

The short answer is no; the RRA windows are always aligned with UCT. This is even more of an issue out here in New Zealand!

The longer answer is no, but there are ways around it.

To approximate it, lets assume you have a timezone difference of 8h. In this case, set an RRA window of 8h and you'll get 3 of them in the day based against UCT. You can then amalgamate these when you generate the graph by explicitly stating the RRA, display granularity, and CF to use when you generate and display the graph, as well as CDEF to ensure the correct time windows for consolodation.

The drawbacks of this method are (1) it wont take into account daylight savings time, and (2) it means a rather complex set of DEF statements in your rrdgraph call. Also (3) if your timezone offset is small or not a divisor of 24 then you'll need to fudge by using a 1h window, which means more CPU at graph-generation time. Probably not worth it.