[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: |
|
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 ] |
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:
|
Comment by Alexander Vladishev [ 2015 Oct 08 ] |
Closing as duplicate of |
Comment by richlv [ 2016 May 13 ] |
given that |
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. |