Logstash未接收TCP数据

时间:2018-04-17 16:53:21

标签: python elasticsearch tcp logstash

我将来自Python的监控数据作为JSON发送。我已经测试过数据是否实际上是在Logstash之外发送的,并且它是否成功发送和接收。使用Logstash,输入显示没有TCP输入插件接收的迹象。

这是我的配置:

input{
   tcp{
     port => 55556
     codec => json
   }
}

output{
   elasticsearch {
   hosts => ['localhost:9200']
   sniffing => true
   index => "test2"
  document_type => "health"
  }
}

详细调试除了logstash旋转和连接到指定的elasticsearch输出的基本输出外,没有显示任何内容。我的印象是它可能与由于格式化而被忽略的消息有关。

示例消息:

{"@fields": {"test": "test"}, "@message": {"doc_type": "sys_status", "PSUs": 2, "index": "shipper", "hostname": "client1", "CPUs": 2, "System": 4, "point_of_contact": "Tom Perry", "DIR": 4}, "@tags": ["test"]}

0 个答案:

没有答案