-
Problem report
-
Resolution: Duplicate
-
Trivial
-
None
-
5.2.3
-
None
-
Cent OS 8, Zabbix 5.2.3, PostgreSQL 12.5, TimeScaleDB 2.0.0
Steps to reproduce:
- Install Zabbix Server 5.2.3, PostgreSQL 12.5, TimeScaleDB according zabbix and timescaledb docs;
- Create hypertables according https://www.zabbix.com/documentation/current/manual/appendix/install/timescaledb;
- Enable Housekeeping;
- 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
- duplicates
-
ZBX-18854 TimescaleDB 2.0 changes are not compatible with Zabbix
- Closed