[ZBX-15971] Items using: "web.page.*" switch to unsupported when checked service is unavailable Created: 2019 Apr 10  Updated: 2024 Apr 10  Resolved: 2019 Jul 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 3.0.25
Fix Version/s: 4.0.11rc1, 4.2.5rc1, 4.4.0alpha1, 4.4 (plan)

Type: Problem report Priority: Critical
Reporter: Michał Kozłowski Assignee: Viktors Tjarve
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
caused by ZBX-13781 CRLF Injection in Zabbix Agentd Closed
Team: Team A
Sprint: Sprint 54 (Jul 2019)
Story Points: 0.25

 Description   

Steps to reproduce:

  1. Create item using web.page.get or web.page.regexp and configure checking of some working service (eg. localhost, YOUR_SERVICE:PORT, "REGEXP")
  2. Check that item is properly updated in zabbix.
  3. Stop your service.
  4. Check item value in zabbix.

Result:
Item will come unsupported with error message: 

"HTTP get error: cannot connect to [[localhost]:PORT]: [111] Connection refuse"

 
Expected:
Item should get empty string value (like it works in zabbix-agent with version 3.0.3)

 

Workaround:

Downgrade zabbix-agent to 3.0.3 version.



 Comments   
Comment by Arturs Lontons [ 2019 Apr 12 ]

Hi,

Thank you for reporting the issue.
I was able to replicate the same behavior. This is inconsistent with the behavior documented in https://www.zabbix.com/documentation/4.0/manual/config/items/itemtypes/zabbix_agent

Specifically:

Returns an empty string on fail. 

I'll be changing the type of this task to a documentation task and assigning it to our development team.

Comment by Michał Kozłowski [ 2019 Apr 24 ]

What does it mean "documentation task"? Will you treat it like a bug request?

Do you have plans to change that behavior in 3.x version?

Comment by Wesley Schaft [ 2019 Jun 27 ]

I'm also having this issue. According to the 4.2 documentation in https://www.zabbix.com/documentation/4.2/manual/config/items/itemtypes/zabbix_agent it should return an empty string on failure, but instead I get "ZBX_NOTSUPPORTED] [Cannot perform cURL request: Couldn't resolve host name."

I've tested it with several Agent versions:

zabbix_agentd (daemon) (Zabbix) 3.0.3
web.page.get[this.will.fail.com]              [t|]

zabbix_agentd (daemon) (Zabbix) 3.0.28
web.page.get[this.will.fail.com]              [m|ZBX_NOTSUPPORTED] [HTTP get error: cannot resolve [this.will.fail.com]]

zabbix_agentd (daemon) (Zabbix) 3.2.11
web.page.get[this.will.fail.com]              [t|]

zabbix_agentd (daemon) (Zabbix) 3.4.0
web.page.get[this.will.fail.com]              [t|]

zabbix_agentd (daemon) (Zabbix) 3.4.15
web.page.get[this.will.fail.com]              [m|ZBX_NOTSUPPORTED] [HTTP get error: cannot resolve [this.will.fail.com]]

zabbix_agentd (daemon) (Zabbix) 4.0.0
web.page.get[this.will.fail.com]              [m|ZBX_NOTSUPPORTED] [HTTP get error: cannot resolve [this.will.fail.com]]

zabbix_agentd (daemon) (Zabbix) 4.0.10
web.page.get[this.will.fail.com]              [m|ZBX_NOTSUPPORTED] [Cannot perform cURL request: Couldn't resolve host name.]

zabbix_agentd (daemon) (Zabbix) 4.2.0
web.page.get[this.will.fail.com]              [m|ZBX_NOTSUPPORTED] [HTTP get error: cannot resolve [this.will.fail.com]]

zabbix_agentd (daemon) (Zabbix) 4.2.4
web.page.get[this.will.fail.com]              [m|ZBX_NOTSUPPORTED] [Cannot perform cURL request: Couldn't resolve host name.]
Comment by Viktors Tjarve [ 2019 Jul 15 ]

Security improvements for items "web.page.*" where released in versions:

  • 2.2.22rc1
  • 3.0.17rc2
  • 3.4.9rc2
  • 4.0.0alpha6

Since then those items turn unsupported if the resource specified in the host parameter does not exist or is unavailable.
Updated documentation:

Thanks to mkozlowski for noticing and reporting the mismatch in the behavior and documentation.

Generated at Fri May 09 08:09:57 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.