InfluxDB 2.x: Error: Bad Request (Grafana and InfluxQL): Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
 
(3 dazwischenliegende Versionen des gleichen Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
[[Datei:01 influxdb v2 header.png|right]]
 
If you configure '''Grafana''' with the InfluxDB datasource to query data from a '''InfluxDB 2.x''' with query language '''InfluxQL''' like the influx-docs[https://docs.influxdata.com/influxdb/v2.0/tools/grafana/] describes it, then you will end up in an error.
 
If you configure '''Grafana''' with the InfluxDB datasource to query data from a '''InfluxDB 2.x''' with query language '''InfluxQL''' like the influx-docs[https://docs.influxdata.com/influxdb/v2.0/tools/grafana/] describes it, then you will end up in an error.
  
My environment:
+
'''My environment'''<br>
- Grafana v7.3.3
+
- Grafana v7.3.3 <br>
- InfluxDB v2.0.2 (OSS)
+
- InfluxDB v2.0.2 (OSS)<br>
  
  
 
== Error ==
 
== Error ==
'''InfluxDB Error: Bad Request'''
+
If you want to add an InfluxDB 2.x datasource with InfluxQL as a Grafana datasource: '''InfluxDB Error: Bad Request'''
  
  
Zeile 19: Zeile 20:
 
**Header: Authorization
 
**Header: Authorization
 
**Value: Token <YOUR_TOKEN>
 
**Value: Token <YOUR_TOKEN>
 
 
 
 
 
 
 
  
  

Aktuelle Version vom 30. November 2020, 15:05 Uhr

01 influxdb v2 header.png

If you configure Grafana with the InfluxDB datasource to query data from a InfluxDB 2.x with query language InfluxQL like the influx-docs[1] describes it, then you will end up in an error.

My environment
- Grafana v7.3.3
- InfluxDB v2.0.2 (OSS)


Error

If you want to add an InfluxDB 2.x datasource with InfluxQL as a Grafana datasource: InfluxDB Error: Bad Request


Cause

The authentication "Basic auth" in the InfluxDB datasource has an error/bug.


Solution

  • Uncheck "Basic auth" in the Grafana InfluxDB datasource
  • Add Custom HTTP Headers in the following format (Important: the Value-field must contain "Token" AND your Token):
    • Header: Authorization
    • Value: Token <YOUR_TOKEN>