How can i able to see my documents content using logstash?


(Yaswanth ) #1

Hi,
ES 2.4.0
Logstash 5.1.1
I want to get the contents of documents from localhost index and i used the following code :

input {
elasticsearch {
hosts => "http://localhost:9200/"
index => "mediacontent-jan-2017"

}
}
output {
stdout{
}
}

Rather than data content i am getting like this:
status in cmd prompt:

2017-01-11T11:03:05.129Z %{host} %{message}
2017-01-11T11:03:05.129Z %{host} %{message}
2017-01-11T11:03:05.129Z %{host} %{message}
2017-01-11T11:03:05.129Z %{host} %{message}
2017-01-11T11:03:05.129Z %{host} %{message}
2017-01-11T11:03:05.129Z %{host} %{message}
2017-01-11T11:03:05.129Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.145Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}
2017-01-11T11:03:05.160Z %{host} %{message}

How can i able to see my content?


(Magnus B├Ąck) #2

Set e.g. codec => rubydebug for your stdout output.


(Yaswanth ) #3

thanks..
The solution is working fine in my laptop. But when i use the rubydebug along with my documents contents timestamp,version etc are coming but i want only my document contents.
1)Can you tell me how to achieve that?
2)when i executed the same code in my PC it remains in Successfully started state without any output .May i know why this problem is coming?


(system) #4

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