Access InfluxDB from remote client?

influxdb
#1

Hello! I am wondering if there is a way to access the influxDB from a remote client with authentication using HTTP or python interface? Just like the way access other database like MySQL from remote clients. Thank you very much!

#2

Using HTTP and authentication you can access Influx with something like this:

curl -G http://influxdb.domain.com:8086/query -u user:password --data-urlencode "q=SHOW DATABASES"

You will need to make sure that your influxdb.conf enables these three values below, auth-enabled is false by default:

[http]
  # Determines whether HTTP endpoint is enabled.
  # enabled = true

  # The bind address used by the HTTP service.
  # bind-address = ":8086"

  # Determines whether user authentication is enabled over HTTP/HTTPS.
  auth-enabled = true

The credentials will need to have the correct access rights for the db they are querying, or be admin.

Or you can use chronograf as a graphical data explorer from any remote client that can hit the InfluxDB endpoint.

See these resources for more:

Influx Guide to Querying Data

Chronograf Documentation

While I am not personally familiar with it, other devs I know use this python client:

Python client for InfluxDB

#3

Hi, I have the same problem. I have set the user name and password by executing
curl http://localhost:8086/query -u user:password --data-urlencode “q=SHOW DATABASES”. So I can manage user in chronograf now.

But do you know how to make the database remotely accessible? Do I need to make port 8086 open? I cannot simply change the localhost to the public IP. When use Chronograf on another computer, what should I put in connection string if I want to access my database? Thanks!

#4

To access Influx remotely port 8086 must be open, and you have to have a resolvable IP address or hostname from the remote device:

http://influxdb.example.com:8086 or http://192.0.0.0:8086.

If you are using https, replace as necessary. The documentation is pretty good for this.

Influx API

Chronograf Getting Started

#5

Thanks! I have deployed InfluxDB in local host , set authentication and authorization. I want let user access the database through public ip:8086, and operate database as in local host. I followed tutorial to open the port 8086, but I am not sure if it is opened actually. Could you help me? Thanks!

#6

you can use chronograf, its not as simple as the CLI but you can access all the data and do some queries, its the best manager GUI for influxDB.