pipes.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[eql-pipe-ref]]
  4. == EQL pipe reference
  5. ++++
  6. <titleabbrev>Pipe reference</titleabbrev>
  7. ++++
  8. {es} supports the following <<eql-pipes,EQL pipes>>.
  9. [discrete]
  10. [[eql-pipe-head]]
  11. === `head`
  12. Returns up to a specified number of events or sequences, starting with the
  13. earliest matches. Works similarly to the
  14. {wikipedia}/Head_(Unix)[Unix head command].
  15. *Example*
  16. The following EQL query returns up to three of the earliest powershell
  17. commands.
  18. [source,eql]
  19. ----
  20. process where process.name == "powershell.exe"
  21. | head 3
  22. ----
  23. *Syntax*
  24. [source,txt]
  25. ----
  26. head <max>
  27. ----
  28. *Parameters*
  29. `<max>`::
  30. (Required, integer)
  31. Maximum number of matching events or sequences to return.
  32. [discrete]
  33. [[eql-pipe-tail]]
  34. === `tail`
  35. Returns up to a specified number of events or sequences, starting with the most
  36. recent matches. Works similarly to the
  37. {wikipedia}/Tail_(Unix)[Unix tail command].
  38. *Example*
  39. The following EQL query returns up to five of the most recent `svchost.exe`
  40. processes.
  41. [source,eql]
  42. ----
  43. process where process.name == "svchost.exe"
  44. | tail 5
  45. ----
  46. *Syntax*
  47. [source,txt]
  48. ----
  49. tail <max>
  50. ----
  51. *Parameters*
  52. `<max>`::
  53. (Required, integer)
  54. Maximum number of matching events or sequences to return.