sudo apt-get update
sudo apt-get install -y grafana
sudo grafana-cli plugins install frser-sqlite-datasource
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
sudo systemctl status grafana-server
/media/ZWay_USB/sqliteDB/MxChartDB.db
)
select ts/1000 as ts,
json_extract(val,'$[i]') as vali,
...,
json_extract(json_extract(val,'$[j]'),'$.value') as valj,
(for values with tooltips)
...
from MxChartDBnnn
where ts >= $__from and ts < $__to
val1 = substr(val,instr(val,',')+1)*1
val2 = substr(substr(val,instr(val,',')+1),instr(substr(val,instr(val,',')+1),',')+1)*1
val3 = substr(substr(substr(val,instr(val,',')+1), instr(substr(val,instr(val,',')+1),',')+1), instr(substr(substr(val,instr(val,',')+1), instr(substr(val,instr(val,',')+1),',')+1),',')+1)*1
sudo apt-get update
sudo apt-get install -y grafana
sudo grafana-cli plugins install marcusolsson-json-datasource
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
sudo systemctl status grafana-server
http://IP:5000/MxChartDB/sql
,
Method | Path |
---|---|
GET |
?select ts, val(1), val(2), instr(val(3),"on"), ... from MxChartDBnnn
where ts >= $__from and ts < $__to |
Field | Query Language | Type | Alias |
---|---|---|---|
$.[*][0] | JSONata | Time | ts |
$.[*][1] | JSONata | Number | val1 |
$.[*][2] | JSONata | Number | val2 |
$.[*][3] | JSONata | Number | val3 |
... | JSONata | ... | ... |