【发布时间】:2017-03-13 15:19:25
【问题描述】:
我有一个 Vagrant 图像,其中有一个应用程序;如果您调用端口2401 并根据您想要的服务调用特定地址(即“curl -X GET http://127.0.0.1:2401/provider/ipfix”),则可以在 Vagrant 映像中访问它。为了在 Vagrant 机器之外检索输出,我在 Vagrant 文件 ("config.vm.network :forwarded_port, guest: 2401, host: 8080") 中设置了端口转发,因此使用主机中的命令“curl -X GET http://127.0.0.1:8080/provider/ipfix”得到相同的输出。
我现在正处于安装 Logstash 的阶段。我的问题是,当我使用配置文件运行 Logstash 时,我收到错误“地址已在使用中”。我还尝试使用字段来指导特定的输出。下面是我的 Logstash 配置文件。您会建议什么解决方法?
input {
tcp {
host => localhost
port => 8080
add_field => {
"field1" => "provider"
"field2" => "ipfix"
}
codec => netflow {
versions => [10]
target => ipfix
}
type => ipfix
}
}
output {
stdout { codec => rubydebug }
elasticsearch {
index => "IPFIX-logstash-%{+YYYY.MM.dd}"
}
}
【问题讨论】:
标签: vagrant logstash bind vagrantfile elastic-stack