Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18902

Zabbix Housekeeper 5.2.3 not working with TimeScaleDB 12.0.0

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 5.2.3
    • Server (S)
    • None
    • Cent OS 8, Zabbix 5.2.3, PostgreSQL 12.5, TimeScaleDB 2.0.0

      Steps to reproduce:

      1. Install Zabbix Server 5.2.3, PostgreSQL 12.5, TimeScaleDB according zabbix and timescaledb docs;
      2. Create hypertables according https://www.zabbix.com/documentation/current/manual/appendix/install/timescaledb;
      3. Enable Housekeeping;
      4. See PostgreSQL logs when Housekeeper is working;

       

      Result:
      2021-01-21 17:16:32.148 MSK [2927772] ERROR: invalid hypertable or continuous aggregate
      2021-01-21 17:16:32.148 MSK [2927772] STATEMENT: SELECT drop_chunks(1603462592,'history')
      2021-01-21 17:16:32.148 MSK [2927772] ERROR: invalid hypertable or continuous aggregate
      2021-01-21 17:16:32.148 MSK [2927772] STATEMENT: SELECT drop_chunks(1603462592,'history_str')
      2021-01-21 17:16:32.150 MSK [2927772] ERROR: invalid hypertable or continuous aggregate
      2021-01-21 17:16:32.150 MSK [2927772] STATEMENT: SELECT drop_chunks(1603462592,'history_log')
      2021-01-21 17:16:32.150 MSK [2927772] ERROR: invalid hypertable or continuous aggregate
      2021-01-21 17:16:32.150 MSK [2927772] STATEMENT: SELECT drop_chunks(1603462592,'history_uint')
      2021-01-21 17:16:32.151 MSK [2927772] ERROR: invalid hypertable or continuous aggregate
      2021-01-21 17:16:32.151 MSK [2927772] STATEMENT: SELECT drop_chunks(1603462592,'history_text')
      2021-01-21 17:16:32.151 MSK [2927772] ERROR: invalid hypertable or continuous aggregate
      2021-01-21 17:16:32.151 MSK [2927772] STATEMENT: SELECT drop_chunks(1579702592,'trends')
      2021-01-21 17:16:32.151 MSK [2927772] ERROR: invalid hypertable or continuous aggregate
      2021-01-21 17:16:32.151 MSK [2927772] STATEMENT: SELECT drop_chunks(1579702592,'trends_uint')
      2021-01-21 17:18:20.257 MSK [2917669] ERROR: permission denied for function pg_ls_waldir

      Expected:
      zabbix=# SELECT drop_chunks('history', 1611234923);
      drop_chunks
      -------------
      (0 rows)

      In TimeScaleDB docs https://docs.timescale.com/latest/api#drop_chunks we see:

      SELECT drop_chunks('conditions', INTERVAL '3 months');

      The first argument is a table, and second argument - interval.

      And in Zabbix source code we see:

      zabbix-5.2.3/src/zabbix_server/housekeeper/housekeeper.c:

      result = DBselect("SELECT drop_chunks(%d,'%s')", keep_from, rule->table);

      Here on the contrary, the first argument is a interval, and second argument - table.

       

      As result we get error:

      zabbix=# SELECT drop_chunks(1611234923,'history');
      ERROR: invalid hypertable or continuous aggregate

            ArtursL Arturs Lontons
            itspief Denis Pavlov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: