I use my ELK stack stock logs, and sometimes, logs will be in this format
field1, field2, field3,
and so on, so I basically CSV to separate the fields. A little problem rose... Sometimes, the field will actually be like this:
field1, "fie, ld2", field 3
The way I thought of to solve this issue would be to count the number of commas: if there are more than the expected number, it means that field2 contains one, and therefore, I should use the quotes to see whats in there...
However, I could not find a way to do that in Logstash.
Does somebody have an idea how to count the commas, or maybe a better way to proceed?
A csv filter will handle quoted fields, but the entire field has to be quoted, with no leading space. So this might work, but it is going to be fragile.
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.