Chris Kessel
Chris Kessel

Reputation: 5875

How can I do multiple input streams in logstash?

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?

Upvotes: 2

Views: 301

Answers (1)

Badger
Badger

Reputation: 4072

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

Upvotes: 1

Related Questions