HTTP Agent and JSON output of HTTP Status

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 8.0.0alpha2
    • Component/s: Proxy (P), Server (S)
    • None
    • Environment:
      any

      From reading the manual, I see a suggestion to scrape the result from the HTTP Agent status code and wait for a "200" while discarding the OK using regular expression with "HTTP\/1.1 ([0-9]+)" and that will also apply for HTTP/2 – You should collect the Headers in "non-JSON mode"

      If you add a HTTP agent and use the following:


      It would be reasonable to expect a JSON that contains on the header the HTTP status code for the request with something like:

      "HTTP/1.1":200
      "HTTP/2":200
      "HTTP":200

      Any of these variants would be nice, but what you will get is:

      "HTTP/2 200": "",
      And that's not really usable, because if there are any changes on the result code , where they are not 200, the items will immediately break.

      Besides the suggestion I made above to make a reasonable digestion of the HTTP result code to JSON, I would also suggest to make this differences known in the documentation as this is quite unclear (and IMHO buggy)

      It is also important to note that, in the documentation it is shown that the result expected is "OK (200)" and that is also not correct, by the example, it should be 200 only. It will only appear as "OK " if you use the Value Mapping, which might not be present in a new template.

            Assignee:
            Zabbix Support Team
            Reporter:
            jchegedus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: