xyz2b commented on issue #4417: URL: https://github.com/apache/apisix/issues/4417#issuecomment-860733848
client request  apisix route config ```shell { "uris": [ "/*" ], "name": "aomp-web", "methods": [ "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE" ], "hosts": [ "sit.aomp.weoa.com" ], "remote_addrs": [ "0.0.0.0/0" ], "service_id": "357764672524387208", "labels": { "API_VERSION": "v1", "env": "sit", "subsystem": "aomp-web", "system": "aomp" }, "status": 1 } ``` apisix upstream config ```shell { "name": "aomp-web", "desc": "sit", "upstream": { "nodes": [ { "host": "172.16.144.101", "port": 8086, "weight": 50 }, { "host": "172.16.144.104", "port": 8086, "weight": 50 } ], "timeout": { "connect": 600, "read": 600, "send": 600 }, "type": "roundrobin", "checks": { "active": { "concurrency": 10, "healthy": { "http_statuses": [ 200, 302, 301 ], "interval": 1, "successes": 2 }, "host": "sit.aomp.weoa.com", "http_path": "/", "port": 8086, "timeout": 10, "type": "http", "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" } } ``` apisix access log in local file ```shell {"@timestamp":"2021-06-14T22:18:41+08:00","@source":"10.107.97.180","remote_addr":"10.36.32.54","remote_user":"","bytes_sent":"1363","request_time":"0.089","status":"200","host":"sit.aomp. weoa.com","uri":"/login/","server":"_","port":"9080","upstream_connect_time":"0.038","protocol":"HTTP/1.1","upstream_status":"200","request_uri":"/login/?next=/","content_type":"","request _method":"GET","body_bytes_sent":"1189","http_x_forwarded_for":"10.36.32.54","http_user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0 .4389.90 Safari/537.36","upstream_response_time":"0.089","upstream_addr":"172.16.144.101:8086"} ``` apisix access log in elastic ```shell { "_index": "nginx-log-2021.06.14", "_type": "doc", "_id": "zvrjCnoBS4SRzeIbwqcK", "_version": 1, "_score": null, "_source": { "route_name": "aomp-web", "status": "200", "service_id": "357764672524387208", "upstream_response_time": 0.089, "bytes_sent": 1363, "@source": "10.107.97.180", "@version": "1", "service_name": "aomp-web", "request_time": 0.089, "port": "9080", "upstream_connect_time": 0.038, "@timestamp": "2021-06-14T14:18:41.000Z", "host": "10.107.97.180", "upstream_addr": "172.16.144.101:8086", "http_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36", "headers": { "request_path": "/log?", "content_length": "15554", "http_version": "HTTP/1.1", "http_host": "10.107.97.123", "content_type": "application/json", "http_user_agent": "lua-resty-http/0.14 (Lua) ngx_lua/10019", "http_accept": null, "request_method": "POST" }, "request_method": "GET", "server": "_", "route_id": "357768367756542856", "uri": "/login/", "body_bytes_sent": 1189, "http_x_forwarded_for": "10.36.32.54", "upstream_status": "200", "protocol": "HTTP/1.1", "request_uri": "/login/?next=/", "remote_addr": "10.36.32.54" }, "fields": { "@timestamp": [ "2021-06-14T14:18:41.000Z" ] }, "highlight": { "remote_addr": [ "@[email protected]@/kibana-highlighted-field@" ], "route_name": [ "@kibana-highlighted-field@aomp@/kibana-highlighted-field@-@kibana-highlighted-field@web@/kibana-highlighted-field@" ] }, "sort": [ 1623680321000 ] } ``` -- 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]
