Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8268

Incorrect httptest.create step validation

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 2.2.4rc1, 2.3.1
    • None
    • API (A)

    Description

      Request:
      httptest.create with httpstepid and without name

      {
          "hostid": 10107,
          "name": "E7",
          "steps": [
              {
                  "httpstepid": 91,
                  "url": "1",
                  "status_codes": 200,
                  "no": 1
              }
          ]
      }
      

      Response:
      Item with key "web.test.in[E7,,bps]" already exists.

      {
          "jsonrpc": "2.0",
          "error": {
              "code": -32500,
              "message": "Application error.",
              "data": "Item with key \"web.test.in[E7,,bps]\" already exists.",
              "debug": [
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php",
                      "line": 113,
                      "function": "createStepsReal",
                      "class": "CHttpTestManager",
                      "type": "->",
                      "args": [
                          {
                              "hostid": 10108,
                              "name": "E7",
                              "steps": [
                                  {
                                      "httpstepid": 91,
                                      "url": "1",
                                      "status_codes": 200,
                                      "no": 1
                                  }
                              ],
                              "templateid": "38",
                              "httptestid": "39"
                          },
                          [
                              {
                                  "httpstepid": 91,
                                  "url": "1",
                                  "status_codes": 200,
                                  "no": 1
                              }
                          ]
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php",
                      "line": 592,
                      "function": "create",
                      "class": "CHttpTestManager",
                      "type": "->",
                      "args": [
                          [
                              {
                                  "hostid": 10108,
                                  "name": "E7",
                                  "steps": [
                                      {
                                          "httpstepid": 91,
                                          "url": "1",
                                          "status_codes": 200,
                                          "no": 1
                                      }
                                  ],
                                  "templateid": "38"
                              }
                          ],
                          true
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php",
                      "line": 319,
                      "function": "save",
                      "class": "CHttpTestManager",
                      "type": "->",
                      "args": [
                          [
                              {
                                  "hostid": 10108,
                                  "name": "E7",
                                  "steps": [
                                      {
                                          "httpstepid": 91,
                                          "url": "1",
                                          "status_codes": 200,
                                          "no": 1
                                      }
                                  ],
                                  "templateid": "38"
                              }
                          ]
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\managers\\CHttpTestManager.php",
                      "line": 59,
                      "function": "inherit",
                      "class": "CHttpTestManager",
                      "type": "->",
                      "args": [
                          [
                              {
                                  "hostid": 10107,
                                  "name": "E7",
                                  "steps": [
                                      {
                                          "httpstepid": 91,
                                          "url": "1",
                                          "status_codes": 200,
                                          "no": 1
                                      }
                                  ],
                                  "httptestid": "38"
                              }
                          ]
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\classes\\CHttpTest.php",
                      "line": 294,
                      "function": "persist",
                      "class": "CHttpTestManager",
                      "type": "->",
                      "args": [
                          [
                              {
                                  "hostid": 10107,
                                  "name": "E7",
                                  "steps": [
                                      {
                                          "httpstepid": 91,
                                          "url": "1",
                                          "status_codes": 200,
                                          "no": 1
                                      }
                                  ]
                              }
                          ]
                      ]
                  },
                  {
                      "function": "create",
                      "class": "CHttpTest",
                      "type": "->",
                      "args": [
                          {
                              "hostid": 10107,
                              "name": "E7",
                              "steps": [
                                  {
                                      "httpstepid": 91,
                                      "url": "1",
                                      "status_codes": 200,
                                      "no": 1
                                  }
                              ]
                          }
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\rpc\\class.czbxrpc.php",
                      "line": 120,
                      "function": "call_user_func",
                      "args": [
                          [
                              {},
                              "create"
                          ],
                          {
                              "hostid": 10107,
                              "name": "E7",
                              "steps": [
                                  {
                                      "httpstepid": 91,
                                      "url": "1",
                                      "status_codes": 200,
                                      "no": 1
                                  }
                              ]
                          }
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\rpc\\class.czbxrpc.php",
                      "line": 72,
                      "function": "callAPI",
                      "class": "czbxrpc",
                      "type": "::",
                      "args": [
                          "httptest.create",
                          {
                              "hostid": 10107,
                              "name": "E7",
                              "steps": [
                                  {
                                      "httpstepid": 91,
                                      "url": "1",
                                      "status_codes": 200,
                                      "no": 1
                                  }
                              ]
                          }
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api\\rpc\\class.cjsonrpc.php",
                      "line": 71,
                      "function": "call",
                      "class": "czbxrpc",
                      "type": "::",
                      "args": [
                          "httptest.create",
                          {
                              "hostid": 10107,
                              "name": "E7",
                              "steps": [
                                  {
                                      "httpstepid": 91,
                                      "url": "1",
                                      "status_codes": 200,
                                      "no": 1
                                  }
                              ]
                          },
                          "c13d0098c517035dc324a2a5cfe75113"
                      ]
                  },
                  {
                      "file": "C:\\xampp\\htdocs\\ZBX-8195\\frontends\\php\\api_jsonrpc.php",
                      "line": 50,
                      "function": "execute",
                      "class": "CJSONrpc",
                      "type": "->",
                      "args": []
                  }
              ]
          },
          "id": 28
      }
      

      In 2.2 - incorrect error message, in 2.3 undefined index in frontend

      Moved from ZBX-8195

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oleg.egorov Oleg Egorov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: