Search code examples
elasticsearchlogstashelastic-stackelk

Elasticsearch + Logstash - Indexing data from different sources when receiving an event


Good day,

I have a gotten into a bit of a headache when working on indexing some data in Elasticsearch and have some questions about a good approach.

As of now, an event is received on a Kafka topic with just a part of the data that should be stored in the document. The rest of the data needs to be collected after the event is received and is available from different APIs. To reduce the amount of work, it seems that Logstash could be a good approach.

Is there a way to configure Logstash to initiate data collection from different APIs and DBs when an event is received, and then assemble the document with the combined date, or am I stuck with writing time consuming custom logic for the indexing? I have searched around a bit, but couldn't find any good answer on the problem.


Solution

  • What you need in logstash is to lookup/enrich you message with data from external api's, right? You could use logstash's http_filter plugin