2020-06-30 09:12:54 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
|
|
|
[[eql-pipe-ref]]
|
|
|
|
== EQL pipe reference
|
|
|
|
++++
|
|
|
|
<titleabbrev>Pipe reference</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
2020-07-13 09:04:15 -04:00
|
|
|
experimental::[]
|
2020-06-30 09:12:54 -04:00
|
|
|
|
2020-08-26 12:42:56 -04:00
|
|
|
{es} supports the following <<eql-pipes,EQL pipes>>.
|
2020-06-30 09:12:54 -04:00
|
|
|
|
|
|
|
[discrete]
|
|
|
|
[[eql-pipe-head]]
|
|
|
|
=== `head`
|
|
|
|
|
2020-07-08 12:22:57 -04:00
|
|
|
Returns up to a specified number of events or sequences, starting with the
|
|
|
|
earliest matches. Works similarly to the
|
2020-08-17 11:27:04 -04:00
|
|
|
{wikipedia}/Head_(Unix)[Unix head command].
|
2020-06-30 09:12:54 -04:00
|
|
|
|
|
|
|
*Example*
|
|
|
|
|
2020-07-08 12:22:57 -04:00
|
|
|
The following EQL query returns up to three of the earliest powershell
|
2020-06-30 09:12:54 -04:00
|
|
|
commands.
|
|
|
|
|
|
|
|
[source,eql]
|
|
|
|
----
|
|
|
|
process where process.name == "powershell.exe"
|
2020-07-08 12:22:57 -04:00
|
|
|
| head 3
|
2020-06-30 09:12:54 -04:00
|
|
|
----
|
|
|
|
|
|
|
|
*Syntax*
|
|
|
|
[source,txt]
|
|
|
|
----
|
|
|
|
head <max>
|
|
|
|
----
|
|
|
|
|
|
|
|
*Parameters*
|
|
|
|
|
|
|
|
`<max>`::
|
|
|
|
(Required, integer)
|
2020-07-08 12:22:57 -04:00
|
|
|
Maximum number of matching events or sequences to return.
|
2020-06-30 09:12:54 -04:00
|
|
|
|
|
|
|
[discrete]
|
|
|
|
[[eql-pipe-tail]]
|
|
|
|
=== `tail`
|
|
|
|
|
2020-07-08 12:22:57 -04:00
|
|
|
Returns up to a specified number of events or sequences, starting with the most
|
|
|
|
recent matches. Works similarly to the
|
2020-08-17 11:27:04 -04:00
|
|
|
{wikipedia}/Tail_(Unix)[Unix tail command].
|
2020-06-30 09:12:54 -04:00
|
|
|
|
|
|
|
*Example*
|
|
|
|
|
2020-07-08 12:22:57 -04:00
|
|
|
The following EQL query returns up to five of the most recent `svchost.exe`
|
2020-06-30 09:12:54 -04:00
|
|
|
processes.
|
|
|
|
|
|
|
|
[source,eql]
|
|
|
|
----
|
|
|
|
process where process.name == "svchost.exe"
|
2020-07-08 12:22:57 -04:00
|
|
|
| tail 5
|
2020-06-30 09:12:54 -04:00
|
|
|
----
|
|
|
|
|
|
|
|
*Syntax*
|
|
|
|
[source,txt]
|
|
|
|
----
|
|
|
|
tail <max>
|
|
|
|
----
|
|
|
|
|
|
|
|
*Parameters*
|
|
|
|
|
|
|
|
`<max>`::
|
|
|
|
(Required, integer)
|
2020-07-08 12:22:57 -04:00
|
|
|
Maximum number of matching events or sequences to return.
|