Is there a way to configure ingress access log format? Currently, I can see from
curl 0:15000/config_dump
from within the ingress pod
“access_log”: [
{
“name”: “envoy.file_access_log”,
“config”: {
“path”: “/dev/stdout”,
“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%\n”
}
}
]
Instead of access log directly, I can use telemetry via logentry but I’m most interesting on custom access log way. Anyway, any pointer will be much appreciated!
Thanks!!
Were you able to find a solution for this ? how to customize access log format for envoy logs ?
incfly
April 23, 2019, 5:48pm
3
concurrency: 2
# Configures the access log for each sidecar.
# Options:
# "" - disables access log
# "/dev/stdout" - enables access log
accessLogFile: ""
# Configure how and what fields are displayed in sidecar access log. Setting to
# empty string will result in default log format
accessLogFormat: ""
# Configure the access log for sidecar to JSON or TEXT.
accessLogEncoding: TEXT
# Log level for proxy, applies to gateways and sidecars. If left empty, "warning" is used.
# Expected values are: trace|debug|info|warning|error|critical|off
logLevel: ""
# Configure the DNS refresh rate for Envoy cluster of type STRICT_DNS
# 5 seconds is the default refresh rate used by Envoy
Try to specify that in helm.
How can I do it manually. ? What config map property I have to change to do this ?
ericvn
April 23, 2019, 8:47pm
5
There is some info about access log but it doesnt talk about - what property we have to change in which config-map of istio-system namespace to change access log_format.
kay
August 12, 2021, 8:56pm
7
@Sourabh_Wadhwa
Did you find an option to make a change to default access log format? If yes, may I know what it is?