我正在设置Elasticsearch,Logstash和Kibana。我在配置" logstash.conf"时遇到错误。这是我得到的错误。
{:timestamp=>"2015-05-25T21:56:59.907000-0400", :message=>"Error: Expected one of #, {, ,, ] at line 12, column 49 (byte 265) after filter {\n grok {\n match => [\"message\", \"<log4j:event logger=\""}
{:timestamp=>"2015-05-25T21:56:59.915000-0400", :message=>"You may be interested in the '--configtest' flag which you can\nuse to validate logstash's configuration before you choose\nto restart a running system."}
这是我的logstash.conf
grok {
match => ["message", "<log4j:event logger="%{DATA:emitter}" timestamp="%{BASE10NUM:timestamp}" level="%{LOGLEVEL:level}" thread="%{DATA:thread}">, <log4j:message><%{GREEDYDATA:message}></log4j:message>" ]
}
我是ELK的新手。
答案 0 :(得分:0)
由于您的grok模式包含双引号,您必须
示例1:
grok {
match => ["message", "<log4j:event logger=\"%{DATA:emitter}\" ..." ]
}
示例2:
grok {
match => ["message", '<log4j:event logger="%{DATA:emitter}" ...' ]
}