Skip to content

[7x.] [DOCS] Sort option for the grok patterns endpoint (#62092) #62982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/reference/ingest/processors/grok.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,33 @@ The above request will return a response body containing a key-value representat
--------------------------------------------------
// NOTCONSOLE

By default, the API returns patterns in the order they are read from disk. This
sort order preserves groupings of related patterns. For example, all patterns
related to parsing Linux syslog lines stay grouped together.

You can use the optional boolean `s` query parameter to sort returned patterns
by key name instead.

[source,console]
--------------------------------------------------
GET _ingest/processor/grok?s
--------------------------------------------------

The API returns the following response.

[source,js]
--------------------------------------------------
{
"patterns" : {
"BACULA_CAPACITY" : "%{INT}{1,3}(,%{INT}{3})*",
"BACULA_DEVICE" : "%{USER}",
"BACULA_DEVICEPATH" : "%{UNIXPATH}",
...
}
--------------------------------------------------
// NOTCONSOLE


This can be useful to reference as the built-in patterns change across versions.

[[grok-watchdog]]
Expand Down