25

The influx shell has a -version flag, but not influx server:

/path/to/bin/influx -version
InfluxDB shell version: 1.1.1

/path/to/bin/influxd -version
flag provided but not defined: -version

/path/to/bin/influxd -v
flag provided but not defined: -v

Should I assume that influx shell and influx server will always have the same version ?

Anto
  • 6,806
  • 8
  • 43
  • 65

5 Answers5

52

curl -sL -I localhost:8086/ping

You should get something like:

HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: c7c8f7d7-b7ef-11e7-8002-000000000000
X-Influxdb-Version: 1.3.6
Date: Mon, 23 Oct 2017 12:43:33 GMT

If you are using HTTPS:

curl -skL -I 'https://myhost:8086/ping'
Gregory
  • 6,514
  • 4
  • 28
  • 26
14

It's most likely that the InfluxDB client and InfluxDB server on the same server are the same versions. If you want to specifically check the server version, you can do so.

In versions 0.11 (at least) and above, the influxdb executable accepts a version argument:

% /usr/bin/influxd version
InfluxDB v1.2.1 (git: master 3ec60fe2649b51a85cd1db6c8937320a80a64c35)
lreeder
  • 12,047
  • 2
  • 56
  • 65
4

You also can get influxdb version by sending http request to server.

for example

$ curl -G -i http://yourserver.com:8086/query -u anonymous:anonymous --data-urlencode "db=dbname" --data-urlencode "q=SHOW MEASUREMENTS"

And result in response headers

X-Influxdb-Version: 1.2.3-c1.2.3
Georgy Gobozov
  • 13,633
  • 8
  • 72
  • 78
  • This kind of answer was given already in a simpler & faster form. It's also flawed, [as I pointed out](https://stackoverflow.com/questions/41856474/how-to-get-influxdb-version-via-shell#comment121757501_46889735). – Dan Dascalescu Aug 23 '21 at 14:37
-2

Simply type ## influx version ## in terminal

-3

on ssh terminal just type below command

influx -version
Arvinder
  • 7
  • 2