access_log_format_escape: json access_log_format:'{"time": "$time_iso8601", "remote_addr": "$proxy_protocol_addr", "x_forward_for": "$proxy_add_x_forwarded_for", "remote_user": "$remote_user", "bytes_sent": $bytes_sent, "request_time": $request_time, "status": $status, "...
nginx_config: http: access_log_format: '{"remote_addr": "$remote_addr", "remote_user": "$remote_user", "time_local": "$time_local", "http_host": "$http_host", "request": "$request", "status": "$status", "body_bytes_sent": "$body_bytes_sent", "request_time": "$re...
access_log_format: '{"remote_addr": "$remote_addr", "remote_user": "$remote_user", "time_local": "$time_local", "http_host": "$http_host", "request": "$request", "status": "$status", "body_bytes_sent": "$body_bytes_sent", "request_time": "$request_time", "http_refere...
此后,任何对 $a6_labels_zone 的获取操作都会调用注册的获取器来获取数值。 注意,自定义变量不能用于依赖 Nginx 指令的功能,如 access_log_format。 编写测试用例# 针对功能,完善各种维度的测试用例,对插件做个全方位的测试吧!插件的测试用例,都在 t/plugin 目录下,可以前去了解。 项目测试框架采用的test-nginx。
至此Apache APISIX 的 TCP 代理功能得到了 TLS 全方位的支持。此外,我们还支持在静态文件中配置 L4 代理的 Access Log: stream: enable_access_log: false # enable access log or not, default false access_log: logs/access_stream.log access_log_format: "$remote_addr [$time_local] $protocol $status...
access_log_format:'{"time": "$time_iso8601", "remote_addr": "$proxy_protocol_addr", "x_forward_for": "$proxy_add_x_forwarded_for", "remote_user": "$remote_user", "bytes_sent": $bytes_sent, "request_time": $request_time, "status": $status, "vhost": "$host", "request_pro...
"log_format": { "host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr" } }' 下面则是当前路由的日志格式: curl http://127.0.0.1:9180/apisix/admin/routes/1 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' ...
access_log_format:'{"time": "$time_iso8601", "remote_addr": "$proxy_protocol_addr", "x_forward_for": "$proxy_add_x_forwarded_for", "remote_user": "$remote_user", "bytes_sent": $bytes_sent, "request_time": $request_time, "status": $status, "vhost": "$host", "request_pro...
access_log_format: "$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time" # create your custom log format by visiting http://nginx.org/en/docs/varindex.html access_log_format_escape: default # allows setting json or default characters escaping in variables...
error.log warn; {%else%}access_log syslog:server=${FLUENTD_HOST}:5141json_format;error_log syslog:server=${FLUENTD_HOST}:5142warn;{%end%} 在nginx 配置模板中,还呗不光修改了日志存储,还调整了循环添加 ENV 环境变量、循环添加 lua_shared_dicts 配置及写死一些 NGINX 其他调优参数。