[ZBX-18902] Zabbix Housekeeper 5.2.3 not working with TimeScaleDB 12.0.0 Created: 2021 Jan 21  Updated: 2021 Jan 27  Resolved: 2021 Jan 27

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 5.2.3
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Denis Pavlov Assignee: Arturs Lontons
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Cent OS 8, Zabbix 5.2.3, PostgreSQL 12.5, TimeScaleDB 2.0.0


Issue Links:
Duplicate
duplicates ZBX-18854 TimescaleDB 2.0 changes are not compa... Closed

 Description   

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



 Comments   
Comment by Edgar Akhmetshin [ 2021 Jan 27 ]

Closing as a duplicate: ZBX-18854.

Generated at Sun May 18 06:32:20 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.