I'm using logstash-1.4.0 with elasticsearch 1.3.4 and kibana 3.1.1 (I know I'm outdated, that's the best I can do right now).
Log Example:
2016-05-31 16:05:33 RequestManager [INFO] The manual flag LOLROFLin TRALALA 123456Was changed to true
My grok filter:
filter {
grok {
match => { "message" => "%{DATESTAMP:timestamp} %{WORD:clazz} %{NOTSPACE:level} %{GREEDYDATA:content}"}
}
if (!([stack_trace])) and (!([clazz] == "RequestAsset")) {
drop {}
}
}
My questions are:
Why do I not see the grok fields in kibana? I only see the default fields but not mine. Grok Debugger shows success, but kibana does not work.
My goal is to drop any log message that does not have a stack trace OR is not from class (called clazz in my grok filter) "RequestAsset". Should this work? can I use the fields created by the grok filter in a seperate if filter?
EDIT: I realised what went wrong, I was using the log4j plugin which already seperates the log to its contents, and the field message was already just the message itself.