You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using apisix response-rewrite to change the status code to 200, but the code in prometheus takes the upstream value 404. so the value of apisix_http_status in prometheus should distinguish between upstream_code and code. That is, one is the code returned by upstream, and the other is the code returned by apisix.
Operating system (run uname -a):Linux 4.19.0-4.el7.ucloud.x86_64 change: added doc of how to load plugin. #1 SMP Mon Dec 16 08:54:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
OpenResty / Nginx version (run openresty -V or nginx -V):nginx version: openresty/1.21.4.2
etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):{"hostname":"","boot_time":1711642728,"etcd_version":"3.5.0","version":"3.2.0","id":"710905a9-e853-4305-af4e-b2fd247fcb65"}
APISIX Dashboard version, if relevant:
Plugin runner version, for issues related to plugin runners:
LuaRocks version, for installation issues (run luarocks --version):
The text was updated successfully, but these errors were encountered:
Current Behavior
I'm using apisix response-rewrite to change the status code to 200, but the code in prometheus takes the upstream value 404. so the value of apisix_http_status in prometheus should distinguish between upstream_code and code. That is, one is the code returned by upstream, and the other is the code returned by apisix.
Expected Behavior
No response
Error Logs
[07/May/2024:15:40:34 +0800]|7921f83b9e523f23442d18a8578c5d51|0.019|10.100.250.113:19337|200|GET|http://ecs.example.com/fssc/02eb3863542e01fd9592400e906ce615.ico|HTTP/1.1|367|546|DIRECT/10.102.19.100:8080|application/json;charset=UTF-8|-|curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 libssh2/1.4.2|0.018|404|-|-|-|-|-|-|12880|17726|10|26832|OK|-
200 is apisix code
404 is upstream code
Steps to Reproduce
{
"uri": "/",
"name": "ecs.example.com_200",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE",
"PURGE"
],
"host": "ecs.example.com",
"plugins": {
"response-rewrite": {
"body": " ",
"status_code": 200
}
},
"upstream_id": "1369277",
"labels": {
"API_VERSION": "v1"
},
"status": 1
}
Environment
apisix version
):3.2.0uname -a
):Linux 4.19.0-4.el7.ucloud.x86_64 change: added doc of how to load plugin. #1 SMP Mon Dec 16 08:54:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linuxopenresty -V
ornginx -V
):nginx version: openresty/1.21.4.2curl http://127.0.0.1:9090/v1/server_info
):{"hostname":"","boot_time":1711642728,"etcd_version":"3.5.0","version":"3.2.0","id":"710905a9-e853-4305-af4e-b2fd247fcb65"}luarocks --version
):The text was updated successfully, but these errors were encountered: