Hi,
I am using filebeat with logstash-> ElasticSearch. I have configured same port on filebeat and logstash but I am getting error : getsockopt: connection refused
Filebeat.yml
indent preformatted text by 4 spaces
#=========================== Filebeat prospectors =============================
filebeat.prospectors:
Each - is a prospector. Most options can be set at the prospector level, so
you can use different prospectors for various configurations.
Below are the prospector specific configurations.
-
input_type: log
Paths that should be crawled and fetched. Glob based paths.
paths:
- /abc/xyz/metrics.log*
#----------------------------- Logstash output --------------------------------
#output.logstash:
The Logstash hosts
#hosts: ["localhost:5044"]
hosts: ["xx.xx.xx.xx:96xx"]
==============================================================================
logstash config file:
input {
beats {
type => xyz
port => 9xxx
}
}
filter {
grok { match => ["message", "%{TIMESTAMP_ISO8601:timestamp}%{SPACE}%{GREEDYDATA}%{SPACE}ABCId:%{UUID:id}%{SPACE}%{GREEDYDATA}%{SPACE}%{WORD}.%{WORD:method}.%{WORD:class} %{WORD}: %{INT:milliseconds}"]}
mutate {
convert => {"milliseconds" => "integer"}
}
date {
locale => "en"
match => [ "timestamp", "yyyy-MM-dd mm:ss:SS,ZZZ", "ISO8601" ]
target => "timestamp"
}
}
output {
elasticsearch {
hosts => ["xx.xx.xx.xx:9xxx", "xx.xx.xx.xx:9xxx"]
index => "xyz-%{+YYYY.MM.dd}"
}
stdout { codec => rubydebug }
}
==========================================================
filebeat log:
2017-10-10T11:09:52-07:00 ERR Connecting error publishing events (retrying): Get http://10.xx.xx.xx:9xxx: dial tcp 10.xx.xx.xx:9xxx: getsockopt: connection refused
2017-10-10T11:10:19-07:00 INFO No non-zero metrics in the last 30s
2017-10-10T11:10:49-07:00 INFO No non-zero metrics in the last 30s
2017-10-10T11:10:52-07:00 ERR Connecting error publishing events (retrying): Get http://10.xx.xx.xx:9xxx: dial tcp 10.xx.xx.xx:9xxx: getsockopt: connection refused
2017-10-10T11:11:19-07:00 INFO No non-zero metrics in the last 30s
Please help me to solve it.
Thanks!