Appending data in Elasticsearch indexes


(Aakash Garg) #1

I have 2 servers where Elasticsearch Indexes are stored with same index name but different data on both the indexes, now there is requirement of putting that data into one server, so I want to append the data of both the indexes(present on 2 different servers) into single index, how i can do that.
Currently, I am using this configuration for appending the data.

input {
elasticsearch {
hosts => "server1:9200"
index => "logstash-2015.12.16"
}
}
filter {
mutate {
remove_field => [ "@version", "@timestamp" ]
}
}
output {
elasticsearch {
host => "localhost"
port => 9200
protocol => "http"
manage_template => false
index => "logstash-2015.12.16"
}
}


(Mark Walkom) #2

Does that not work?


(Aakash Garg) #3

No, it does not work


(Mark Walkom) #4

Why does it not work?


(Aakash Garg) #5

Logstash shows the error of connection refused
I tried after opening all ports and public access to elasticsearch was given


(Mark Walkom) #6

Providing the error would be helpful.


(Aakash Garg) #7

Apologies for the very late reply.
The above configuration is working fine.


(system) #8