Test a Grok pattern
- POST also GET /_text_structure/test_grok_pattern
Test a Grok pattern on one or more lines of text. The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.
Read the reference documentationQuery Parameters
-
ecs_compatibilitystring · default: disabled The mode of compatibility with ECS compliant Grok patterns. Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern. Valid values are
disabledandv1.
Request
-
grok_patternstringrequired -
The Grok pattern to run on the text.
-
textstringrequired -
The lines of text to run the Grok pattern on.