我想知道我的配置是否正确。logstash输入和输出的正确配置是什么?
我的配置(在文件logstash_conf /第一pipeline.conf)是:
input {
file {
path => "/opt/logstash/bin/logstash_conf/logstash-tutorial-dataset.log"
start_position => beginning
}
}
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}"}
}
geoip {
source => "clientip"
}
}
output {
elasticsearch {}
stdout {}
}
我refered以下配置:
https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html
但是当我尝试运行logstash时,出现以下错误:
[[email protected] bin]# ./logstash -f ./logstash_conf/first-pipeline.conf
Settings: Default pipeline workers: 16
Connection refused {:class=>"Manticore::SocketException", :level=>:error}
Pipeline main started
任何帮助将被衷心感谢。
您的ES服务器是否正在运行?执行'curl -XGET locahost:9200'时会得到什么?如果你注释掉'elasticsearch {}'输出,它会起作用吗? – Val
该配置没有任何语法错误,问题来自与Elasticsearch的连接,预计可在localhost:9200上访问(默认情况下为9200),因为您没有指定任何主机。 – baudsp