Input Plugins
Tcp input plugin
logstash:6.5.3
创建配置文件到 /usr/local/logstash/pipeline/tcp.conf
1 | input { |
启动 Logstash 容器,并挂载 tcp pipeline 配置
1 | docker run -d --rm -it --name logstash -p 9600:9600 -v /usr/local/logstash/pipeline/:/usr/share/logstash/pipeline/ logstash:6.5.3 |
Configuring Logstash for Docker
准备测试数据 test.json
1 | {"message":{"someField":"someValue"}} |
发送
1 | nc localhost 9600 < test.json |