Query Clickhouse for currently installed version
Asked Answered
T

2

19

I know there's a bunch of system tables. If one has access to those where do I find the currently installed version?

Trometer answered 11/9, 2020 at 12:55 Comment(0)
A
34
SELECT version()

┌─version()───┐
│ 20.9.1.4571 │
└─────────────┘



SELECT *
FROM system.build_options

┌─name──────────────────────┬─value────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ VERSION_FULL              │ ClickHouse 20.9.1.4571                                                                                                                       │
│ VERSION_DESCRIBE          │ v20.9.1.4571-testing
Arron answered 11/9, 2020 at 13:6 Comment(0)
K
3

Just two extra other ways to get CH version by HTTP:

# send the wrong query to standard CH endpoint to find the version at the end of the response

http://ch_server_hostname_or_ip:8123/?query=hello

# depends on the access settings you get 
# either 'Code: 62, .. Exception: Syntax error .. (version 20.3.12.112 (official build))'
# or 'Code: 516, .. Authentication failed .. (version 20.3.12.112 (official build))'
# look at Prometheus-endpoint that contains the required metric

http://ch_server_hostname_or_ip:custom_port/metrics

# ..
# ClickHouseMetrics_VersionInteger 20003012
# ..
Karen answered 11/9, 2020 at 20:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.