> For the complete documentation index, see [llms.txt](https://www.axisnow.io/zh/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.axisnow.io/zh/docs/edge/insight/log-fields.md).

# 日志字段

访问日志的字段、含义与示例，日志检索的筛选、日志详情和日志推送共用

访问日志一条对应一个请求，字段在三处出现：[日志检索](/zh/docs/edge/insight/log-explorer.md)的筛选条件和列只开放下面六组字段；展开一条日志的**日志详情**和[日志推送](/zh/docs/edge/integration/log-receiver.md)收到的是完整字段，多出的部分见[只在详情里出现的字段](#detail-only)。耗时类字段单位都是秒，回源重试时逐次累加。

## 可筛选的字段 <a href="#filterable" id="filterable"></a>

### 请求 <a href="#request" id="request"></a>

<table data-search="false"><thead><tr><th width="260">字段</th><th width="140">名称</th><th>含义</th></tr></thead><tbody><tr><td><code>http_host</code></td><td>请求域名</td><td>请求头 Host 的值。 例：<code>www.example.com</code></td></tr><tr><td><code>uri</code></td><td>请求路径</td><td>请求路径，不含查询参数。 例：<code>/index.html</code></td></tr><tr><td><code>request_method</code></td><td>请求方法</td><td>请求中使用的 HTTP 方法。 例：<code>GET、POST、PUT、DELETE、PATCH、HEAD</code></td></tr><tr><td><code>endpoint_uuid</code></td><td>端点</td><td>被访问端点的标识。</td></tr><tr><td><code>endpoint_tags</code></td><td>端点标签</td><td>端点所带的标签。</td></tr><tr><td><code>plugin_identifiers</code></td><td>命中插件</td><td>有规则命中该请求的插件列表，一个请求可以同时命中多个插件。 例：<code>tls_settings、real_ip、authn_authz、request_processing、general_acl、rate_limit</code></td></tr><tr><td><code>rule_uuids</code></td><td>命中规则</td><td>命中的规则标识列表。</td></tr><tr><td><code>scheme</code></td><td>请求协议</td><td>http 或 https。 例：<code>https、http</code></td></tr><tr><td><code>server_protocol</code></td><td>HTTP 版本</td><td>客户端使用的 HTTP 版本。 例：<code>HTTP/2</code></td></tr><tr><td><code>http_user_agent</code></td><td>客户端 UA</td><td>请求头 User-Agent 的值。</td></tr><tr><td><code>request_id</code></td><td>请求 ID</td><td>边缘为请求分配的标识，与响应头 X-Request-ID 相同。</td></tr></tbody></table>

### 处置动作 <a href="#action" id="action"></a>

<table data-search="false"><thead><tr><th width="260">字段</th><th width="140">名称</th><th>含义</th></tr></thead><tbody><tr><td><code>extras.general_acl.action_methods</code></td><td>通用访问控制动作</td><td>通用访问控制对该请求执行的动作。 例：<code>allow、deny、block、altcha_challenge、captcha_challenge</code></td></tr><tr><td><code>extras.rate_limit.action_methods</code></td><td>速率控制动作</td><td>速率控制对该请求执行的动作，log_only 为观察。 例：<code>deny、block、log_only、altcha_challenge、captcha_challenge</code></td></tr></tbody></table>

### 响应 <a href="#response" id="response"></a>

<table data-search="false"><thead><tr><th width="260">字段</th><th width="140">名称</th><th>含义</th></tr></thead><tbody><tr><td><code>status</code></td><td>响应状态码</td><td>返回给客户端的状态码。 例：<code>200</code></td></tr><tr><td><code>request_time</code></td><td>请求总耗时</td><td>边缘收到请求到最后一个字节发给客户端的耗时，秒。 例：<code>0.150</code></td></tr><tr><td><code>bytes_sent</code></td><td>响应体大小</td><td>发给客户端的总字节数，含响应头。 例：<code>1024</code></td></tr></tbody></table>

### 回源 <a href="#upstream" id="upstream"></a>

<table data-search="false"><thead><tr><th width="260">字段</th><th width="140">名称</th><th>含义</th></tr></thead><tbody><tr><td><code>origin_uuid</code></td><td>源站</td><td>请求转发到的源站对象。</td></tr><tr><td><code>upstream_status</code></td><td>源站状态码</td><td>源站返回的 HTTP 状态码。发生回源重试时，每次尝试的值依次用 ", " 连接，例如 "502, 200"。 例：<code>200</code></td></tr><tr><td><code>connection_errmsg</code></td><td>回源错误信息</td><td>回源连接失败的错误信息，成功时为 <code>-</code>。 例：<code>连接超时</code></td></tr><tr><td><code>upstream_addr</code></td><td>源站地址</td><td>请求转发到的源站 IP 地址和端口。发生回源重试时，每次尝试的值依次用 ", " 连接，例如 "172.31.45.67:8443, 172.31.45.68:8443"。 例：<code>172.31.45.67:8080</code></td></tr><tr><td><code>total_upstream_response_time</code></td><td>源站响应耗时</td><td>全部回源尝试收完源站响应的累计耗时，秒。 例：<code>0.200</code></td></tr><tr><td><code>total_upstream_header_time</code></td><td>源站首字节耗时</td><td>全部回源尝试收到源站响应头的累计耗时，秒。 例：<code>0.030</code></td></tr><tr><td><code>total_upstream_connect_time</code></td><td>回源建连耗时</td><td>全部回源尝试与源站建连的累计耗时，秒。 例：<code>0.015</code></td></tr><tr><td><code>total_upstream_ssl_handshake_time</code></td><td>回源 TLS 耗时</td><td>全部回源尝试的 TLS 握手累计耗时，明文回源为 0，秒。 例：<code>0.028</code></td></tr><tr><td><code>upstream_cache_status</code></td><td>缓存命中状态</td><td>边缘缓存状态：HIT 命中缓存，由边缘直接返回；MISS 缓存里没有，回源获取；EXPIRED 缓存已过期，回源重新获取；REVALIDATED 缓存已过期，回源确认内容没有变化（304），返回了缓存；STALE 缓存已过期且回源失败，返回了过期的缓存；UPDATING 缓存正在被其他请求更新，先返回了过期的缓存；BYPASS 按配置绕过缓存，直接回源。</td></tr></tbody></table>

### 客户端 <a href="#client" id="client"></a>

<table data-search="false"><thead><tr><th width="260">字段</th><th width="140">名称</th><th>含义</th></tr></thead><tbody><tr><td><code>remote_addr</code></td><td>客户端 IP</td><td>客户端 IP，经真实客户端 IP 插件还原。 例：<code>192.168.1.100</code></td></tr><tr><td><code>geo.country_code</code></td><td>客户端国家</td><td>客户端 IP 的国家或地区代码。 例：<code>SG</code></td></tr><tr><td><code>geo.asn</code></td><td>客户端 ASN</td><td>客户端 IP 所属的自治域。 例：<code>14061</code></td></tr><tr><td><code>geo.isp_name</code></td><td>客户端运营商</td><td>客户端 IP 所属的运营商或托管商。 例：<code>电信</code></td></tr><tr><td><code>http_referer</code></td><td>来源页面</td><td>请求头 Referer 的值。 例：<code>https://www.example.com/login</code></td></tr><tr><td><code>http_x_forwarded_for</code></td><td>X-Forwarded-For</td><td>请求头 X-Forwarded-For 的值。 例：<code>203.0.113.45</code></td></tr></tbody></table>

### 边缘 <a href="#edge" id="edge"></a>

<table data-search="false"><thead><tr><th width="260">字段</th><th width="140">名称</th><th>含义</th></tr></thead><tbody><tr><td><code>edge_uuid</code></td><td>边缘节点</td><td>处理该请求的边缘节点。</td></tr><tr><td><code>eip</code></td><td>EIP</td><td>接收该请求的 EIP。 例：<code>198.51.100.24</code></td></tr><tr><td><code>hostname</code></td><td>边缘主机名</td><td>处理该请求的边缘节点主机名。 例：<code>local-ubuntu</code></td></tr><tr><td><code>aegis_version</code></td><td>边缘软件版本</td><td>边缘软件版本。 例：<code>1.0.26</code></td></tr><tr><td><code>server_port</code></td><td>服务端端口</td><td>边缘接收请求的端口。 例：<code>80</code></td></tr></tbody></table>

## 只在详情里出现的字段 <a href="#detail-only" id="detail-only"></a>

<table data-search="false"><thead><tr><th width="300">字段</th><th>含义</th></tr></thead><tbody><tr><td><code>time_iso8601</code></td><td>请求结束的时间</td></tr><tr><td><code>request_uri</code>、<code>request</code></td><td>含查询参数的完整 URI；请求行，含方法和协议版本</td></tr><tr><td><code>remote_port</code>、<code>server_addr</code></td><td>客户端端口；边缘接收请求的地址</td></tr><tr><td><code>http2</code>、<code>ssl_protocol</code>、<code>ssl_cipher</code>、<code>ssl_alpn_protocol</code>、<code>ssl_session_reused</code></td><td>客户端连接的 HTTP/2 标记、TLS 版本、密码套件、ALPN 协商结果、是否复用 TLS 会话</td></tr><tr><td><code>ssl_handshake_time</code>、<code>connection_time</code>、<code>connection_requests</code></td><td>客户端 TLS 握手耗时；连接已存在的时长；本请求是该连接上的第几个请求，为 1 时是连接的首个请求</td></tr><tr><td><code>request_length</code>、<code>body_bytes_sent</code></td><td>请求的总字节数，含请求头；发给客户端的响应体字节数，不含响应头</td></tr><tr><td><code>request_first_byte_time</code>、<code>upstream_start_time</code></td><td>边缘向客户端发出首字节的时刻；开始回源的时刻，都从收到请求起算</td></tr><tr><td><code>upstream_connect_time</code>、<code>upstream_header_time</code>、<code>upstream_response_time</code></td><td>每次回源尝试各自的建连、首字节、完整响应耗时，多次尝试用逗号分隔；<code>total_*</code> 字段是它们的累加</td></tr><tr><td><code>upstream_bytes_sent</code>、<code>upstream_bytes_received</code>、<code>upstream_response_length</code></td><td>发往源站和从源站收到的字节数；源站响应体长度</td></tr><tr><td><code>rule_versions</code></td><td>与 <code>rule_uuids</code> 一一对应的规则版本，日志检索按命中规则筛选时据此显示命中当时的规则配置</td></tr><tr><td><code>extras.authn_authz</code></td><td>认证与授权的结果，见<a href="/zh/docs/edge/policies/authn-authz/how-it-works.md#log-fields">日志字段</a></td></tr><tr><td><code>tcpinfo_rtt</code>、<code>tcpinfo_rttvar</code>、<code>tcpinfo_snd_cwnd</code>、<code>tcpinfo_rcv_space</code></td><td>客户端连接的内核 TCP 统计：往返时延及其抖动，微秒；发送拥塞窗口；接收窗口</td></tr><tr><td><code>sample_rate</code></td><td>访问日志插件开启采样时记录的采样率</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.axisnow.io/zh/docs/edge/insight/log-fields.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
