Skip to content
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

[Elasticsearch] Add Pipeline configuration #981

Merged

Conversation

aleksmaus
Copy link
Contributor

@aleksmaus aleksmaus commented Sep 1, 2024

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area outputs

What this PR does / why we need it:

Adds configurable ingest pipeline for Elasticsearch output. For more documentation refer to: https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html

This is super useful when users need to specify the ingest pipeline for the data transformation.

Special notes for your reviewer:
Added one FIXME: comment https://github.com/falcosecurity/falcosidekick/pull/981/files#diff-63512941b06c3ecd46ca56b6745027a3d30b9ff012c5e1e9d1508ee4e22df39fR102.
There is a potential race condition when c.EndpointURL gets set in the output request sending code, since this is a member variable that can be accessed from multiple go routines. I fixed this for Elasticsearch output, and noticed another place in Sumologic output https://github.com/falcosecurity/falcosidekick/blob/master/outputs/sumologic.go#L24
I can look at addressing that FIXME if I have time later to avoid the similar mistakes in other outputs.

Signed-off-by: Aleksandr Maus <aleksandr.maus@elastic.co>
@poiana poiana added the size/M label Sep 1, 2024
@aleksmaus aleksmaus force-pushed the feature/elasticsearch_pipeline branch from da03560 to 493d48a Compare September 1, 2024 00:56
@Issif Issif self-assigned this Sep 2, 2024
@Issif Issif added this to the 2.30 milestone Sep 2, 2024
Copy link
Member

@Issif Issif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right for the race condition, like we discussed before, the client implementation is pretty naive, but easy to extend, even by beginner. Beside that, all is good to me. Thanks again.

@poiana poiana added the lgtm label Sep 2, 2024
@poiana
Copy link

poiana commented Sep 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aleksmaus, Issif

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
Copy link

poiana commented Sep 2, 2024

LGTM label has been added.

Git tree hash: c87a9f3aa6ddc840bf68faef1dc74259ccfa50b6

@poiana poiana added the approved label Sep 2, 2024
@poiana poiana merged commit 95f7b21 into falcosecurity:master Sep 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants