Grafana: Enabling SSL seems to break Direct InfluxDB 0.9 connection?

Created on 2 Sep 2015  ·  3Comments  ·  Source: grafana/grafana

I have Grafana and InfluxDB 0.9 installed locally. Grafana is setup to use a Direct connection to http://localhost:8086.

Previously, all my graphs were grabbing data from InfluxDB. If I go to Data Sources, then my InfluxDB connection, and hit Test Connection, I get the following query logged by InfluxDB:

[http] 2015/09/02 22:49:00 127.0.0.1 - root [02/Sep/2015:22:49:00 +1000] GET /query?db=insight&epoch=ms&p=%5BREDACTED%5D&q=SHOW+MEASUREMENTS+LIMIT+1&u=root HTTP/1.1 200 100 https://
localhost:3000/datasources/edit/1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2498.0 Safari/537.36 fbe414fb-5170-11e5-8006-000
000000000 1.39579ms

Then, I enabled SSL for Grafana:

protocol = https

Now, my graphs don't show data, and when I click on Test Connection, it simply appears to hang indefinitely - the InfluxDB logs don't show any queries being received:

screenshot 2015-09-02 22 54 24

So it would appear that enabling SSL in Grafana broke something.

If I change the connection type in Grafana from Direct to Proxy it works again - however, Direct connections do not work.

Is this a known issue, or do I need to tweak something else in the configuration?

typquestion

Most helpful comment

if you use direct access, Grafana will not be involved at all.

As for using the proxy mode with a self signed cert, it will work

All 3 comments

Can you show the output of chrome dev tools? When you use direct access it is accessing influxdb directly from the browser, Browsers has strickter CORS requirements when SSL is enabled so proabably why you see this problem (and why it works when you use proxy access)

You're right - this is a browser issue:

screenshot 2015-09-03 00 03 22

Seems I'll need to enable SSL as well on InfluxDB.

Out of curiosity - if I enable SSL on InfluxDB with a self-signed certificate, will that cause any issues with InfluxDB?

I can't see any option mentioned about whether Grafana verifies or doesn't verify the InfluxDB SSL certificate.

if you use direct access, Grafana will not be involved at all.

As for using the proxy mode with a self signed cert, it will work

Was this page helpful?
0 / 5 - 0 ratings