Datasources: add support for POST HTTP verb for InfluxDB (#16690)

A new parameter `queryMode` is added to the InfluxDB datasource to provide a way to use POST instead of GET when querying the database. This prevents to get any error when querying the database with a heavy request.
Default configuration is kept to GET for backward compatibility. Tests and documentation have been added for this new behaviour.
This commit is contained in:
Stephen SORRIAUX
2019-05-02 15:30:37 +02:00
committed by Andrej Ocenas
parent 2596ce5076
commit 3866839b19
7 changed files with 206 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ Name | Description
*Database* | Name of your influxdb database
*User* | Name of your database user
*Password* | Database user's password
*HTTP mode* | How to query the database (`GET` or `POST` HTTP verb). The `POST` verb allows heavy queries that would return an error using the `GET` verb. Default is `GET`.
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
@@ -212,4 +213,6 @@ datasources:
user: grafana
password: grafana
url: http://localhost:8086
jsonData:
httpMode: GET
```