Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Support targeting multiple Elasticsearch indices #202

Closed
faec opened this issue Dec 12, 2022 · 2 comments · Fixed by #248
Closed

Support targeting multiple Elasticsearch indices #202

faec opened this issue Dec 12, 2022 · 2 comments · Fixed by #248
Assignees
Labels
8.8-candidate enhancement New feature or request Team:Elastic-Agent Label for the Agent team

Comments

@faec
Copy link
Contributor

faec commented Dec 12, 2022

Currently the shipper can only output to a single Elasticsearch index. This is in part a constraint of our support library go-elasticsearch, whose BulkIndexer can only target one index (thus to target more than one would require multiple bulk indexers, each with their own workers and so on). In the long run, however, we need to be able to ingest to multiple indices from a single worker / memory pool.

Resolving this will likely involve collaborating with the go-elasticsearch maintainers to add multi-index support to the library, or to find a suitable workaround for our purposes if that is infeasible for some reason. (It's also possible that we've misunderstood the API and this is already possible with the current library; either way, coordinating with @Anaethelion will probably clarify things.)

@faec faec added enhancement New feature or request Team:Elastic-Agent Label for the Agent team labels Dec 12, 2022
@Anaethelion
Copy link

You should be able to specify an Index field per BulkIndexerItem which serializes as the _index metadata, it overrides the default index specified at the root of the indexer.
See this integration test for reference.

Let me know if I can be of help!

@cmacknz
Copy link
Member

cmacknz commented Jan 19, 2023

As part of this we should upgrade to v8.6.0 of the Elasticsearch client to pick up the fix to elastic/go-elasticsearch#557

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
8.8-candidate enhancement New feature or request Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants