Connect to SSL enabled Influxdb v1.8

Using Grafana 9.0.4
and InfluxDB 1.8 - with Authentication enabled (running on a docker container)
Using Query Language: InfluxQL
Trying to connect to https://myservername:8086/
Getting InfluxDB Error: Bad Gateway
Expected results - test connection succeeds .

URL I was working with for setup - InfluxDB data source | Grafana documentation

When I access the Influx DB from api - I get a an answer e.g.
curl -G https://myservername:8086/query --data-urlencode “q=SHOW DATABASES” --header “Authorization: Bearer myToken” will return the DB’s

Looking at the ImfluxDB logs I see this error:
“http: TLS handshake error from : : remote error: tls: bad certificate”

Note: I didn’t enable anything in the Auth section in Grafana and didn’t add any HTTP header ? should I?

Yes you should just like you are in the curl command

Don’t follow
where do I place the token?

In Value you add your token as follows

Token jdfsd98f09sd89fsdkfjlsdkjfkdsjaf09sad8f
1 Like

Thanks for your replay.
Unfortunetly I’m still getting bad request error.

Just to make sure I’m not missing anything:
in the URL I’ve put https://myservername:8086/
in the Auth I’ve onlu added a header:
as you can see in the screenshot.

The token I’ve used was the one that is working on rest calls
(generated in in the format Token ..

In the InfluxDB I’ve put the Database name and the admin user name and password (I’ve also tried without user and pass)

Kindly advise

your influxdb is https?

The token needs to come from influx itself.

1 Like

Using influxDB 1.7.10 for now
Looks like it doesn’t support creating tokens.
it recognize “auth” command and prompts for user and password but nothing happens

1 Like