如何检测LogStash输入连接错误
将KAFKA连接到Logstash时,如何监视和检测错误。
例如,我的Kafka经纪人倒闭了,Kafka和Logstash之间没有建立任何联系。
有没有办法让监视器与logstash和kafka之间的连接状态? 我可以查询logstash日志(但我认为这不是适当的方法),我尝试使用logstash Monitoring API(例如Localhost:9600/_node/stats/pipelines?Pretty),但是没有API给我连接状态是提前
谢谢你
How can I monitor and detect errors when connecting kafka to logstash.
Say for example my kafka broker is down and no connection is established between kafka and logstash.
Is there a way in to get the monitor the connection status between logstash and kafka?
I can query logstash logs (but I don't think it is the appropriate way) and I tried to use logstash monitoring API (for example localhost:9600/_node/stats/pipelines?pretty) but no api gives me the connection status is off
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有
弹性代理
或metricbeat代理
安装在Kafka节点上,则可以使用其KAFKA特定模块配置代理来监视它们。如您所述,从logstash获取连接状态,您也可以配置您的连接状态logstash配置以从日志消息中获取状态。
Elasticsearch中的示例文档:
可以添加以下配置以获取状态:
If you have an
elastic agent
or ametricbeat agent
installed on the Kafka node, you can configure the agent to monitor them using their Kafka specific module.For getting the connection status from logstash as you mentioned, you can also configure your logstash config to grab the status from the log message.
Sample document in elasticsearch :
Below configuration can be added to fetch the status: