How combine different data inputs in logstash

Hello,

I have a set of http API one of them with "no time" data based , the fields are ID, geo location(lat,lon) and others data.

The ID is the key to access another API, (time based) , our target is to send all data from APIs to ES, in each line
For Example

API ONE respond :

{"dte":[{"id":"136","latitud":"-35.760761","longitud":"-71.574215","elevacion":"150"}]}

API2: http://api2?dteid=136&user ...... and answer

{"values":[{"val1":"30.5","val2":"33.0"},{"val1":"20.3","val2":"24.4"}.......... ]

We need leave in ES
{"id":"136","latitud":"-35.760761","longitud":"-71.574215","elevacion":"150","val1":"30.5","val2":"33.0"}
{"id":"136","latitud":"-35.760761","longitud":"-71.574215","elevacion":"150","val1":"20.3","val2":"24.4"}
...........

Is posible resolve it with logstach or we need join the info before to one file, for example, and then up the file to
ES.

I hope explain me clearly
Thanks a lot.

To my knowledge, with logstash, you can't call a first API, and then call a second API using data returned by first API.

So, to do that, I invite you to use exec input, where you chain curl requests.
When you receive first response, you extract interesting data to use it into second curl request.

Thanks Fabien,

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.