[Docs] Fix runtime grok script example (#87851)

* [Docs] Fix runtime grok script example

* Update runtime.asciidoc

Small fix.

* Update runtime.asciidoc

Small fix...

* Update common-script-uses.asciidoc

Small fix.

* Update docs/reference/scripting/common-script-uses.asciidoc

Co-authored-by: Adam Locke <adam.locke@elastic.co>

Co-authored-by: Adam Locke <adam.locke@elastic.co>
This commit is contained in:
David Kilfoyle 2022-07-05 10:53:24 -04:00 committed by GitHub
parent 9ee6a19187
commit 992344a3fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -76,9 +76,9 @@ field as a runtime field in the mapping. The following runtime script defines a
grok pattern that extracts structured fields out of the `message` field.
The script matches on the `%{COMMONAPACHELOG}` log pattern, which understands
the structure of Apache logs. If the pattern matches, the script emits the
value matching the IP address. If the pattern doesn't match
(`clientip != null`), the script just returns the field value without crashing.
the structure of Apache logs. If the pattern matches (`clientip != null`), the
script emits the value of the matching IP address. If the pattern doesn't match,
the script just returns the field value without crashing.
[source,console]
----
@ -418,4 +418,4 @@ defined it in the dissect pattern!
}
----
// TESTRESPONSE[s/"took" : 2/"took": "$body.took"/]
// TESTRESPONSE[s/"_id" : "GXx3H3kBKGE42WRNlddJ"/"_id": $body.hits.hits.0._id/]
// TESTRESPONSE[s/"_id" : "GXx3H3kBKGE42WRNlddJ"/"_id": $body.hits.hits.0._id/]