How to get InfluxDB version through shell

The stream shell has a flag -version, but not a tributary 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 the inflow server and the inflow server will always have the same version?

+11
source share
4 answers

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 use HTTPS: curl -skL -I ' https: // myhost: 8086 / ping '

+16
source

Most likely, the InfluxDB client and InfluxDB on the same server are the same versions. If you want to specifically check the server version, you can do this.

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

% /usr/bin/influxd version
InfluxDB v1.2.1 (git: master 3ec60fe2649b51a85cd1db6c8937320a80a64c35)
+6

influxdb, http- .

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

X-Influxdb-Version: 1.2.3-c1.2.3
+3

man page of influxd ,

DESCRIPTION

  influxd is the primary daemon process for the InfluxDB system.

and the options that it supports do not include versionfor printing. It is enough to identify only the version influx.

+1
source

Source: https://habr.com/ru/post/1667789/


All Articles