-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 8.0.0
-
Component/s: Server (S)
-
None
Steps to reproduce:
- Set up Zabbix server 8.0.0 on PostgreSQL with TimescaleDB, and ClickHouse as history provider:
HistoryProvider=clickhouse;value_types="uint,dbl,str,log,text,json",url=http://<clickhouse>:8123,db=zabbix,username=zabbix,password=<...>
- Create the ClickHouse history tables with history_all.sh, e.g. with -t 31536000.
- Start Zabbix server. Open Administration -> Housekeeping. "ClickHouse data storage period" shows "52w 1d" for all value types. The setting contains the ClickHouse entry:
select value_str from settings where name='dbversion_status'; ... {"database":"ClickHouse","provider":"clickhouse",...,"value_types":[{"type":"dbl","ttl":31536000},...]} - Wait for the housekeeper to run (or trigger it with zabbix_server -R housekeeper_execute).
- Reload Administration -> Housekeeping.
Result:
"ClickHouse data storage period" shows "Unknown" for all value types (see screenshots). The ClickHouse entry is gone from dbversion_status; only the PostgreSQL and TimescaleDB entries remain. It stays that way until the server is restarted, and is lost again at the next housekeeper run.
Cause, as far as I can tell from the source (release/8.0):
- On startup zbx_history_check_version() (src/libs/zbxhistory/history.c) appends the history provider info, including value_types/ttl, to dbversion_status.
- With TimescaleDB, housekeeping_history_and_trends() calls hk_update_dbversion_status() (src/zabbix_server/housekeeper/housekeeper_server.c) on every run. It rebuilds the JSON from db_version_info only (SQL database and TimescaleDB) and writes it with zbx_db_flush_version_requirements(), which replaces the whole value and drops the history provider entry.
- The frontend (ZBase::initHistoryManager()) reads value_types/ttl from dbversion_status, finds none, and shows "Unknown". The same value is used in the item edit form.
History reading and writing are not affected; the TTL in ClickHouse itself is unchanged.
Expected:
The housekeeper keeps the history provider entries when it refreshes dbversion_status, so the ClickHouse storage period stays visible after housekeeper runs.