From 8686200a320625ee74d6eb3ac729804c3dfa2455 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Tue, 5 May 2020 16:41:59 -0400 Subject: [PATCH] [DOCS] EQL: Document `concat` function (#56239) Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com> --- docs/reference/eql/functions.asciidoc | 54 ++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/docs/reference/eql/functions.asciidoc b/docs/reference/eql/functions.asciidoc index 7765db6973a..a7701806e2e 100644 --- a/docs/reference/eql/functions.asciidoc +++ b/docs/reference/eql/functions.asciidoc @@ -10,6 +10,7 @@ experimental::[] * <> * <> +* <> * <> * <> * <> @@ -180,6 +181,57 @@ CIDR block you wish to search. If `null`, the function returns `null`. *Returns:* boolean or `null` ==== +[discrete] +[[eql-fn-concat]] +=== `concat` + +Returns a concatenated string of provided values. + +[%collapsible] +==== +*Example* +[source,eql] +---- +concat("process is ", "regsvr32.exe") // returns "process is regsvr32.exe" +concat("regsvr32.exe", " ", 42) // returns "regsvr32.exe 42" +concat("regsvr32.exe", " ", 42.5) // returns "regsvr32.exe 42.5" +concat("regsvr32.exe", " ", true) // returns "regsvr32.exe true" +concat("regsvr32.exe") // returns "regsvr32.exe" + +// process.name = "regsvr32.exe" +concat(process.name, " ", 42) // returns "regsvr32.exe 42" +concat(process.name, " ", 42.5) // returns "regsvr32.exe 42.5" +concat("process is ", process.name) // returns "process is regsvr32.exe" +concat(process.name, " ", true) // returns "regsvr32.exe true" +concat(process.name) // returns "regsvr32.exe" + +// process.arg_count = 4 +concat(process.name, " ", process.arg_count) // returns "regsvr32.exe 4" + +// null handling +concat(null, "regsvr32.exe") // returns null +concat(process.name, null) // returns null +concat(null) // returns null +---- + +*Syntax* +[source,txt] +---- +concat([, ]) +---- + +*Parameters* + +``:: +(Required{multi-arg-ref}) +Value to concatenate. If any of the arguments are `null`, the function returns `null`. ++ +If using a field as the argument, this parameter does not support the +<> field datatype. + +*Returns:* string or `null` +==== + [discrete] [[eql-fn-endswith]] === `endsWith` @@ -775,4 +827,4 @@ returns `null`. Fields are not supported as arguments. -- *Returns:* boolean -==== \ No newline at end of file +====