You could also do a combination of grok+dissect filter by filtering out Time with grok and put the rest into a field, then use dissect on the rest since those can be easily specified with delimiters.
Thanks for the response. I am using logstash 5.0 and it seems that spaces between fields is causing an issue. Also, is there a way to test the logstash filter before we apply?
You provided only one example, the filter above parsed it successfully.
Do your events have varying whitespaces? It is possible to handle them, but we need more examples to see where these are.
Well, not with Logstash as far as I know.
You can use Grok Debugger to test your patterns against real examples.
I am able to figure it out with gork debugger. Thanks for the help.
Since the resultant fields are in strings, are they compatible for line chart? or we need to convert it to numbers?
I have multiple filebeats configured in different hosts and each has different format. How can include all in one logstash conf? Here I am shipping all to one logstash host.
Actually, there is no string type in Elasticsearch. There are two types that handle strings:
text: searchable, but no aggregation possible (that means: no statistics)
keyword: not searchable (you'll have to use exact match), but you can aggregate it
If you want to work with numbers, you'll have to map them.
Multiple Logstash configuration is possible only with conditionals.
For example, Filebeat sends the host name in the source field (if I remember correctly), so you can do a conditional like:
if [source] = "hostname" { <put your code here> }
If you have a lot of different configs, it might become a conditional hell, but in Logstash 5.x, there is no other way AFAIK.
Logstash 6.x accepts multiple config files.
If you're dropping falsely parsed events, you might not realize you don't have all events in ES and even if you realize, you won't know, why the parsing failed.
The question I have is all the data is going to "message". But I looking to split the fields in "message" section like key value pair. So that I can use the values in line chart.
Also, I see the field names are not coming out as expected.
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.