-
Problem report
-
Resolution: Won't fix
-
Major
-
None
-
6.4.1
-
None
-
Fedora 36
While working on a feature implementation in the system.sw.packages{,.get} items, I found that the two agents differ when it comes to returning long string data. The C implementation appears to limit the response to 64kB of data, while the Go implementation does not impose any such limit.
% ./src/zabbix_agent/zabbix_agentd -f -c ~/zabbix_agentd.conf -t 'system.sw.packages[]' | wc -c 65584 % ./src/go/bin/zabbix_agent2 -f -c ~/zabbix_agent2.conf -t 'system.sw.packages[]' | wc -c 128525 % git sh Subject: .......... [ZBXNEXT-826] updated release date [6.4.1] Author: Sergejs Maklakovs <[email protected]> Committer: Sergejs Maklakovs <[email protected]> Signature: N Author date: Mon Apr 3 09:22:14 2023 +0300 [6 hours ago] Commit date: Mon Apr 3 09:22:14 2023 +0300 [6 hours ago] Parent(s): 8368c02a > (HEAD -> release/6.4, origin/release/6.4, origin/feature/DEV-2437-6.4) Commit: 546e284f Tree: 7bce8e8c
The item returns a string:
% ./src/go/bin/zabbix_agent2 -f -c ~/zabbix_agent2.conf -t 'system.sw.packages[,rpm]' system.sw.packages[,rpm] [s|...
Which consists of a package manager prefix, and a list of comma separated package identifiers.
system.sw.packages[,rpm] [s|[rpm] Box2D-2.4.1-8.fc37.x86_64, GConf2-3.2.6-36.fc37.x86_64 ...
This size limit results in the response being truncated, disregarding any item boundaries
system.sw.packages[,rpm] [s|[rpm] Box2D-2.4.1-8.fc37.x86_64, GConf2-3.2.6-36.fc37.x86_64 ... libxml2-devel-2.10.3-2.fc37.x86_64, libxmlb-0.3.11-1.fc37.x86_64, libxshmfence-1.3-11.fc37.i686, libxshmfence-1.3-11.fc37.x86_64, libxslt-1.1.37-1.fc37.x86_64, libxslt-devel-1.1.37-1.fc37.x86_64, libyaml-0.2.5-8.fc37.x86_64, libytnef-2.0-2.fc]