Thank you for your help ! I confirm that each element has its own SQL query. My application is a battery supervision. I made a script to generate the whole .json Canvas file.
- My main element is an "image reveal" based on the battery SoC (State of Charge) like a fuel gauge.
SELECT CAST(bms.soc AS FLOAT)/100 AS Soc FROM "batterylogs-bms-2020.*" WHERE position=3 AND rack=1 AND site='invalides' AND box=1 AND time > NOW() - INTERVAL 10 SECONDS ORDER BY time DESC LIMIT 1
On the top, I use a simple metric element to display the SoC as a numeric value. In addition, other elements such as a charging icon, is overlaid on the battery image.
SELECT CAST(ds.flags.charging AS INTEGER) AS charging FROM "batterylogs-ds-2020.*" WHERE position=3 AND rack=1 AND site='invalides' AND box=1 AND time > NOW() - INTERVAL 10 SECONDS ORDER BY time DESC LIMIT 1
Elasticsearch, Logstash and Kibana : 7.6.1
My RPi is connected to a wifi hotspot and my server is directly connected to the internet router by ethernet. Both are on the same network.
When I load this huge Canvas from my laptop, it already takes several seconds to edit the workpad settings like the title (queries are idled). It's barely possible to enable the refresh period on the RPi so much the Canvas is slowed. The performance is proportional to the number of elements.
On the other hand, the Kibana discover menu loads my data instantly on my laptop and takes few seconds on the RPi. Thus my first guess is that the bottleneck lies in the Canvas which is great and simple to handle by the way.