pipes.asciidoc 1.2 KB

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