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

Initializing the index mapping for the elasticsearch's output #762

Closed
idrissneumann opened this issue Jan 24, 2024 · 6 comments
Closed

Initializing the index mapping for the elasticsearch's output #762

idrissneumann opened this issue Jan 24, 2024 · 6 comments
Assignees
Labels
kind/feature New feature or request
Milestone

Comments

@idrissneumann
Copy link
Contributor

Motivation

Make the search easier with Elasticsearch and let falcosidekick define the index mapping using an autocreateindex configuration.

Feature

Having a elasticsearch.autocreateindex boolean configuration. If it's set to true, falcosidekick will push an index mapping for the payloads, exactly the same way it has been done for Quickwit here: #736

Additional context

Already discussed with @Issif here: https://github.com/falcosecurity/falcosidekick/pull/736/files#discussion_r1464786855

@idrissneumann idrissneumann added the kind/feature New feature or request label Jan 24, 2024
@Issif Issif added this to the 2.29.0 milestone Jan 24, 2024
@Issif
Copy link
Member

Issif commented Jan 25, 2024

Even if we can't match all possible output_fields, especially because of the plugins which have their own and the possibility in falcosidekick to inject custom fields in the payload. Do you think it is worth to create the mapping with all "basic" fields Falco handles: https://falco.org/docs/reference/rules/supported-fields/ ?

@idrissneumann
Copy link
Contributor Author

idrissneumann commented Jan 27, 2024

@Issif I think it's a little bit less important than Quickwit because Elasticsearch can handle a dynamic mapping from the first ingested document. So it's important if there's some concurrent types with the same key that will be ingested, for example a field that can contain a date or something else which is not a date or timestamp, if the first ingested document containing the key is interpreted as date, the other following can be ignored and not indexed at all.

So if we know that some key must be indexed as raw text in advance, it might be worth it to define the mapping of those subfields at the init to be sure the first ingested documents will not be interpreted as a more restricted type.

@Issif
Copy link
Member

Issif commented Jan 27, 2024

We're on the same page 😉

@Issif
Copy link
Member

Issif commented Feb 6, 2024

For helping you, you can see how I did it in falco talon, it creates an index template at init https://github.com/Falco-Talon/falco-talon/tree/main/notifiers/elasticsearch

@Issif
Copy link
Member

Issif commented Feb 21, 2024

@idrissneumann what's the status on your side? do you need help?

@Issif
Copy link
Member

Issif commented Jun 24, 2024

Will be fixed in the upcoming 2.29

@Issif Issif closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants