B
B
beduin012018-03-29 18:11:38
logstash
beduin01, 2018-03-29 18:11:38

How to check Logstash from console?

I need help!
I need my application to send logs to logstash. As Nikita said, I deployed the logstash in the docker.
I sent him a config:

input {

tcp {

  port => 9000

  codec => json_lines

}
}

output {
 stdout { codec => json }
}

Started docker:
docker run -it -v /configs/logstash/:/usr/share/logstash/pipeline/ -p 9000:9000  5d448d68a8ee

And I tried to send a request to it:
`echo "hello world!" | logger -t localhost -P 9000`
But I did not see any reaction from the logstash in the docker container. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2018-03-29
@chupasaurus

You have a codec json_lines, so send JSON of the form { "key": "value" }( examples of the jsonl format).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question