【问题标题】:Query Clickhouse for currently installed version查询 Clickhouse 当前安装的版本
【发布时间】:2020-12-30 00:07:27
【问题描述】:

我知道有一堆系统表。如果有人可以访问那些我在哪里可以找到当前安装的版本?

【问题讨论】:

    标签: sql clickhouse


    【解决方案1】:

    HTTP 获取 CH 版本的另外两种方法:

    # 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
    # ..
    

    【讨论】:

      【解决方案2】:
      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
      

      【讨论】:

        猜你喜欢
        • 2016-11-07
        • 2017-11-30
        • 2015-11-30
        • 2016-12-25
        • 1970-01-01
        • 2013-07-31
        • 2013-02-12
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多