ExportXMLWordPrintable

    • Type: Patch request
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 8.0.0rc2
    • Component/s: Frontend (F), Server (S)
    • Environment:

      Steps to reproduce

      1. Set up a ClickHouse cluster following Configuring ClickHouse clusters in the 8.0 documentation (ReplicatedMergeTree _local tables + Distributed tables with the original names).
      2. Configure HistoryProvider=clickhouse;... on Zabbix server.
      3. Start (or restart) Zabbix server.

      Actual result

      For every history table, the server logs a warning at startup:
       
      {{retrieving history provider "clickhouse" information
      cannot parse TTL information from ClickHouse schema: CREATE TABLE zabbix.history\n(\n `itemid` UInt64,\n `clock_ns` DateTime64(9),\n `value` Float64\n)\nENGINE = Distributed(\'cluster_2S_2R\', \'zabbix\', \'history_local\', itemid)}}
      The same message appears for history_str, history_log, history_uint, history_text and history_json. The server then continues normally (history provider "clickhouse" version "26.4.5.143") and history is written and read correctly.

      As a result, Administration > Housekeeping shows the ClickHouse data storage period as Unknown for all value types:

       
       
      {{ClickHouse data storage period
      Numeric (float) Unknown
      Character Unknown
      Log Unknown
      Numeric (unsigned) Unknown
      Text Unknown
      JSON Unknown}}
       

      The actual TTL is defined on the _local tables (365 days in this setup) and is enforced correctly by ClickHouse; only the value shown in the frontend is affected.

       

      Expected result

      The server should read the TTL from the underlying local table referenced by the Distributed engine (zabbix.<table>local), where the TTL is actually defined, and display it in _Administration > Housekeeping without warnings.

      Notes / possible fix

      • A Distributed table never has a TTL clause; the TTL is on the local ReplicatedMergeTree table. The actual TTL can be checked with:
        SELECT name, create_table_query FROM system.tables WHERE database='zabbix' AND name LIKE '%_local'
      • When the history table engine is Distributed, the server could resolve the local table from the engine arguments (database and table) and parse the TTL there.
      • Since the cluster procedure in the official documentation produces this exact schema, every user following it will hit this warning.

            Assignee:
            Genadijs Jeniceks
            Reporter:
            Juan Carlos Angelucci
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: