Closed SergeyRim closed 4 years ago
@SergeyRim I think the best way would be to debug via doing a console.log(A)
in the expression box to verify what is showing up there. I am unsure if grafana or zabbix is shifting A vs B
Same issue for me
@vicioussn did you try debugging?
@Gauravshah Hey, does this plugin work with grafana v6.7 and above? I am trying to get this work with v6.7.1 and MetaQuery plugin doesn't endup showing any data.
@apoorva-marisomaradhya can you open a separate issue we can discuss there. also do paste a screenshot of your dashboard config
Sorry for late response. My issue is very easy to reproduce.
I will investigate more and back with a results soon.
Debugging shows that calculation is correct, but the graph looks very ugly. So the issue is in the graph itself?
so we are one step forward now. You can convert your graph to table . That will help understand data better. Looks to me that there is a null on either A or B and non-null on the other side hence the sum is throwing as NAN. Once you confirm it via table you can write some javascript safety check. (A['number_of....'].isNaN()? 0 : A['number_of....']
something like that should take care of exceptions in data
I have converted graph to table and now can see the issue. Data for A and B has different timestamps. So how to use MetaQueries in this case?
you might want to set some granularity on your A source so that it is grouped by the same time as the other one. I do not know how otherwise can Metaqueries do the summation.
This is how zabbix collects data. The previous screenshot was from esxi stats collected by zabbix, here is a snmp stats collected from router by zabbix. The main problem is the same - different timestamps. I'm really not sure that I can influence on this.
@SergeyRim I am not sure how to do that on zabbix, but unless we get the time granularity to be similar across columns there is no way metaqueries will be able to apply any operation
closing this one as its not related to metaqueries
Hello. I have a Grafana v6.6.1 with Zabbix plugin.
For example I have added 2 metrics from zabbix datasource: "Number of packets received on interface Network adapter 1" for 2 different hosts (metric A and metric B). Then I added an arithmetic metaqueries metric. The behaivor is: No matter if I put A['Number of packets received on interface Network adapter 1'] or B['Number of packets received on interface Network adapter 1'] to the expression, it always show me a A['Number of packets received on interface Network adapter 1'] value.
If I change an expression to A['Number of packets received on interface Network adapter 1']+B['Number of packets received on interface Network adapter 1'], it will calculate B+B.
I have verified with a different metrics and expressions, and always metaqueries metric shows an incorrect result ( and sometime just shows an empty value without any errors displayed).