Hi there, I've been trying to collect logs, using journalbeat from multiple servers onto a single logstash server. I already have winlogbeat on my windows server which is using 5044, hence other servers with journalbeat are on 5045. It throws following error:
Error: Cannot assign requested address
Exception: Java::JavaNet::BindException
here is my logstash conf file. I don't understand how do I differentiate these logs/indices between server1 & server2.
@magnusbaeck could you please suggest
input {
beats {
port => "5044"
tags => ["windows-server"]
}
beats {
port => "5045"
tags => ["server1"]
}
beats {
port => "5045"
tags => ["server2"]
}
}
output {
if "windows-server" in [tags] {
elasticsearch {
hosts => ["ip of elasticsearch:9200"]
manage_template => false
index => "windowslogs-%{+YYYY.MM.dd}"
user => "elastic"
password => "password"
}
}
if "server1" in [tags] {
elasticsearch {
hosts => ["ip of elasticsearch:9200"]
manage_template => false
index => "server1logs-%{+YYYY.MM.dd}"
user => "elastic"
password => "password"
}
}
if "sever2" in [tags] {
elasticsearch {
hosts => ["ip of elasticsearch:9200"]
manage_template => false
index => "server2logs-%{+YYYY.MM.dd}"
user => "elastic"
password => "password"
}
}
}