Trying to graph with two different resolutions in same graph doesn't work.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trying to graph with two different resolutions in same graph doesn't work.

mmclure
I'm trying to graph the same data in two different resolutions on the same graph, and it's not working as expected. I have the following RRD:

rrdtool create /var/lib/weather/weather.rrd \
        --start now-25200 \
        --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

and I'm trying to display the temperature for the week, showing the actual temperature plus the daily maximum, minimum and average. The maximum and minimum work fine, but the average doesn't.

Here's the chart definition:

rrdtool graph ${PNGDIR}/temp1w.png \
        --title="1 Week Temperature" \
        --upper-limit=120 --lower-limit=40 \
        --end ${ENDTIME} --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 \
        DEF:temperatureavg=${RRD}:temperature:AVERAGE:step=86400 \
        LINE:temperature#0000FF:"Temperature" \
        LINE:temperaturemax#FF0000:"Max Temperature" \
        LINE:temperaturemin#00FF00:"Min Temperature" \
        LINE:temperatureavg#000000:"Avg Temperature"

The black line ("temperatureavg") displays the instantaneous temperature ("temperature") instead of the daily average - i.e. it exactly overlays the blue line for "temperature". If, however, I delete the DEF and LINE for "temperature" then the "temperatureavg" black line correctly displays the daily average.

I tried to model the chart after the first example on the "rrdgraph_examples" documentation page which shows the same data at different resolutions.

This is rrdtool 1.5.5 on Gentoo Linux. I'm sure I'm missing something simple. Any ideas as to what?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trying to graph with two different resolutions in same graph doesn't work.

thlu
I am having the same issue trying to plot the same datasource in different resolutions in the same graph.

If I eg. have
'DEF:p1=data.rrd:power:AVERAGE:step=3600'
'DEF:p2=data.rrd:power:AVERAGE:step=300'

p1 and p2 will both be plot using step=300. It seems that it is always the smaller step value that is used in both plots. If i take a copy of data.rrd and use the two different, but identical, files in the DEFs I get the expected result.

Is it possible to do and what am i missing?

I see no answers to this post. mmclure: did you find any answers yourself?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trying to graph with two different resolutions in same graph doesn't work.

mmclure
I haven't seen any other replies to my original post. Since this is not a mission-critical application (just tracking information from my rooftop weather station) I didn't push on it.

On Wed, Jan 25, 2017 at 2:51 AM, thlu [via RRD Mailinglists] <[hidden email]> wrote:
I am having the same issue trying to plot the same datasource in different resolutions in the same graph.

If I eg. have
'DEF:p1=data.rrd:power:AVERAGE:step=3600'
'DEF:p2=data.rrd:power:AVERAGE:step=300'

p1 and p2 will both be plot using step=300. It seems that it is always the smaller step value that is used in both plots. If i take a copy of data.rrd and use the two different, but identical, files in the DEFs I get the expected result.

Is it possible to do and what am i missing?

I see no answers to this post. mmclure: did you find any answers yourself?




To unsubscribe from Trying to graph with two different resolutions in same graph doesn't work., click here.
NAML



--
Manuel A. McLure WW1FA <[hidden email]> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.                       -- H.P. Lovecraft
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trying to graph with two different resolutions in same graph doesn't work.

unicsonline
Hello Manuel,

I have found same problem on my side.

I fact for me it seems that the first step value declarated for first DEF is used for ALL other DEF declaration present in request (if no 'step=<value>' is present, graph will use '--step <value>' or, if missing, database step)

For me it's a very problematic problem...

(found in 1.54, 1.55 and 1.60 on Linux RedHat)




2017-01-25 19:27 GMT+01:00 mmclure <[hidden email]>:
I haven't seen any other replies to my original post. Since this is not a
mission-critical application (just tracking information from my rooftop
weather station) I didn't push on it.

On Wed, Jan 25, 2017 at 2:51 AM, thlu [via RRD Mailinglists] <
[hidden email]> wrote:

> I am having the same issue trying to plot the same datasource in different
> resolutions in the same graph.
>
> If I eg. have
> 'DEF:p1=data.rrd:power:AVERAGE:step=3600'
> 'DEF:p2=data.rrd:power:AVERAGE:step=300'
>
> p1 and p2 will both be plot using step=300. It seems that it is always the
> smaller step value that is used in both plots. If i take a copy of data.rrd
> and use the two different, but identical, files in the DEFs I get the
> expected result.
>
> Is it possible to do and what am i missing?
>
> I see no answers to this post. mmclure: did you find any answers yourself?
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://rrd-mailinglists.937164.n2.nabble.com/Trying-
> to-graph-with-two-different-resolutions-in-same-graph-doesn-t-work-
> tp7583390p7583500.html
> To unsubscribe from Trying to graph with two different resolutions in same
> graph doesn't work., click here
> <http://rrd-mailinglists.937164.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7583390&code=bWFudWVsQG1jbHVyZS5vcmd8NzU4MzM5MHwtMjkzMTQ1NTQ2>
> .
> NAML
> <http://rrd-mailinglists.937164.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Manuel A. McLure WW1FA <[hidden email]> <http://www.mclure.org>
...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/Trying-to-graph-with-two-different-resolutions-in-same-graph-doesn-t-work-tp7583390p7583501.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Loading...