Files
honeymoose f321dfedf5 同步完成!
**同步结果摘要**:

| 目录 | 同步前 | 同步后 | 官方 |
|------|--------|--------|------|
| aggregations | 40 | 65 | 64 |
| analyzers | 8 | 141 | 140 |
| api-reference | 97 | 186 | 174 |
| benchmark | 34 | 67 | 53 |
| clients | 17 | 18 | 18 |
| dashboards | 38 | 149 | 131 |
| data-prepper | 77 | 134 | 123 |
| im-plugin | 22 | 37 | 37 |
| ingest-pipelines | 27 | 52 | 51 |
| install-and-configure | 37 | 57 | 53 |
| ml-commons-plugin | 81 | 157 | 155 |
| observing-your-data | 39 | 73 | 66 |
| query-dsl | 40 | 77 | 75 |
| search-plugins | 80 | 139 | 95 |
| security-analytics | 22 | 47 | 46 |

**说明**:
- 本地文件数 > 官方:本地有一些官方已删除或重命名的文件
- 新增了约 **740 个英文文档文件**
- 已有文件保持不变(未覆盖)
2026-11-30 10:48:30 -05:00

2.4 KiB

layout, title, parent, grand_parent, nav_order
layout title parent grand_parent nav_order
default Grok Debugger Using Dev Tools Exploring data 20

Grok Debugger

Use the Grok Debugger tab in Dev Tools to build and test Grok patterns before using them in ingest pipelines. Grok patterns parse unstructured log data into structured fields. The Grok Debugger tests patterns against sample text you provide, so it doesn't require any indexed data.

Testing a Grok pattern

To test a Grok pattern, follow these steps:

  1. Navigate to Dev Tools and select Grok Debugger at the top of the page.

  2. In the Sample Log field, enter a sample log message. For example, enter the following Apache access log entry:

    127.0.0.1 - alice [15/Mar/2026:10:32:41 -0700] "GET /products/1234 HTTP/1.1" 200 2326
    

    {% include copy.html %}

  3. In the Grok Pattern field, enter the pattern to test against the sample log:

    %{IPORHOST:client_ip} - %{USER:user} \[%{HTTPDATE:timestamp}\] "%{WORD:method} %{URIPATHPARAM:request} HTTP/%{NUMBER:http_version}" %{NUMBER:status} %{NUMBER:bytes}
    

    {% include copy.html %}

  4. Select Simulate.

The Results pane displays Pattern matched and lists the extracted fields and their values, as shown in the following image.

Grok Debugger

To clear both fields and the results, select Clear.

To open the Grok processor documentation, select Grok documentation.

Configuring advanced settings

To define your own patterns or return every match, select Advanced settings. You can configure the following settings:

  • Custom pattern definitions: Defines patterns that aren't included in the built-in pattern set. Enter one pattern per line in the format PATTERN_NAME pattern_regex. After you define a custom pattern, you can reference it in the Grok Pattern field using the %{PATTERN_NAME:field_name} syntax.
  • Capture all matches: Returns all matches for a pattern instead of only the first match.

Next steps

  • For information about the Grok processor and the available built-in patterns, see Grok processor.
  • For information about creating ingest pipelines, see Ingest pipelines.