Open gwuillou opened 6 years ago
@gwuillou when zoomed-in are the results correct ? When zoomed out are able to see A,B,C ( without applying A+B+C Query) ?
Here different zooms. There is not always the problem apparently!
can you send a screenshot of your panel as well ( dashboard config )
I think the problem is because metaqueries does not assume null as 0. So for the sections where 1 of the (a,b or c ) value is null then the resultant D is null. You can probably try (((a)? a :0) + ((b)? b :0) + ((c)? c :0))
Hello, I have tried your proposition without success: (((A['siesa'])?A['siesa']:0)+((C['djeva'])?C['djeva']:0)+((B['sinergy'])?B['sinergy']:0)) I don’t know if you are other idea?
Thank for your help,
Gaëtan
Le 5 juil. 2018 à 13:19, Gaurav M Shah notifications@github.com a écrit :
I think the problem is because metaqueries does not assume null as 0. So for the sections where 1 of the (a,b or c ) value is null then the resultant D is null. You can probably try (((a)? a :0) + ((b)? b :0) + ((c)? c :0))
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoshPosh/grafana-meta-queries/issues/29#issuecomment-402690471, or mute the thread https://github.com/notifications/unsubscribe-auth/ATtI571lm1vUwgNc5ricvgPOMDFG2B09ks5uDfYtgaJpZM4VDYl2.
I am not sure, I am unable to reproduce the error on my end. Looks to me that one of the datapoint is throwing the graph off. Can you try plotting a table instead and look at the odd data point ?
When I am exporting the csv:
Conso_FMV;2018-07-05T21:00:00+02:00;30.117048 Conso_FMV;2018-07-05T21:15:00+02:00;29.324952 Conso_FMV;2018-07-05T21:30:00+02:00;29.627704 Conso_FMV;2018-07-05T21:45:00+02:00;29.00208 Conso_FMV;2018-07-05T22:00:00+02:00;29.310443999999997 Conso_FMV;2018-07-05T22:15:00+02:00;29.481824 Conso_FMV;2018-07-05T22:30:00+02:00;28.184124 Conso_FMV;2018-07-05T22:45:00+02:00;28.682604 Conso_FMV;2018-07-05T23:00:00+02:00;28.003059999999998 Conso_FMV;2018-07-05T23:15:00+02:00;26.963816 Conso_FMV;2018-07-05T23:30:00+02:00;26.033584000000005 Conso_FMV;2018-07-05T23:45:00+02:00;26.090695999999998 Conso_FMV;2018-07-06T00:00:00+02:00;24.468472 Conso_FMV;2018-06-25T02:00:00+02:00;0 Conso_FMV;2018-07-06T00:15:00+02:00;0 Conso_FMV;2018-07-06T00:30:00+02:00;0 Conso_FMV;2018-07-06T00:45:00+02:00;0 Conso_FMV;2018-07-06T01:00:00+02:00;0 Conso_FMV;2018-07-06T01:15:00+02:00;0 Conso_FMV;2018-07-06T01:30:00+02:00;0 Conso_FMV;2018-07-06T01:45:00+02:00;0 Conso_FMV;2018-07-06T02:00:00+02:00;0 Conso_FMV;2018-07-06T02:15:00+02:00;0 Conso_FMV;2018-07-06T02:30:00+02:00;0
Le 9 juil. 2018 à 11:28, Gaurav M Shah notifications@github.com a écrit :
I am not sure, I am unable to reproduce the error on my end. Looks to me that one of the datapoint is throwing the graph off. Can you try plotting a table instead and look at the odd data point ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoshPosh/grafana-meta-queries/issues/29#issuecomment-403418030, or mute the thread https://github.com/notifications/unsubscribe-auth/ATtI55md7cMzroWNSsLp9b6K2khbG3oBks5uEyJSgaJpZM4VDYl2.
can you give a try to (((A['siesa'])?Math.round(A['siesa']*100)/100:0)+((C['djeva'])?Math.round(C['djeva']*100)/100:0)+((B['sinergy'])?Math.round(B['sinergy']*100)/100:0))
Always the same problem!
Le 9 juil. 2018 à 11:39, Gaurav M Shah notifications@github.com a écrit :
can you give a try to (((A['siesa'])?Math.round(A['siesa']100)/100:0)+((C['djeva'])?Math.round(C['djeva']100)/100:0)+((B['sinergy'])?Math.round(B['sinergy']*100)/100:0))
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoshPosh/grafana-meta-queries/issues/29#issuecomment-403420994, or mute the thread https://github.com/notifications/unsubscribe-auth/ATtI5_BBN9cnzWG1VrMl6AaNC_xQLdmJks5uEyTigaJpZM4VDYl2.
its hard to debug without that dataset
Perhaps it can help you:
Le 9 juil. 2018 à 11:44, Gaurav M Shah notifications@github.com a écrit :
its hard to debug without that dataset
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoshPosh/grafana-meta-queries/issues/29#issuecomment-403422232, or mute the thread https://github.com/notifications/unsubscribe-auth/ATtI5_nEi4SH7LOHi6Dg3TIRmeneIb2Fks5uEyXggaJpZM4VDYl2.
I have similar drawing issues. I can reproduce it when showing 2 datasets with data available in different time intervals and selecting an group by time()
interval that is smaller than the first but larger than the second.
E.g. Dataset 1 is available in 10 Minutes interval, dataset 2 in 5 Minutes intervals. using group by time(10m)
shows nice graphs, but using group by time (5m)
shows issues in the graph. I am not arguing about the sense of this grouping, but to provide an example on how to reproduce graphing issues with MetaQueries.
Hope this helps.
@TheRealKerni yup that scenario makes sense. but I am unsure if we can default numbers to 0. Its more general grafana issue than this plugin itself. I think it behaves in the same way if a datasource itself would have had no points in that location
I am not sure what is going on yet, tried to debug a bit but haven't find the cause.
But I have a small example animated gif that may help.
The data source has data that is fetched once a minute, the minimum interval for the chart is set to 5 minutes. When showing the influxDB data, everything is fine, when showing the MetaQuery instead it acts app. I found that the timestamp of the last item when using MetaQuery suddenly changes to the first timestamp in the dataset!
Take a look.
@ShilpaSivanesan we should see if this problem exists in a generic fashion. Lets look into this one next week.
Hello,
I have two timestamps, and I would like to see the difference between using B['dequeuedAt']-A['routedAt']
Sometimes I've got strange negative values, like this:
How can I avoid null values?
I've tried
(((B['dequeuedAt'])? B['dequeuedAt'] :0) - ((A['routedAt'])? A['routedAt'] :0)
and
((B['dequeuedAt'])?Math.round(B['dequeuedAt']*100)/100:0) - ((A['routedAt'])?Math.round(A['routedAt']*100)/100:0)
But without success.
Sometimes the count got really strange like this:
Thanks!!
@tiago-cruz-movile you should put it on a table to see what results do you get.
also you can try ( (B['dequeuedAt'] && A['routedAt'])? B['dequeuedAt'] - A['routedAt'] : 0 )
I had similar problem two queries A
and B
and the B
query did not return values for every time interval for which A
did. What worked for me was using something like A['key1'] + (B ? B['key2'] : 0)
which essentially returns 0 if the B query does not have a value.
today I noticed a very similar behaviour with a simple A-B logic (well, B-A really):
A: SELECT mean("value") AS "Free" FROM "node_memory_MemFree_bytes" WHERE $timeFilter GROUP BY time($__interval) fill(none)
B: SELECT mean("value") AS "Total" FROM "node_memory_MemTotal_bytes" WHERE $timeFilter GROUP BY time($__interval) fill(none)
C: B["Total"]-A["Free"]
At first I had the time() set to 10s
statically - and when I plotted 13 days or more the effect would look like that:
then I went back to letting grafana determine the grouping interval and it solved the problem for me. (tested up till 30 days worth of data)
Can't get metaqueries to work like you do... Here's my setup, what I am missing?
Regards
@cassiel74 add the value $col
into the big ALIAS BY
field.
The problem is that if ALIAS BY
is not set, then the actual identifier prepended by values.
. The $col
value will eliminate this prepending string.
Ah... I put the alias in SQL style :-)
Now it's working, using only ALIAS BY
and nothing in SELECT statement
thank you @TheRealKerni
I was having the same issue I solve mine by grouping by time ($__interval, previous) on both A AN B queries (MYSQL Data Source) and that seems to have fixed the issue.
I am doing a sum of 3 queries A + B +C . I get the follow result:
But if I zoom out, there is not anymore this 0 value in the left corner and everything works.
I am using influxdb and grafana 5.1.3.