pipes.asciidoc 1.2 KB

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