I have setup Logstash server 1-> Kafka -> Logstash server 2-> Elasticsearch -> Kibana setup. Below is Logstash server 2 configuration files.
- 03-logstash-logs-kafka-consumer.conf
input {
kafka {
zk_connect => 'zk_netaddress:2181'
topic_id => 'logstash_logs'
codec => "json"
}
}
output{
stdout{}
}
- 30-elasticsearch-output.conf
output {
elasticsearch {
hosts => ["localhost:9200"]
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}
Though Logs are travelling from Logstash server 1 to Logstash server 2 through Kafka and Logstash server 2 can also output it to /var/log/logstash/logstash.stdout file but It is not able to output to elasticsearch configure with it. I have checked all services are running well and not Exception in logs of any service. Please post your suggestion. Thanks a lot in advance.