-3

I have my windows version which writes logstash json output as file capturing each object by line by line. But same in cents, working fine but its writing all the outputs in a single line.. No carriage return(enter)

Eg:

Expected {Name: abc, class: fifth}

{Name: abc, class: six}

{Name: abc, class: seven}

But coming as {Name: abc, class:fifth}{Name: abc, class:six}{Name: abc, class:seven}

GM.
  • 141
  • 1
  • 6
  • You mean to have a proper formatted output in logstash? – Kulasangar Nov 28 '16 at 05:25
  • Yes... I made a local windows setup of elk and I was able to get the logstash results as expected by line by line in file. But the same in Linux having issues. Its keep on writing in same line – GM. Nov 28 '16 at 07:22
  • What if you have a `stdout` in your `output` of logstash? – Kulasangar Nov 28 '16 at 08:04
  • That's coming normal with formatted curly braces and all I miss here is line return. – GM. Nov 28 '16 at 13:06
  • what if you use the [line](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-line.html) plugin within your codec. Check this [SO](http://stackoverflow.com/questions/37180676/configuration-with-output-file-and-codec-not-parsed-by-logstash). – Kulasangar Nov 28 '16 at 14:20

1 Answers1

1

In order to have a proper formatted output in logstash for debugging purposes, you could simply use stdout. ie:

output {
  stdout { codec => rubydebug } <--- you could change this to your need
}

stdout synopsis

Kulasangar
  • 9,046
  • 5
  • 51
  • 82