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"
}
}
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"
}
}
1 个回复
Dm
赞同来自: