idbeta opened a new issue #2746:
URL: https://github.com/apache/apisix/issues/2746


   ### Issue description
   how could I only enable passive health check?
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): master
   * OS:
   
   I did like this, but not working
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/index.html",
       "plugins": {
           "limit-count": {
               "count": 2,
               "time_window": 60,
               "rejected_code": 503,
               "key": "remote_addr"
           }
       },
       "upstream": {
            "nodes": {
               "127.0.0.1:1980": 1,
               "127.0.0.1:1970": 1
           },
           "type": "roundrobin",
           "retries": 2,
           "checks": {
               "passive": {
                   "healthy": {
                       "http_statuses": [200, 201],
                       "successes": 3
                   },
                   "unhealthy": {
                       "http_statuses": [500],
                       "http_failures": 3,
                       "tcp_failures": 3
                   }
               }
           }
       }
   }'
   ```
   return
   ```
   {"error_msg":"invalid configuration: property \"upstream\" validation 
failed: property \"checks\" validation failed: object matches none of the 
requireds: [\"active\"] or [\"active\",\"passive\"]"}
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to