What is istio-proxy access log mean?

前端 未结 3 446
甜味超标
甜味超标 2021-01-07 06:41

I am trying to troubleshoot my service by looking at the istio-proxy access log (it logs every access). However, I can\'t find any documentation that explains the meaning of

3条回答
  •  灰色年华
    2021-01-07 07:01

    Istio proxy access log's configuration is defined as part of envoy.http_connection_manager or envoy.tcp_proxy filters. To see it's configuration, run:

    istioctl proxy-config listeners  -n  -o json
    

    Search for access_log of envoy.http_connection_manager for HTTP and access_log of envoy.tcp_proxy for TCP.

    You will see something like this:

     "filters": [
                    {
                        "name": "envoy.http_connection_manager",
                        "config": {
                            "access_log": [
                                {
                                    "config": {
                                        "format": "[%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\" %UPSTREAM_CLUSTER% %UPSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_REMOTE_ADDRESS% %REQUESTED_SERVER_NAME%\n",
                                        "path": "/dev/stdout"
    

    Check the log attributes definitions here

    If access_log's format is not specified in the output above, the default format is used.

提交回复
热议问题