-
Change Request (Sub-task)
-
Resolution: Duplicate
-
Minor
-
None
-
None
-
ZABBIX 1.8 & Trunk
I noticed the other day that a 301 or 302 redirect in the WEB monitoring module can never be evaluated, since the "CURLOPT_FOLLOWLOCATION" is statically set to "1". This means, that whenever the WEB monitoring encounters a 301, it will follow that redirect and ultimately return the HTTP response of the target destination.
This behavior is counter-intuitive and confusing and at least should be documented.
I have written a patch (currently applies against 1.8 and Trunk) that makes this option configurable from the GUI, on a per-step basis. This patch introduces a new checkbox, "Follow", in the WEB scenario's step configuration. If the checkbox is set, CURL will behave like it does right now (i.e. follow HTTP redirects). If the checkbox is unset, CURL will not follow the redirect and instead return the appropriate HTTP response code for the check (i.e. 301, 302). The default setting for "Follow" when creating a new step is "On", so it will not break current behavior for most users even when the option is overseen.
Prerequisites for the patch is a minor change into database table "httpstep":
ALTER TABLE httpstep ADD COLUMN (follow TINYINT(1) DEFAULT 1 NOT NULL)
- duplicates
-
ZBXNEXT-282 Setting http headers
- Closed
- is duplicated by
-
ZBXNEXT-2227 Curl Max Redirects Option
- Reopened
-
ZBX-3485 Web Monitoring stalls on a redirect loop
- Closed
-
ZBX-7529 Web scenario login don't work correctly
- Closed
-
ZBX-6750 look like there is a limitation of curl redirection
- Closed