My system:
- Red Hat 9.5
- Zabbix 7.0
- PostgreSQL v14.15
- TimescaleDB v2.17.1
In Zabbix PostgreSQL repository database server log file I see the following errors:
From error message "drop_chunks" function is executed from Zabbix, that is required to be hypertable or continues aggregate.
I have searched for hypertables:
and I get:
Tables "history_bin" and "auditlog" are not listed on above list of hypertables.
I have searched to see if those are tables or materialized view (continues aggregates in TimescaleDB language):
I get the list of ordinary tables:
Those two errors indicate that Zabbix expects "history_bin" and "auditlog" are expected to be TimecaleDB hypertables or continue aggregates, but it looks like there are just an ordinary base tables, so drop_chunk function fails.
I am afraid as negative consequence disk will get full, because old data are not cleansed with drop_chunk function.
What should I do to fix this issue?
- Red Hat 9.5
- Zabbix 7.0
- PostgreSQL v14.15
- TimescaleDB v2.17.1
In Zabbix PostgreSQL repository database server log file I see the following errors:
Code:
2025-01-31 09:41:10.531 [37971] ERROR: "history_bin" is not a hypertable or a continuous aggregate 2025-01-31 09:41:10.531 [37971] HINT: The operation is only possible on a hypertable or continuous aggregate. 2025-01-31 09:41:10.531 [37971] STATEMENT: select drop_chunks(relation=>'history_bin',older_than=>17 33128870) 2025-01-31 09:41:11.260 [37971] ERROR: "auditlog" is not a hypertable or a continuous aggregate 2025-01-31 09:41:11.260 [37971] HINT: The operation is only possible on a hypertable or continuous aggregate. 2025-01-31 09:41:11.260 [37971] STATEMENT: select drop_chunks(relation=>'auditlog',older_than=>17331 28870)
I have searched for hypertables:
Code:
select hypertable_schema || '.' || hypertable_name as hypertable, hypertable_size(hypertable_schema || '.' || hypertable_name) as hypertable_size, pg_size_pretty(hypertable_size(hypertable_schema || '.' || hypertable_name)) as hypertable_pretty_size from timescaledb_information.hypertables order by hypertable_size desc ;
hypertable | hypertable_size | hypertable_pretty_size
---------------------+-----------------+-----------------------
zabbix.history | 20816011264 | 19 GB
zabbix.history_uint | 17264852992 | 16 GB
zabbix.history_log | 6809673728 | 6494 MB
zabbix.trends_uint | 1515520000 | 1445 MB
zabbix.trends | 1084407808 | 1034 MB
zabbix.history_text | 308232192 | 294 MB
zabbix.history_str | 177315840 | 169 MB
---------------------+-----------------+-----------------------
zabbix.history | 20816011264 | 19 GB
zabbix.history_uint | 17264852992 | 16 GB
zabbix.history_log | 6809673728 | 6494 MB
zabbix.trends_uint | 1515520000 | 1445 MB
zabbix.trends | 1084407808 | 1034 MB
zabbix.history_text | 308232192 | 294 MB
zabbix.history_str | 177315840 | 169 MB
I have searched to see if those are tables or materialized view (continues aggregates in TimescaleDB language):
Code:
select table_schema, table_name, table_type
from information_schema.tables
where table_schema = 'zabbix' and table_name in ('history_bin', 'auditlog');
Code:
table_schema | table_name | table_type --------------+-------------+------------ zabbix | auditlog | BASE TABLE zabbix | history_bin | BASE TABLE
Those two errors indicate that Zabbix expects "history_bin" and "auditlog" are expected to be TimecaleDB hypertables or continue aggregates, but it looks like there are just an ordinary base tables, so drop_chunk function fails.
I am afraid as negative consequence disk will get full, because old data are not cleansed with drop_chunk function.
What should I do to fix this issue?
Comment