Open
Description
Currently, there are no query target helpers/functions (not sure what the correct terminology is) for InfluxDB InfluxQL nor InfluxDB Flux.
It would be great to have them at least for InfluxQL, as this data source is quite popular.
The way it has to be done right now:
+ g.panel.timeSeries.queryOptions.withTargets([
time.queryOptions.withDatasource('influxdb', influxFluxDataSource)
+ {
alias: 'Frequency',
groupBy: [
{
params: [
'$__interval',
],
type: 'time',
},
{
params: [
'none',
],
type: 'fill',
},
],
measurement: 'telemetry_v2',
orderByTime: 'ASC',
policy: 'default',
query: '',
refId: 'A',
resultFormat: 'time_series',
select: [
[
{
params: [
'system_frequency_freq_hz',
],
type: 'field',
},
{
params: [],
type: 'mean',
},
],
],
tags: [
{
key: 'device_id',
operator: '=~',
value: '/^$device$/',
},
],
},
])