Skip to content

Support Influxdb #147

Open
Enhancement
@lohrm-stabl

Description

@lohrm-stabl

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$/',
            },
          ],
        },
      ])

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginSupport for plugins

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions