在logstash过滤器中使用此配置 过滤器{json {source => “message”target => “message1”} mutate {remove_field => [ “信息” ]}}
我写了下面的代码,如果我用这个文件启动logstash,那么我可以在kibana中看到正确的json。
input { file { path => "C:/Temp/logFile.log" start_position => "beginning" } } filter { json{ source => "message" target => "parsedJson" } } output { elasticsearch { hosts => "localhost:9200" index => "demo" document_type => "demo" } stdout { } }
请参考Kibana图像 参考来自: 参考