I've looked up and down StackOverflow and these forums along with the Logstash docs, and I can't for the life of me get this working. I am simply trying to use the message field as my source so that the items in message are used as fields for my index. Here's what I have setup so far:
input {
udp {
port => 5045
type => "moderators_live"
}
}
filter {
if [type] == "moderators_live" {
json {
source => "message"
}
}
}
output {
if [type] == "moderators_live" {
stdout { codec => rubydebug }
elasticsearch {
hosts => ["http://172.18.0.21:9200"]
index => "moderators_live-%{+YYYY.MM.dd}"
}
}
So that all works fine, BUT it's not using message as the source, so it's showing up like so:
I just want my fields to be those inside message (@timestamp, channel.name, messageId, author, content, attachments, embeds). I've been working on this for a few hours and it's late so it's quite possible I am overlooking something really simple.
Any hints/tips/pointers would be greatly appreciated!
If you remove the json filter, what does the [message] field look like in the rubydebug output? Is it possible you have a message field nested inside your message field?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.