So, i want the grok know my match rules content (the message field) is "%{TIMESTAMP_ISO8601:timestamp} - %{NOTSPACE:module} - %{LOGLEVEL:level} - %{NOTSPACE:filename} - %{GREEDYDATA:log_message}"
But the setting above do not work, I want to know how can i implement the funciton like this? or is it possible to make it?
I have not looked at Filebeat 7 very closely yet so I might be wrong but as far as I know, you can't really pass @metadata fields to Logstash that way... There are some @metadata fields from Filebeat that Logstash does get but they (at least used to be) are more or less predefined.
I also see no mention of @metadata fields in the Filebeat fields documentation.
I think I see what you are trying to accomplice. An interesting approach. Try adding just formater as a field and try
I have printed the data which Logstash get from Filebeat (you can see my Logstash output codec is rubydebug with metadata) and the data contain the formatter field, what is more i have use this way to pass my target index from Filebeat to Logstash. The problem of this case is not on the data transportation, is on how to express and assign the data to the message field, and i am sure the way you written match => { "message" => [formatter] } will raise an error, because i have tried:grinning:
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.