Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
Binary file modified docs/management/ingest-pipelines/images/ingest-pipeline-processor.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 24 additions & 30 deletions docs/management/ingest-pipelines/ingest-pipelines.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,47 +62,41 @@ You also want to know where the request is coming from.

. In *Ingest Node Pipelines*, click *Create a pipeline*.
. Provide a name and description for the pipeline.
. Define the processors:
. Add a grok processor to parse the log message:

.. Click *Add a processor* and select the *Grok* processor type.
.. Set the field input to `message` and enter the following grok pattern:
+
[source,js]
----------------------------------
[
{
"grok": {
"field": "message",
"patterns": ["%{IPORHOST:clientip} %{USER:ident} %{USER:auth} \\[%{HTTPDATE:timestamp}\\] \"%{WORD:verb} %{DATA:request} HTTP/%{NUMBER:httpversion}\" %{NUMBER:response:int} (?:-|%{NUMBER:bytes:int}) %{QS:referrer} %{QS:agent}"]
}
},
{
"date": {
"field": "timestamp",
"formats": [ "dd/MMM/YYYY:HH:mm:ss Z" ]
}
},
{
"geoip": {
"field": "clientip"
}
},
{
"user_agent": {
"field": "agent"
}
}
]
%{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{DATA:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response:int} (?:-|%{NUMBER:bytes:int}) %{QS:referrer} %{QS:agent}
----------------------------------
+
This code defines four {ref}/ingest-processors.html[processors] that run sequentially:
{ref}/grok-processor.html[grok], {ref}/date-processor.html[date],
{ref}/geoip-processor.html[geoip], and {ref}/user-agent-processor.html[user_agent].
.. Click *Update* to save the processor.

. Add processors to map the date, IP, and user agent fields.

.. Map the appropriate field to each processor type:
+
--
* **Date**: `timestamp`
* **GeoIP**: `clientip`
* **User agent**: `agent`

For the **Date** processor, you also need to specify the date format you want to use: `dd/MMM/YYYY:HH:mm:ss Z`.
--
Your form should look similar to this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move this before the part about them running sequentially.

+
[role="screenshot"]
image:management/ingest-pipelines/images/ingest-pipeline-processor.png["Processors for Ingest Node Pipelines"]
+
The four {ref}/ingest-processors.html[processors] will run sequentially:
{ref}/grok-processor.html[grok], {ref}/date-processor.html[date],
{ref}/geoip-processor.html[geoip], and {ref}/user-agent-processor.html[user_agent].

. To verify that the pipeline gives the expected outcome, click *Test pipeline*.
. To test the pipeline to verify that it produces the expected results, click *Add documents*.

. In the *Document* tab, provide the following sample document for testing:
. In the *Documents* tab, provide a sample document for testing:
+
[source,js]
----------------------------------
Expand Down