Ad Widget

Collapse

TSDB native compression option missing in housekeeping section

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • supafly
    Junior Member
    • Nov 2025
    • 15

    #1

    TSDB native compression option missing in housekeeping section

    Hello!
    Sorry if it is a duplicate, haven't find a solution on forum.
    My setup:
    Core - Zabbix server 6.0.42
    DB - PostgreSQL 15.14 + TimescaleDB 2.22.0
    Web - docker image zabbix/zabbix-web-nginx-pgsql:centos-6.0-latest

    I've successfully migrated 5TB database from percona to PostgreSQL + TimescaleDB for the sweet sweet compression.
    Migration was done using pgloader straight from percona to PG with already activated TSDB extension.
    But I didn't find that section from official documentation
    Compression settings can be changed in the History, trends and audit log compression block in Administration > Housekeeping section of Zabbix frontend.
    Click image for larger version

Name:	image.png
Views:	97
Size:	25.0 KB
ID:	509033
    Later I found out that minor zabbix version must support a minor veson of TSDB.
    Updated zabbix from 6.0.36 to 6.0.42, still no bueno.
    New chunks now are generating. Temporary, I delete them manually.
    Zabbix server logs are showing no signs of any TSDB related messages
    What am I missing?
  • Answer selected by supafly at 21-11-2025, 16:44.
    supafly
    Junior Member
    • Nov 2025
    • 15

    Oh! shoot! I got it!
    That was actually easy.
    Because of I've decided to mirgate strait to hypertables, I applied schema.sql before I started migration.
    Script updated config table with:
    Code:
    UPDATE config SET db_extension='timescaledb',hk_history_global=1,hk_trends_global=1;
    UPDATE config SET compression_status=1,compress_older='7d';
    And then I've started migration, and rewritten db_extension='timescaledb' parameter with old data which is an empty string.
    Code:
    UPDATE config SET db_extension='timescaledb';
    Fixed it!

    My favorite activity — make problems for your future self.
    Thanks guys!

    Comment


    • Andrejs Poddubņaks
      Andrejs Poddubņaks commented
      Editing a comment
      Glad to hear the problem was resolved!
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    #2
    Which version of the TSDB you installed? Not the number, but licence version? Apache or TSL?
    Requirements state it also "Make sure to install TimescaleDB Community Edition, which supports compression."
    Cloud-native PostgreSQL engineered for powerful price-performance and speed at scale.

    Comment

    • supafly
      Junior Member
      • Nov 2025
      • 15

      #3
      Code:
      zabbix=# SELECT * FROM pg_available_extensions;
          name   | default_version | installed_version | comment
      -------------+-----------------+-------------------+-------------------------------------------------------------------
      plpgsql | 1.0 | 1.0 | PL/pgSQL procedural language
      timescaledb | 2.22.0 | 2.22.0 | Enables scalable inserts and complex queries for time-series data
      (2 rows)
      zabbix=# SHOW timescaledb.license;
      timescaledb.license
      ---------------------
      timescale
      (1 row)
      zabbix=# SELECT name, setting FROM pg_settings WHERE name = 'timescaledb.license';
      name | setting
      ---------------------+-----------
      timescaledb.license | timescale
      (1 row)
      Is that a right way to check type of license?
      Seems to be community.
      I'm suspecting that there are some traces left from migration from mysql, it that possible?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4806

        #4
        Seems correct one.. Cannot think of any good reason, why you do not have those compression tickboxes there..

        Comment

        • Andrejs Poddubņaks
          Junior Member
          • Nov 2025
          • 18

          #5
          Compression settings become available only after running a special script and if a supported version of TimescaleDB is available. The official Zabbix documentation states that the options ‘Enable compression’ and ‘Compress data older than...’ appear in the Administration → Housekeeping section only after running the schema.sql script. This script converts history and trend tables to hypertables and activates automatic compression. It also enables the ‘Override item history period’ and ‘Override item trend period’ options, which are necessary for the correct deletion of compressed data. See: Implementation of TimescaleDB in Zabbix: Benefits, Key Tables, and Installation - initMAX s.r.o.

          If the installed version of TimescaleDB is not supported by the current version of Zabbix, the compression settings block will simply not be displayed in the interface. According to the requirements of Zabbix 6.0, version 6.0.42 supports TimescaleDB up to and including version 2.21. Support for version 2.22.x was added only in Zabbix 6.0.43 and newer. Therefore, if you are using TimescaleDB 2.22.0 with Zabbix 6.0.42, the server will identify the database as ‘incompatible’ and hide the compression section. A warning will appear in the server logs, and the necessary fields will be missing in the web interface. See: 2 Requirements

          You can suppress these warnings by setting, in the zabbix_server.conf configuration file and then restarting the server.:
          Code:
          AllowUnsupportedDBVersions=1
          However, this will only disable log warnings, the interface will still not display compression settings, as Zabbix does not officially recognise the new version of TimescaleDB.

          What you can do?
          - Check whether the schema.sql script has been applied, this is located in the:
          Code:
          scripts/postgresql/timescaledb
          and is required to convert tables to hypertables, add compression parameters and override periods. Without running this script, the database remains a regular PostgreSQL database, and compression is not available.
          - Use a compatible version of TimescaleDB:
          If you cannot update Zabbix, install TimescaleDB version 2.21.x or lower, which are supported in Zabbix 6.0.42.
          - Update Zabbix:
          Support for TimescaleDB 2.22.x was added in Zabbix 6.0.43 and 7.0.20. After updating, the compression settings block will appear in the interface automatically.
          - (Optional) You can temporarily allow the use of unsupported versions:
          Install in zabbix_server.conf:
          Code:
          AllowUnsupportedDBVersions=1
          and restart Zabbix. This will remove the startup block, but you will have to configure compression manually via SQL queries, for example, by creating a compression policy manually. For convenience, it is better to update Zabbix to a version with official support for the required version of TimescaleDB.

          I hope it will help you, good luck!

          Comment


          • supafly
            supafly commented
            Editing a comment
            Thank you for pushing me in right direction!
        • supafly
          Junior Member
          • Nov 2025
          • 15

          #6
          Support for version 2.22.x was added only in Zabbix 6.0.43 and newer.
          How i manged to mess this up...
          schema.sql script
          You mean
          Code:
          /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql
          script?
          I have applied it before starting migration, so pgloader writes data directly to chunks. Automatic partitioning is working.
          So you saying, I should update zabbix to 6.0.43, and then run scripts once more? Or I just can apply only compression related lines?

          Comment

          • supafly
            Junior Member
            • Nov 2025
            • 15

            #7
            Oh! shoot! I got it!
            That was actually easy.
            Because of I've decided to mirgate strait to hypertables, I applied schema.sql before I started migration.
            Script updated config table with:
            Code:
            UPDATE config SET db_extension='timescaledb',hk_history_global=1,hk_trends_global=1;
            UPDATE config SET compression_status=1,compress_older='7d';
            And then I've started migration, and rewritten db_extension='timescaledb' parameter with old data which is an empty string.
            Code:
            UPDATE config SET db_extension='timescaledb';
            Fixed it!

            My favorite activity — make problems for your future self.
            Thanks guys!

            Comment

          Working...