如何在LogStash中进行多个输入流?

发布于 2025-02-07 04:34:28 字数 403 浏览 0 评论 0原文

我的用例是:

  1. 我需要数据库A的时间戳
  2. ,然后在数据库B上进行查询
  3. ,然后输出该数据库B查询的结果,

这意味着(理论上)看起来像是这样的logstash文件,

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
  }
}

当然是不起作用的,当然是不起作用的。 ,但它给出了用例的想法。如何解决这种情况?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江挽川 2025-02-14 04:34:28

使用

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文