Re: [rrd-users] Changing the start and end times for daily (step=86400) consolidation?

2016-06-27 Thread mmclure
On Mon, Jun 27, 2016 at 9:33 PM, Alex van den Bogaerdt-5 [via RRD
Mailinglists]  wrote:

>
> The problem with that: ... 05:57 05:58 05:59 05:00 05:01 05:02 ...
> When DST ends, one hour is repeated. Similarly one hour is missing when
> DST kicks in.
> You can't change timezone halfway a graph, so this will bite you two days
> in a year.
>
> Don't know, didn't test this, just as an idea:
> Would it work to create an artificial timezone which is similar to
> the British timezone, but DST happening at 5am on the American days?
>

Yeah - the charts for around 2:00AM on the DST switch dates would be wrong,
but  I can live with that. These are "live" charts on a webpage so they'll
get replaced pretty quickly anyway and are not in any way mission critical.

-- 
Manuel A. McLure WW1FA  
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.   -- H.P. Lovecraft




--
View this message in context: 
http://rrd-mailinglists.937164.n2.nabble.com/Changing-the-start-and-end-times-for-daily-step-86400-consolidation-tp7583379p7583383.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] Changing the start and end times for daily (step=86400) consolidation?

2016-06-27 Thread Alex van den Bogaerdt
>> AFAIK it's a known issue with no easy solution. I think the only
>> workarounds have involved > fiddling with the timezone to fudge things.
>
> Oh, bother. I was hoping that my use case was common enough that there was
> an option I was just missing.
>
> So it looks like I have to set TZ=UTC and munge the timestamps on insert
> so
> that when I insert at (say) 5:00PM PDT I'm actually inserting 5:00PM UTC.
> Handling Daylight Saving will be a pain, though - I'll have to switch
> between UTC and UTC+1 (or UTC-1) when generating charts depending on the
> day
> of the year.

The problem with that: ... 05:57 05:58 05:59 05:00 05:01 05:02 ...
When DST ends, one hour is repeated. Similarly one hour is missing when
DST kicks in.
You can't change timezone halfway a graph, so this will bite you two days
in a year.

Don't know, didn't test this, just as an idea:
Would it work to create an artificial timezone which is similar to
the British timezone, but DST happening at 5am on the American days?

alex


___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] Changing the start and end times for daily (step=86400) consolidation?

2016-06-27 Thread mmclure
Simon Hobson wrote:

> AFAIK it's a known issue with no easy solution. I think the only
> workarounds have involved > fiddling with the timezone to fudge things.

Oh, bother. I was hoping that my use case was common enough that there was
an option I was just missing.

So it looks like I have to set TZ=UTC and munge the timestamps on insert so
that when I insert at (say) 5:00PM PDT I'm actually inserting 5:00PM UTC.
Handling Daylight Saving will be a pain, though - I'll have to switch
between UTC and UTC+1 (or UTC-1) when generating charts depending on the day
of the year.

Thanks for the confirmation - it'll keep me from going nuts trying to find
an option I'm missing.



--
View this message in context: 
http://rrd-mailinglists.937164.n2.nabble.com/Changing-the-start-and-end-times-for-daily-step-86400-consolidation-tp7583379p7583381.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] Changing the start and end times for daily (step=86400) consolidation?

2016-06-27 Thread Simon Hobson
mmclure  wrote:

> Is there any way to specify that daily consolidation should occur between
> times that are not midnight UTC?

AFAIK it's a known issue with no easy solution. I think the only workarounds 
have involved fiddling with the timezone to fudge things.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


[rrd-users] Changing the start and end times for daily (step=86400) consolidation?

2016-06-27 Thread mmclure
Is there any way to specify that daily consolidation should occur between
times that are not midnight UTC?

I have the following rrd definition:

rrdtool create /var/lib/weather/weather.rrd \
--start 1466838000 \
--step 300 \
DS:temperature:GAUGE:1200:-40:158 \
DS:humidity:GAUGE:1200:0:100 \
DS:windspeed:GAUGE:1200:0:128 \
DS:rain:DERIVE:1200:0:U \
RRA:AVERAGE:0.5:1:2880 \
RRA:AVERAGE:0.5:12:700 \
RRA:AVERAGE:0.5:288:2000 \
RRA:MAX:0.5:1:2880 \
RRA:MAX:0.5:12:700 \
RRA:MAX:0.5:288:2000 \
RRA:MIN:0.5:1:2880 \
RRA:MIN:0.5:12:700 \
RRA:MIN:0.5:288:2000

The 1466838000 used as the start time corresponds to June 26, 2016 00:00:00
Pacific Daylight Time since I thought that the consolidation interval might
be dependent on the start time of the RRD.

I have a chart where I want to display the temperature for the week, as well
as the high and low for each day:

rrdtool graph ${PNGDIR}/temp1w.png \
--title="1 Week Temperature" \
--upper-limit=120 --lower-limit=0 \
--end now --start end-1w --width 600 --height 200 \
DEF:temperature=${RRD}:temperature:AVERAGE \
DEF:temperaturemax=${RRD}:temperature:MAX:step=86400 \
DEF:temperaturemin=${RRD}:temperature:MIN:step=86400 \
LINE:temperature#FF:"Temperature" \
LINE:temperaturemax#FF:"Max Temperature" \
LINE:temperaturemin#00FF00:"Min Temperature"

The problem is that the Max Temperature and Min Temperature lines go from
5:00PM to 5:00PM PDT (midnight to midnight UTC) instead of from midnight to
midnight PDT. I'd like to be able to set an offset for the consolidation so
that it consolidates from, say 7:00AM to 7:00AM UTC (midnight to midnight
PDT, 11:00PM to 11:00PM PST).

I understand that I can't just request "consolidate in local time" since
Daylight Saving would cause a discontinuity twice a year, but a fixed offset
would be good enough. As it is now, the day's high can occur after 5:00PM
and get pushed into the next day's consolidation.

Anything I'm missing as far as configuration options that might provide the
functionality I'm looking for?

Thanks!




--
View this message in context: 
http://rrd-mailinglists.937164.n2.nabble.com/Changing-the-start-and-end-times-for-daily-step-86400-consolidation-tp7583379.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users