XMLWordPrintable

    Details

    • Type: Change Request (Sub-task)
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Frontend (F)
    • Environment:
      ZABBIX 1.8 & Trunk

      Description

      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)

        Attachments

        1. curl-follow.patch
          9 kB
        2. curl-follow-2.patch
          10 kB
        3. curl-follow-3.patch
          10 kB
        4. curl-follow-4.patch
          10 kB
        5. curl-follow-5.patch
          10 kB
        6. curl-follow-6.patch
          10 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jfischer J. Fischer
              Votes:
              8 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: