Wrapping CSV Output Fields in Quotes

Hi all,

I am using the csv output for my logstash, but I want to have each field wrapped in quotes. So now I have the output as:


but I want the output to be:


My code in the conf file is:

output {
  csv {
    path => "/usr/share/logstash/${HOSTNAME}-%{+yyyy-MM-dd.HH-mm-ss}.log"
    fields => ["Field1", "Field2", "Field3"]

Can this be achieved?

Yes, add this option to your csv output....

csv_options => { "force_quotes" => true }

Thank you so much. I did not find this anywhere in the documentation. It works!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.