问nginx:[emerg]未知的"bytes_received“变量EN我尝试在Nginx中记录从客户端接收的字节数,如下所示:有如下指令语法可使用 ~ #区分大小写的正则匹配 ~* #不区分大小写的正则匹配 ^~ #普通字符匹配,如果此选项匹配成功,忽略其他匹配选项,一般用来匹配目录 = #普通字符精确匹配 @ #定义一
stream{log_format main'$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time';# 仅当客户端地址为特定IP时记录日志 access_log/var/log/nginx/stream_access.log mainif=$remote_addr~'192.168.1.1';server{listen12345;proxy_pass backend_server;}} 在上述配置中,只有...
$arg_name:获取请求中携带的参数名对应的值。 $args:获取请求中的参数部分。 $binary_remote_addr:获取客户端 IP 地址的二进制形式。 $body_bytes_sent:获取响应中发送的消息体字节数。 $bytes_received:获取客户端从服务器接收的字节数。 $bytes_sent:获取服务器向客户端发送的字节数。 $connection:获取使用的...
$bytes_received:从客户端接收的字节数。 $session_time:请求的处理时间。 $upstream_addr:后端服务器的IP地址和端口号。 $upstream_bytes_sent:发送给后端服务器的字节数。 $upstream_bytes_received:从后端服务器接收的字节数。 $upstream_connect_time:与后端服务器建立连接的时间。 上一篇记一次 zabbix item ...
Context:stream,server 类似http access访问阶段 server { ... deny192.168.1.1; allow192.168.1.0/24; allow10.1.1.0/16; allow2001:0db8::/32; deny all; } log阶段:stream_log模块 log_format proxy'$remote_addr [$time_local]''$protocol $status $bytes_sent $bytes_received''$session_time "$upst...
'- $status - $upstream_addr - $bytes_received - $bytes_sent - $session_time ' '- $proxy_protocol_addr:$proxy_protocol_port '; # JSON格式日志 log_format json '{"@timestamp": "$time_iso8601", ' '"connection": "$connection", ' ...
bytes_written写入缓存的总字节数。 streamserver_zones对于每个status_zone:processing当前正在处理的客户端连接数。connections客户端接受的连接总数。 sessionstotal完成的客户端会话总数。 2xx,4xx,5xx用状态代码2xx,4xx或5xx完成的会话数量。 discarded完成连接的总数而不创建会话。received从客户端收到的总字节数。
$ upstream_bytes_received从上游服务器收到的字节数(1.11.4)。来自多个连接的值由逗号分隔,如$ upstream_addr变量中的地址。$ upstream_connect_time时间连接到上游服务器(1.11.4); 时间以毫秒分辨率保持在几秒钟内。几个连接的时间用逗号分隔,如$ upstream_addr变量中的地址。$ upstream_first_byte_time接收第...
* bytes_received - 从客户端接收到的字节数。 * time_local - 客户端连接结束的本地时间。 * session_time - 持续连接的秒数。 * session_readable_time - 在可读格式下的持续时间。 默认的日志格式叫做 combined。这里是这一格式的定义: $remote_addr [$time_local] $command "$app" "$name" "$args...
types; default_type application/octet-stream; charset utf-8; ### ## set access log format ### log_format main '$remote_addr $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '$http_user_agent $http_x_forwarded_for $request_time $upstream_respons...