ChuanFF opened a new issue, #10633: URL: https://github.com/apache/apisix/issues/10633
### Current Behavior When the upstream node status is most healthy, the Prometheus plugin considers it to be unhealthy (0), but apisix balancer considers it to be healthy. as shown below,balancer think upstream node is healthy when its status is "mostly_healthy" or "healthy": https://github.com/apache/apisix/blob/master/apisix/balancer.lua#L78 https://github.com/api7/lua-resty-healthcheck/blob/master/lib/resty/healthcheck.lua#L690 prometheus think node is healthy when its status is “healthy” https://github.com/apache/apisix/blob/master/apisix/plugins/prometheus/exporter.lua#L478 ### Expected Behavior In the promethus plugin, the upstream node status value is 1 when the state is "mostly_healthy" ### Error Logs _No response_ ### Steps to Reproduce 1. create upsrtream(node num >2) & route 2. request the route to trigger healthcheck 3. check value in prometheus page,when upstream node status is “mostly_healthy”, its value will be 0 in the page ### Environment - APISIX version (run `apisix version`): 2.13.1 - Operating system (run `uname -a`): Linux pekshcsitd54867 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):nginx version: openresty/1.21.4.1 - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):{"boot_time":1702293248,"version":"2.13.1","etcd_version":"3.5.0","id":"aa6db183-43e6-4f8d-a86d-6ed48e76dbaa","hostname":"pekshcsitd54867"} - APISIX Dashboard version, if relevant: - Plugin runner version, for issues related to plugin runners: - LuaRocks version, for installation issues (run `luarocks --version`): -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
