Ad Widget

Collapse

Problem enabling TimescaleDB on fresh Zabbix 5.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rbenea
    Member
    • Apr 2008
    • 35

    #1

    Problem enabling TimescaleDB on fresh Zabbix 5.2

    Hello,

    I tried installing a fresh Zabbix 5.2 with Pg12 and TimescaleDB on Debian 10. All is working fine, I can get a nice running Zabbix 5.2 serrver, then the problem is that if I enable TimescaleDB I get errors on zabbix_server.log:
    Code:
    [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: relation "_timescaledb_config.bgw_policy_compress_chunk s" does not exist
    LINE 1: select (p.older_than).integer_interval from _timescaledb_con...
    ^
    [select (p.older_than).integer_interval from _timescaledb_config.bgw_policy_compress_chunks p inner join _timescaledb_catalog.hypertable h on (h.id = p.hypertable_id) where h.table_name='history']
    579:20210108:123321.870 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: function add_compress_chunks_policy(unknown, integer) does not exist
    LINE 1: select add_compress_chunks_policy('history', integer '612000...
    ^
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.
    [select add_compress_chunks_policy('history', integer '612000')]
    579:20210108:123321.870 failed to add compression policy to table 'history'
    579:20210108:123321.873 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: relation "_timescaledb_config.bgw_policy_compress_chunk s" does not exist
    LINE 1: select (p.older_than).integer_interval from _timescaledb_con...
    ^
    [select (p.older_than).integer_interval from _timescaledb_config.bgw_policy_compress_chunks p inner join _timescaledb_catalog.hypertable h on (h.id = p.hypertable_id) where h.table_name='history_uint']
    579:20210108:123321.874 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: function add_compress_chunks_policy(unknown, integer) does not exist
    LINE 1: select add_compress_chunks_policy('history_uint', integer '6...
    ^
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.
    [select add_compress_chunks_policy('history_uint', integer '612000')]
    579:20210108:123321.874 failed to add compression policy to table 'history_uint'
    
    ....
    If I disable the compression on the Housekeeping page I get only:

    Code:
    [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: relation "_timescaledb_config.bgw_policy_compress_chunk s" does not exist
    LINE 1: select (p.older_than).integer_interval from _timescaledb_con...
    ^
    [select (p.older_than).integer_interval from _timescaledb_config.bgw_policy_compress_chunks p inner join _timescaledb_catalog.hypertable h on (h.id = p.hypertable_id) where h.table_name='history']
    963:20210108:123924.963 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: relation "_timescaledb_config.bgw_policy_compress_chunk s" does not exist
    LINE 1: select (p.older_than).integer_interval from _timescaledb_con...
    ^
    [select (p.older_than).integer_interval from _timescaledb_config.bgw_policy_compress_chunks p inner join _timescaledb_catalog.hypertable h on (h.id = p.hypertable_id) where h.table_name='history_uint']
    The error is the same on Pg11 and Pg12, if I enable TimescaleDB on install or after I have a functional zabbix setup.

    If I do this all starts to fail:

    Code:
    service zabbix-server stop
    
    echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
    
    cat /usr/share/doc/zabbix-server-pgsql*/timescaledb.sql | sudo -u zabbix psql zabbi
    
    service zabbix-server start

    These are the installed packaged:

    Code:
    zabbix-agent 1:5.2.3-1+debian10 amd64 Zabbix network monitoring solution - agent
    zabbix-apache-conf 1:5.2.3-1+debian10 all Zabbix network monitoring solution - apache configuration for front-end
    zabbix-frontend-php 1:5.2.3-1+debian10 all Zabbix network monitoring solution - PHP front-end
    zabbix-release 1:5.2-1+debian10 all Zabbix official repository configuration
    zabbix-server-pgsql 1:5.2.3-1+debian10 amd64 Zabbix network monitoring solution - server (PostgreSQL)
    postgresql-12 12.5-1.pgdg100+1 amd64 object-relational SQL database, version 12 server
    postgresql-client-12 12.5-1.pgdg100+1 amd64 front-end programs for PostgreSQL 12
    postgresql-client-common 223.pgdg100+1 all manager for multiple PostgreSQL client versions
    postgresql-common 223.pgdg100+1 all PostgreSQL database-cluster manager
    postgresql-server-dev-12 12.5-1.pgdg100+1 amd64 development files for PostgreSQL 12 server-side programming
    timescaledb-2-loader-postgresql-12 2.0.0-zz~debian10 amd64 The loader for TimescaleDB to load individual versions.
    timescaledb-2-postgresql-12 2.0.0-zz~debian10 amd64 An open-source time-series database based on PostgreSQL, as an extension.
    Thank you,
    Rares
  • rbenea
    Member
    • Apr 2008
    • 35

    #2
    Yes, I did this at install:
    Code:
    apt-get -y install postgresql-server-dev-12
    apt-get -y install timescaledb-2-postgresql-12
    timescaledb-tune --quiet --yes
    
    systemctl restart postgresql
    and I confirm that I have:
    Code:
    grep shared_preload_libraries /etc/postgresql/12/main/postgresql.conf
    
    shared_preload_libraries = 'timescaledb'    # (change requires restart)
    Thank you,
    Rares

    Comment

    • mfreed
      Junior Member
      • Jan 2021
      • 1

      #3
      Some of the TimescaleDB API functions changed in 2.0 (as opposed to 1.7), including "add_compression_policy".




      In the time-being, until Zabbix updates to support new APIs, I would go ahead and install TimescaleDB 1.7.4.

      Cheers,
      --mike (TimescaleDB person)

      Comment

      • rbenea
        Member
        • Apr 2008
        • 35

        #4
        Thank you Mike,

        I found the bug report now: https://support.zabbix.com/projects/...=allopenissues

        Let's hope it's going to be fix soon,
        Rares

        Comment

        • bix
          Junior Member
          • Jul 2020
          • 7

          #5
          Hello!
          I have a version Zabbix 5.0.1. of the same problem.
          How can I update?

          Comment

          Working...