[ZBX-21118] Agent2 web.page.get incorrect data with chunked transfer encoding Created: 2022 May 26 Updated: 2024 Apr 10 Resolved: 2023 Nov 13 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G) |
Affects Version/s: | 5.0.23, 6.0.4 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Minor |
Reporter: | Lukas Sabla | Assignee: | Rudolfs Zvejs (Inactive) |
Resolution: | Won't fix | Votes: | 3 |
Labels: | agent2, web.page.get | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Ubuntu 20.04, zabbix-agent2=5.0.23-1+focal, zabbix-agent2=6.0.4-1+ubuntu20.04, nginx=1.21.3-1~focal |
Team: |
Description |
After migration to zabbix-agent2 we are facing old web.page.get issue, already fixed for zabbix_agentd: ZBX-9892. If chunked transfer encoding is enabled on the webserver, web.page.get gets response with chunk size data. Steps to reproduce: zabbix_agentd: (works correctly) zabbix_agentd -t 'web.page.get["localhost","ping","8085"]' web.page.get["localhost","ping","8085"] [t|HTTP/1.1 200 OK Server: nginx Date: Thu, 26 May 2022 16:05:08 GMT Content-Type: text/plain;charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Expires: Thu, 01 Jan 1970 00:00:00 GMT Cache-Control: no-cache, no-store, must-revalidate, max-age=0 Content-Encoding: gzip pong] zabbix_agent2: (does not work correctly) zabbix_agent2 -t 'web.page.get["localhost","ping","8085"]'
web.page.get["localhost","ping","8085"] [s|HTTP/1.1 200 OK Connection: close Transfer-Encoding: chunked Cache-Control: no-cache, no-store, must-revalidate, max-age=0 Content-Type: text/plain;charset=UTF-8 Date: Thu, 26 May 2022 16:06:45 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Server: nginx Vary: Accept-Encoding 4 pong 0]
After disabling chunked transfer encoding on nginx with chunked_transfer_encoding off; web.page.get works correctly. zabbix_agent2 -t 'web.page.get["localhost","ping","8085"]' web.page.get["localhost","ping","8085"] [s|HTTP/1.1 200 OK Connection: close Cache-Control: no-cache, no-store, must-revalidate, max-age=0 Content-Type: text/plain;charset=UTF-8 Date: Thu, 26 May 2022 16:12:10 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Server: nginx Vary: Accept-Encoding pong] You can also test with zabbix.com domain as zabbix_agent2 -t web.page.get[www.zabbix.com]/] This report may also be considered as duplicate of ZBX-20144.
|
Comments |
Comment by David Zumbrunnen [ 2022 Aug 17 ] |
We're having the same issue with version 6.0.7. We're parsing the JSON output of Apache Camel, which fails due to the two superfluous leading and trailing lines. $ zabbix_agent2 -t 'web.page.get["http://localhost:8778/jolokia/read/org.apache.camel:context=*,type=routes,name=*"]' web.page.get["http://localhost:8778/jolokia/read/org.apache.camel:context=*,type=routes,name=*"][s|HTTP/1.1 200 OK Transfer-Encoding: chunked Cache-Control: no-cache Content-Type: text/plain; charset=utf-8 Date: Wed, 17 Aug 2022 15:04:55 GMT Expires: Wed, 17 Aug 2022 14:04:55 GMT Pragma: no-cache 589a {...} 0] A fix would be greatly appreciated! |
Comment by David Zumbrunnen [ 2022 Aug 31 ] |
Bug is still present in 6.0.8 (1:6.0.8-1+ubuntu20.04) |
Comment by David Zumbrunnen [ 2022 Sep 23 ] |
Bug is still present in 6.0.9 (1:6.0.9-1+ubuntu20.04) |
Comment by David Zumbrunnen [ 2022 Nov 07 ] |
Bug is still present in 6.0.10 (1:6.0.10-1+ubuntu20.04) |
Comment by tfunk [ 2023 Jan 05 ] |
Bug is still present in 6.0.12, using zabbix-agent 2 on Oracle Linux 8.5. Same issue in my environment. Had to switch from zabbix-agent2 to zabbix-agent on the monitored servers to get around this. |
Comment by David Zumbrunnen [ 2023 Apr 18 ] |
Bug is still present in 6.0.16 (1:6.0.16-1+ubuntu20.04) |
Comment by David Zumbrunnen [ 2023 Jun 27 ] |
Bug is still present in 6.0.19 (1:6.0.19-1+ubuntu20.04) 😒 |
Comment by David Zumbrunnen [ 2023 Sep 05 ] |
Bug is still present in 6.0.21 (1:6.0.21-1+ubuntu20.04) |
Comment by Rudolfs Zvejs (Inactive) [ 2023 Oct 19 ] |
wont fixThe web.page.get metric correctly returns the request response in wire representation. For responses with Transfer-Encoding: chunked this means that chunks are not decoded and chunk lengths and (the hex numbers) transmission terminator charecters (the 0) mdn link |