Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grafana won't connect to InfluxDB

The database, username, and password combination definitely work. The following configuration for grafana doesn't tho.

datasources: {
  influxdb: {
    type: 'influxdb',
    url: "http://XXX.XXX.XXX.XX:8086/db/dbname",
    username: 'username',
    password: 'password',
    default: true
  },
},

I've tried removing the default parameter, changing influxdb to influx, and append /series to the url, all to no avail. Has anyone gotten this to work?

  • InfluxDB v0.7.3 (git: 216a3eb)
  • Grafana 1.6.0 (2014-06-16)
like image 852
AJcodez Avatar asked Mar 20 '23 06:03

AJcodez


1 Answers

I'm using this below configuration and it works. Try insert the grafana database into your db and add grafana db configuration.

...

datasources: {

    influxdb: {
      type: 'influxdb',
      url: "http://localhost:8086/db/test",
      username: 'root',
      password: 'XXXX'
    },
    grafana: {
      type: 'influxdb',
      url: "http://localhost:8086/db/grafana",
      username: 'root',
      password: 'XXXX',
      grafanaDB: true
    }
  },

...

like image 54
annelorayne Avatar answered Apr 30 '23 05:04

annelorayne