-
Documentation task
-
Resolution: Unresolved
-
Trivial
-
6.0.40
-
Windows, Zabbix Agent, Zabbix Agent 2
-
Documentation backlog
-
1
Steps to reproduce:
- Create a script for metadata that output a multiline string (CLRF or LF does not seems to matter)
- Set it as a HostMetadataItem
- Set Agent debug to 4 (to have debug logs)
- Stop/Start the agent
- Look at the logs, you will see that the metadata are truncated at the first line, Change to remove the linebreaks, data is sent correctly.
Result:
Linebreak truncate the full output of metadata string.
Log with linebreak
4312:20250624:030739.444 execute_str() command:'powershell -File "C:\Program Files\Zabbix Agent\lib\metadata.ps1"' len:47 cmd_result:'031host=win-aerian' 4312:20250624:030739.445 In connect_to_server() [10.5.0.30]:10051 [timeout:15, connection timeout:15] 4312:20250624:030739.447 In is_ip4() ip:'10.5.0.30' 4312:20250624:030739.448 End of is_ip4():SUCCEED 4312:20250624:030739.449 sending [\{"request":"active checks","host":"WIN-3URONAUFGJ5-aerian","host_metadata":"031"}] 4312:20250624:030739.450 before read 4312:20250624:030739.464 got [{"response":"success","data":[]}]
Logs without
5508:20250624:030627.553 execute_str() command:'powershell -File "C:\Program Files\Zabbix Agent\lib\metadata.ps1"' len:47 cmd_result:'031 host=win-aerian ' 5508:20250624:030627.554 In connect_to_server() [10.5.0.30]:10051 [timeout:15, connection timeout:15] 5508:20250624:030627.556 In is_ip4() ip:'10.5.0.30' 5508:20250624:030627.557 End of is_ip4():SUCCEED 5508:20250624:030627.558 sending [\\{"request":"active checks","host":"WIN-3URONAUFGJ5-aerian","host_metadata":"031 host=win-aerian refapp=aerian templates=win"}]
Expected:
This should be managed as in Linux agent: Linebreak should not break the metadata.