From 7525387b7a025b02e42f549807326eede17111b4 Mon Sep 17 00:00:00 2001 From: Andreas Hilbig Date: Sun, 22 Feb 2026 13:52:26 +0100 Subject: [PATCH] fix: extend impliedFields map and improve lastclock validation for Zabbix items - Added `items.lastclock` and `items.lastvalue` to the implied fields for `state`. - Enhanced conversion to ensure `lastclock` is neither 0 nor "0" while checking if history value needs to be retrieved. --- src/datasources/zabbix-hosts.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/datasources/zabbix-hosts.ts b/src/datasources/zabbix-hosts.ts index 1aa6b6b..8434925 100644 --- a/src/datasources/zabbix-hosts.ts +++ b/src/datasources/zabbix-hosts.ts @@ -114,7 +114,7 @@ export class ZabbixQueryHostsGenericRequestWithItemsresult; for (let device of hosts) { for (let item of device.items || []) { - if (!item.lastclock) { + if (!item.lastclock || !Number(item.lastclock)) { let values = await new ZabbixQueryHistoryRequest(this.authToken, this.cookie).executeRequestReturnError( zabbixAPI, new ZabbixHistoryGetParams(item.itemid, ["clock", "value", "itemid"], 1, item.value_type)) if (isZabbixErrorResult(values)) {