neuralfraud / grafana-prtg

A PRTG Datasource plugin for Grafana
179 stars 75 forks source link

Add field from calculation transform bug #187

Open DrPlague1656 opened 3 years ago

DrPlague1656 commented 3 years ago

What happened: Whenever I have 2 query's in grafana I cannot do any binary operation transform without getting NaN as a result even though in calculation I have selected last non null value.

As you can see by the attached screenshots, the 2 query's work seperately but when I have both of them I cannot do a calculation using both of them and only a calculation with the 2nd query gives me a result. Using the first query results in Nan even though when I only have the first query it just calculates as it should

What you expected to happen: Just have the 2 numbers add up to: 5.764.421.259.264

How to reproduce it (as minimally and precisely as possible): This is pretty difficult as I am using the PRTG plugin for my query's . This however shouldn't be the issue as I have explained above. The numbers do work when I don't have both query's.

Anything else we need to know?:

I also had this same problem when using InfluxDB getting data from a VCenter server but I have since given up on that because of the NaN issue.

Environment:

Calculating between the 2 not working: Screenshot_1

Calculating with only the first one: Screenshot_2

Calculating with only the second one: Screenshot_3

Calculating the first one with both query's Screenshot_4

Calculating the second one with both query's Screenshot_5

(Result is the same if I switch the query's around, the first one becomes undefined) Screenshot_6