'Send data to Logstash in docker-compose environment

I've setup the ELK stack (Elasticsearch, Logstash and Kibana) by following this Github repo.
Now I want to send data to logstash, for example specifying a pipeline as following:

input { stdin{} } output { stdout{} } 

But I don't know how to do that. I searched and tried some ways but I couldn't succeed.
Can someone help me please?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source