How can I do multiple input streams in logstash?

Viewed 69

My use case is:

  1. I need a timestamp from database A
  2. Then do a query on database B
  3. Then output the results of that Database B query

Which means a logstash file that (theoretically) would look something like:

input {
  jdbc {
    get the timestamp
  }
  jdbc {
    Do the SQL that gets lots of data with the timestamp above
  }
}
output {
  elasticsearch {
    spew the data from that second jdbc query
  }
}

That doesn't work, of course, but it gives the idea of the use case. How can I make solve this scenario?

1 Answers

Use a jdbc_streaming filter, which is designed for exactly this use-case.

Related