要不要也来分享分享一下啊

logstash 如何过滤json 反斜杠

Logstash | 作者 gjt | 发布于2019年11月15日 | 阅读数:3374

input {
kafka {
type => "gateOut_log"
bootstrap_servers => ["10.236.1.22:9092"]
topics => ["gateOut_log"]
#group_id => "filebeat-logstash"
#client_id => "logstashnode1"
consumer_threads => 1
codec => json
decorate_events => false

}
}


output{
if [type] == "gateOut_log" {
elasticsearch {
hosts => "10.236.1.22:9200"
index => "gateout-log"
}
}
input {
kafka {
type => "gateOut_log"
bootstrap_servers => ["10.236.1.22:9092"]
topics => ["gateOut_log"]
#group_id => "filebeat-logstash"
#client_id => "logstashnode1"
consumer_threads => 1
codec => json
decorate_events => false

}
}


output{
if [type] == "gateOut_log" {
elasticsearch {
hosts => "10.236.1.22:9200"
index => "gateout-log"
}
}

stdout{
codec => rubydebug ##输出到屏幕上
}
}
{
"app" => "appName_IS_UNDEFINED",
"stack_trace" => "",
"parent" => "",
"type" => "gateOut_log",
"@version" => "1",
"timestamp" => "2019-11-15 11:27:23,550",
"trace" => "",
"span" => "",
"method" => "?",
"message" => "{\"xh\":\"0001\",\"cgmx\":\"Y\",\"rgmx\":\"Y\",\"tdh\":\"dsdikp_01\"}",
"level" => "INFO",
"class" => "com.qd.harbour.gateOut.controller.DemoController",
"thread" => "Thread-92",
"row" => "?",
"@timestamp" => 2019-11-15T03:20:21.350Z,
"ip" => "ip_IS_UNDEFINED"
}
}
已邀请:

Dm

赞同来自:

gsub

要回复问题请先登录注册