mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* InfluxDB: Send retention policy with InfluQL queries if it's been specified. In InfluxDB v2, due to technical limitations of the InfluxDB v1 compatibility layer, retention policies in a query (e.g. "<retention policy>.<measurement_name>") aren't honored and must be specified in the URL query parameter `rp` to be applied. Grafana doesn't send this query parameter which results in all queries resolving to the default retention policy when querying InfluxDB v2 servers using InfluxQL. This addresses the issue by sending the `rp` query parameter for queries that have specified a retention policy in the `target` given to `runExploreQuery`. The outcomes are: 1. InfluxQL queries executed against InfluxDB v2 databases will have the necessary retention policy information for queries like `SHOW FIELD KEYS FROM measurement` to function correctly. 2. InfluxQL queries executed against InfluxDB v1 databases will be unaffected, because this `rp` query parameter is unsupported there. You can read more about the rentention policy mapping behavior of InfluxDB v2 in our documentation: - https://docs.influxdata.com/influxdb/v2.6/reference/api/influxdb-1x/dbrp/#when-querying-data - https://docs.influxdata.com/influxdb/v2.6/reference/api/influxdb-1x/query/#query-a-non-default-retention-policy * Use the ? operator Co-authored-by: Ryan McKinley <ryantxu@gmail.com> Co-authored-by: Ryan McKinley <ryantxu@gmail.com> |
||
---|---|---|
.. | ||
components | ||
img | ||
specs | ||
constants.ts | ||
datasource.mock.ts | ||
datasource.ts | ||
influx_query_model.ts | ||
influxQLMetadataQuery.ts | ||
migrations.ts | ||
module.ts | ||
plugin.json | ||
query_builder.ts | ||
query_help.md | ||
query_part.ts | ||
queryUtils.test.ts | ||
queryUtils.ts | ||
README.md | ||
response_parser.ts | ||
types.ts |
InfluxDB data source
Grafana ships with built-in support for InfluxDB releases >0.9.x.
There are separate data sources for InfluxDB in Grafana: the latest InfluxDB release and InfluxDB 0.8.x that Grafana maintains support for as a convenience for its existing users. InfluxDB no longer maintains release 0.8.
The API and capabilities of the latest release of InfluxDB are completely different from those of InfluxDB 0.8.x, which is why Grafana handles them as different data sources.
For more information, refer to Using InfluxDB in Grafana.