-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filebeat CEL input - string library functions not recognized #34610
Comments
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
You are correct, the cel/ext package is not included. This was intentional (the bug is in the documentation — there should not be a reference to ext). I have in mind a plan to mechanically generate a String/Bytes lib from a subset of the Go standard library strings and bytes packages if there is seen to be a need. In the mean time the regexp lib can be used in most cases where ext.strings would be used. |
My proposal is to add CEL extension wrappers for the following strings package functions
and a string slicing function. |
For confirmed bugs, please report:
Download latest version of Filebeat, extract, and update filebeat.yml
Add CEL input that points at a URL that requires username and password
a. https://www.elastic.co/guide/en/beats/filebeat/8.6/filebeat-input-cel.html
b. x-pack/filebeat/input/cel: new input #31233
Run Filebeat
Review the output
Search the code for the possible problem. It appears the ext library is not even included
a. https://github.com/elastic/beats/blob/main/x-pack/filebeat/input/cel/input.go
i. The import includes
"github.com/google/cel-go/cel"
and"github.com/google/cel-go/checker/decls"
but does not include"github.com/google/cel-go/ext"
ii.
func newProgram(
does not includeString()
as an option similar to an example I was looking atb. https://github.com/elastic/beats/blob/main/x-pack/filebeat/input/cel/input_test.go
i. I only found references to functions in
mito
and thecel
language standard. I didn't find any tests that included any of the string methods.metricbeat.yml
logs
Before adding the
split
functionAfter adding the split function with
, "tags": body.split('i')
:The text was updated successfully, but these errors were encountered: