osisoftpi-grafana icon indicating copy to clipboard operation
osisoftpi-grafana copied to clipboard

Calculation creates faulty query

Open alexl04 opened this issue 1 year ago • 2 comments

Grafana 10.01/10.02 [Linux] osisoftpi Grafana plugin 4.2 osisoftpi WEB API 2022 patch 1

Issues:

  1. Calculation does not work in combination with Summary Period. Issue present in all plugin versions.
  2. Plugin sends an incorrect query to PI if we add a Calculation in the query. See screenshots. It seems that the dashboard time-window is divided into multiple smaller time-windows and then inserted into the query to PI. This results in a query with fewer data points than expected by the Query settings in Grafana. Issue is seen from plugin version 4+. With version 3 this was no issue. wrong good

alexl04 avatar Aug 30 '23 11:08 alexl04

I believe the default value is defined as 40 calculated values in version 4 instead of being dynamically calculated.

@coderReview I believe I stumbled onto both issues when testing the backend version and have the fix in there.

complacentsee avatar Sep 01 '23 17:09 complacentsee

I believe the default value is defined as 40 calculated values in version 4 instead of being dynamically calculated.

@coderReview I believe I stumbled onto both issues when testing the backend version and have the fix in there.

@complacentsee Awesome work! @coderReview Will the fix be included in the next available version? Looking forward to the fix. Much appreciated. We make use of this plugin a lot. In short, without this plugin it becomes a hassle to dashboard data from PI. If you ask me it would be logic for Grafana to include this plugin into Grafana by default.

alexl04 avatar Sep 05 '23 07:09 alexl04

I have added a fix in version 5.0.0. It's actually defaults to recorded values.

coderReview avatar Jun 12 '24 17:06 coderReview