[ZBX-9892] web.page.get inserts incorrect data in webpage content Created: 2015 Sep 20  Updated: 2020 Sep 28

Status: Reopened
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 3.0.0alpha2
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: richlv Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: web.page.get, webcheck
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBXNEXT-1816 Use Curl for the agent's web.page items Closed

 Description   

a simple test against zabbix.com with web.page.get :

zabbix_get -s 127.0.0.1 -k 'web.page.get[www.zabbix.com]' > zcom_get.html
wget www.zabbix.com -O zcom_wget.html
diff zcom_wget.html zcom_get.html

ignoring the header being present in zabbix agent output, agent output also includes incorrect data in the middle of the page several times. for example,

<div class="clearfix"><div class="logo">

becomes

<div class="clearfix">
203e
<div class="logo">


 Comments   
Comment by Viktors Tjarve [ 2015 Sep 24 ]

duplicates https://support.zabbix.com/browse/ZBXNEXT-1816

Comment by Aleksandrs Saveljevs [ 2015 Sep 25 ]

So the problem is that the Web server sends content with "Transfer-Encoding: chunked" and our simple Web page getter does not understand that - it simply reads whatever the server has sent unchanged.

Two workaround ideas were thought of:

  1. In the request, specify "Accept-Encoding: " header. However, it does not seem to have any effect on our server.
  2. In the request, specify HTTP 1.0 instead of HTTP 1.1. This seems work, but the exact (potentially far-reaching) consequences of using HTTP 1.0 are unknown.
Comment by Alexander Vladishev [ 2015 Oct 08 ]

Closing as duplicate of ZBXNEXT-1816

Comment by richlv [ 2016 May 13 ]

given that ZBXNEXT-1816 got abandoned, reopening this one - let's close it when it's fixed. otherwise somebody searching for open issues about this topic won't find it.

Comment by Andrew Boling [ 2020 Sep 28 ]

I just ran into this one as well. A Java upgrade in one of my environments altered the webserver behavior for the Jolokia JVM agent, and it now uses a chunked transfer encoding by default. This broke all of our web.page.get monitors that were running against Jolokia, and unless I can find a way to tell Java to not use chunked encoding I see no way of fixing this. The item configuration does not allow Zabbix admins to force HTTP 1.0, so the only real workaround is to create a custom UserParameter that wraps curl.

I understand that there is a preference among Zabbix developers for users to leverage the more robust HTTP agent functionality that runs on the Server and Proxy components, but as I've stated in other tickets it isn't always preferable to open firewall holes in the direction of the monitored webserver.

Generated at Fri May 09 07:47:34 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.