You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/29 07:33:09 UTC
[GitHub] [apisix] Waylonwhynot opened a new issue #5154: v1/healthcheck 接口返回信息不全
Waylonwhynot opened a new issue #5154:
URL: https://github.com/apache/apisix/issues/5154
### Issue description
使用场景:当成7层LB替代Nginx使用
目前问题:所有upstream上游都配置了主动检查(tcp检测),但是通过GET v1/healthcheck 只返回了其中一组upstream状态信息。
### Expected behavior
需求:想要类似于Nginx的check_status页面,实时查看所有upstream的状态,或者暴露个接口也可以,但是目前看提供出来的接口返回upstream信息是不全的。
### How to Reproduce
类似方式配置了5-6个站点
上游配置:
nodes:
- host: 10.15.0.5
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: /
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: itsm
desc: itsm系统
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
路由配置:
{
"uri": "/*",
"name": "ITSM-internal",
"desc": "ip白名单",
"priority": 1,
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"host": "paas.test.com",
"plugins": {
"ip-restriction": {
"disable": false,
"whitelist": [
"127.0.0.1",
"10.8.255.0/24",
"10.240.0.0/16"
]
},
"prometheus": {
"disable": false
},
"redirect": {
"http_to_https": true
}
},
"upstream_id": "374045906003034680",
"status": 1
}
### Screenshots
[https://user-images.githubusercontent.com/42118870/135215370-6f6e98f9-d1e5-4af0-bde8-f4ade7f4fed1.jpg](url)
[https://user-images.githubusercontent.com/42118870/135215383-d1b60d64-e7fe-413d-83c0-2a1ae233e9d7.png](url)
[https://user-images.githubusercontent.com/42118870/135215370-6f6e98f9-d1e5-4af0-bde8-f4ade7f4fed1.jpg](url)
### Environment
- apisix version (cmd: `apisix version`): 2.9
- OS (cmd: `uname -a`): centos7
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 1.19.9.1
- etcd version, if have (cmd: run `etcd --version`): 3.4.15
- apisix-dashboard version, if have:v2.8
### Additional context
_No response_
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jagerzhang commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
jagerzhang commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930904680
> I see that your upstream-1 has only one node, if there is only one node in the upstream, there will be no health check. Because the request will be sent upstream whether that unique node is healthy or not.
>
> see: https://github.com/apache/apisix/blob/master/docs/zh/latest/health-check.md#upstream-%E7%9A%84%E5%81%A5%E5%BA%B7%E6%A3%80%E6%9F%A5
Reasonable design
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929982150
see: https://github.com/apache/apisix/blob/cd97d827abf6791611ce355b12555531dbd7b53d/docs/zh/latest/control-api.md#get-v1healthcheck
用户也可以通过 /v1/healthcheck/$src_type/$src_id 来获取指定 health checker 的状态。
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929919009
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot edited a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot edited a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930018111
> 你能展示一下什么是极简配置吗?缺少什么数据?这样我就可以繁殖了。
>
> 从上面可以看出健康检查中只有一台主机。
I mean I configured a lot of upstreams and associated them with the route. But v1/healthcheck only show one of the upstreams status.
> For example:
(upstream-1)
`
nodes:
- host: 10.15.0.5
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: /
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: itsm
desc: itsm系统
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
`
(route-1)
`
uri: /*
name: ITSM-internal
desc: ip白名单
priority: 1
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: paas.jiduauto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374045906003034680'
status: 1
`
(upstream-2)
`
nodes:
- host: 10.10.38.27
port: 80
weight: 1
- host: 10.10.38.28
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: ''
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: OA-pc
desc: OA prod pc
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
`
(route-2)
`
uri: /*
name: OA-internal
desc: ip白名单
priority: 11
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: team.auto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374498014460379704'
status: 1
`
When I get the admin control API v1/healthcheck, I want to see all upstreams healthcheck information
![接口返回信息](https://user-images.githubusercontent.com/42118870/135244898-ba8087be-29b3-40c3-ab7e-fec6053d84fc.jpg)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930060551
I will check it.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929993563
You can show what the minimalist configuration is? What data is missing? This way I can reproduce.
From the above I see that there is only one host in the health check.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929919009
is https://github.com/apache/apisix/issues/5082 same as your issue?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot edited a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot edited a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930018111
> 你能展示一下什么是极简配置吗?缺少什么数据?这样我就可以繁殖了。
>
> 从上面可以看出健康检查中只有一台主机。
I mean I configured a lot of upstreams and associated them with the route. But v1/healthcheck only show one of the upstreams status.
> For example:
(upstream-1)
`
nodes:
- host: 10.15.0.5
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: /
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: itsm
desc: itsm系统
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
`
(route-1)
`
uri: /*
name: ITSM-internal
desc: ip白名单
priority: 1
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: paas.jiduauto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374045906003034680'
status: 1
`
(upstream-2)
`
nodes:
- host: 10.10.38.27
port: 80
weight: 1
- host: 10.10.38.28
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: ''
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: OA-pc
desc: OA prod pc
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
`
(route-2)
`
uri: /*
name: OA-internal
desc: ip白名单
priority: 11
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: team.auto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374498014460379704'
status: 1
`
When I get the admin control API v1/healthcheck, I want to see all upstreams information
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot edited a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot edited a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930018111
> 你能展示一下什么是极简配置吗?缺少什么数据?这样我就可以繁殖了。
>
> 从上面可以看出健康检查中只有一台主机。
I mean I configured a lot of upstreams and associated them with the route. But v1/healthcheck only show one of the upstreams status.
> For example:
(upstream-1)
```
nodes:
- host: 10.15.0.5
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: /
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: itsm
desc: itsm系统
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
```
(route-1)
```
uri: /*
name: ITSM-internal
desc: ip白名单
priority: 1
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: paas.jiduauto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374045906003034680'
status: 1
```
(upstream-2)
```
nodes:
- host: 10.10.38.27
port: 80
weight: 1
- host: 10.10.38.28
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: ''
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: OA-pc
desc: OA prod pc
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
```
(route-2)
```
uri: /*
name: OA-internal
desc: ip白名单
priority: 11
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: team.auto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374498014460379704'
status: 1
```
When I get the admin control API v1/healthcheck, I want to see all upstreams healthcheck information
![接口返回信息](https://user-images.githubusercontent.com/42118870/135244898-ba8087be-29b3-40c3-ab7e-fec6053d84fc.jpg)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930992027
@Waylonwhynot If there are no other questions, I will close this issue.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929972631
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930018111
> 你能展示一下什么是极简配置吗?缺少什么数据?这样我就可以繁殖了。
>
> 从上面可以看出健康检查中只有一台主机。
I mean I configured a lot of upstreams and associated them with the route. But v1/healthcheck only show one of the upstreams status.
> For example:
(upstream-1)
`nodes:
- host: 10.15.0.5
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: /
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: itsm
desc: itsm系统
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320`
(route-1)
`uri: /*
name: ITSM-internal
desc: ip白名单
priority: 1
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: paas.jiduauto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374045906003034680'
status: 1`
(upstream-2)
`nodes:
- host: 10.10.38.27
port: 80
weight: 1
- host: 10.10.38.28
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: ''
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: OA-pc
desc: OA prod pc
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
`
(route-2)
`{
"uri": "/*",
"name": "OA-internal",
"desc": "ip白名单",
"priority": 11,
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"host": "team.auto.com",
"plugins": {
"ip-restriction": {
"disable": false,
"whitelist": [
"127.0.0.1",
"10.8.255.0/24",
"10.240.0.0/16"
]
},
"prometheus": {
"disable": false
},
"redirect": {
"http_to_https": true
}
},
"upstream_id": "374498014460379704",
"status": 1
}
`
When I get the admin control API v1/healthcheck, I want to see all upstreams information
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929972631
> is #5082 same as your issue?
Yep, but it didn't solve my problem. I want to see the status of the active health check in real time
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass edited a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass edited a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930305151
I see that your upstream-1 has only one node, if there is only one node in the upstream, there will be no health check. Because the request will be sent upstream whether that unique node is healthy or not.
see: https://github.com/apache/apisix/blob/master/docs/zh/latest/health-check.md#upstream-%E7%9A%84%E5%81%A5%E5%BA%B7%E6%A3%80%E6%9F%A5
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot edited a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot edited a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930018111
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass removed a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass removed a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929982150
see: https://github.com/apache/apisix/blob/cd97d827abf6791611ce355b12555531dbd7b53d/docs/zh/latest/control-api.md#get-v1healthcheck
用户也可以通过 /v1/healthcheck/$src_type/$src_id 来获取指定 health checker 的状态。
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Waylonwhynot edited a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
Waylonwhynot edited a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930018111
> 你能展示一下什么是极简配置吗?缺少什么数据?这样我就可以繁殖了。
>
> 从上面可以看出健康检查中只有一台主机。
I mean I configured a lot of upstreams and associated them with the route. But v1/healthcheck only show one of the upstreams status.
> For example:
(upstream-1)
```
nodes:
- host: 10.15.0.5
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: /
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: itsm
desc: itsm系统
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
```
(route-1)
```
uri: /*
name: ITSM-internal
desc: ip白名单
priority: 1
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: paas.auto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374045906003034680'
status: 1
```
(upstream-2)
```
nodes:
- host: 10.10.38.27
port: 80
weight: 1
- host: 10.10.38.28
port: 80
weight: 1
timeout:
connect: 6
send: 6
read: 6
type: roundrobin
checks:
active:
concurrency: 10
healthy:
http_statuses:
- 200
- 302
interval: 1
successes: 2
http_path: ''
timeout: 1
type: tcp
unhealthy:
http_failures: 5
http_statuses:
- 429
- 404
- 500
- 501
- 502
- 503
- 504
- 505
interval: 1
tcp_Failures: 2
timeouts: 3
scheme: http
pass_host: pass
name: OA-pc
desc: OA prod pc
keepalive_pool:
idle_timeout: 60
requests: 1000
size: 320
```
(route-2)
```
uri: /*
name: OA-internal
desc: ip白名单
priority: 11
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
- OPTIONS
- CONNECT
- TRACE
host: team.auto.com
plugins:
ip-restriction:
disable: false
whitelist:
- 127.0.0.1
- 10.8.255.0/24
- 10.240.0.0/16
prometheus:
disable: false
redirect:
http_to_https: true
upstream_id: '374498014460379704'
status: 1
```
When I get the admin control API v1/healthcheck, I want to see all upstreams healthcheck information,but the interface only returns one of these messages, The message I want to return like this:
```
[
{
"healthy_nodes": [
{
"host": "10.10.38.28",
"port": 80,
"priority": 0,
"weight": 1
},
{
"host": "10.10.38.27",
"port": 80,
"priority": 0,
"weight": 1
}
],
"name": "upstream#/apisix/upstreams/374498014460379704",
"nodes": [
{
"host": "10.10.38.28",
"port": 80,
"priority": 0,
"weight": 1
},
{
"host": "10.10.38.27",
"port": 80,
"priority": 0,
"weight": 1
}
],
"src_id": "374498014460379704",
"src_type": "upstreams"
},
{
"healthy_nodes": [
{
"host": "10.15.0.5",
"port": 80,
"priority": 0,
"weight": 1
}
],
"name": "upstream#/apisix/upstreams/xxxx",
"nodes": [
{
"host": "10.15.0.5",
"port": 80,
"priority": 0,
"weight": 1
}
],
"src_id": "xxx",
"src_type": "upstreams"
},
..........
]
```
![接口返回信息](https://user-images.githubusercontent.com/42118870/135244898-ba8087be-29b3-40c3-ab7e-fec6053d84fc.jpg)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5154:
URL: https://github.com/apache/apisix/issues/5154
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass removed a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass removed a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-929982150
see: https://github.com/apache/apisix/blob/cd97d827abf6791611ce355b12555531dbd7b53d/docs/zh/latest/control-api.md#get-v1healthcheck
用户也可以通过 /v1/healthcheck/$src_type/$src_id 来获取指定 health checker 的状态。
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass edited a comment on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass edited a comment on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930305151
I see that your upstream-1 has only one node, if there is only one node in the upstream, there will be no health check. Because the request will be sent upstream whether that unique node is healthy or not.
see: https://github.com/apache/apisix/blob/master/docs/zh/latest/health-check.md#upstream-%E7%9A%84%E5%81%A5%E5%BA%B7%E6%A3%80%E6%9F%A5
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #5154: v1/healthcheck 接口返回信息不全
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5154:
URL: https://github.com/apache/apisix/issues/5154#issuecomment-930305151
I see that your upstream-1 has only one node, if there is only one node in the upstream, there will be no health check. Because the request will be sent upstream whether that unique node is healthy or not.
see: https://github.com/apache/apisix/blob/cd97d827abf6791611ce355b12555531dbd7b53d/docs/zh/latest/health-check.md
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org