Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Query Clickhouse for currently installed version

Tags:

sql

clickhouse

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

like image 537
supernova Avatar asked Nov 27 '25 09:11

supernova


2 Answers

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
like image 188
Denny Crane Avatar answered Nov 29 '25 00:11

Denny Crane


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
# ..
like image 36
vladimir Avatar answered Nov 28 '25 22:11

vladimir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!