riclolsen / scadavis-synoptic-panel

A SCADA-like synoptic panel plugin from SCADAvis.io for Grafana.
GNU General Public License v3.0
26 stars 5 forks source link

Need query result example #4

Closed artworkad closed 4 years ago

artworkad commented 4 years ago

Hello!

I tested the SCADAvis plugin with following query:

SELECT
  `timestamp` AS time,
  "TAG1" AS metric,
  value
FROM `project.dataset.table`
LIMIT 1

and following SVG:

https://raw.githubusercontent.com/riclolsen/displayfiles/master/donut.svg

However no value is displayed. The build in visualizations work as expected.

Can you describe, how you expect the query result to look like?

I am using:

Grafana 6.6.2 SCADAvis 1.0.3 BigQuery datasource

Thank you!

riclolsen commented 4 years ago

Hi! This is expected to work, as this file is marked up with "TAG1". Please try to save and reload the panel and see if it then works. The plugin will be updated (version 1.0.4) probably this week to to official repo. This new version will make it possible to import a local SVG to embed in the visualization. Best regards, Ricardo

artworkad commented 4 years ago

@riclolsen tried to save and reload with no success. Looking forward to the new version.

riclolsen commented 4 years ago

Apparently it is not a version problem, you should try other queries. You can try to add an Alias as "TAG1". This file expects a TAG2 also but it is not required. See it here on 2 versions of Grafana, and the plugin 1.0.3 and 1.0.4 both working. 2020-03-16 2020-03-16 (1)

artworkad commented 4 years ago

@riclolsen Thank you for the example. I tried with custom SQL and it works now. Like so:

SELECT
  `timestamp` AS time,
   value AS TAG1
FROM `datasource`
WHERE 
  timestamp BETWEEN TIMESTAMP_MILLIS($__from) AND TIMESTAMP_MILLIS($__to) 
ORDER BY time DESC

Max Data Points is set to 1. However the BigQuery query builder seems not to be able to create a proper query for your plugin.