Hook one elasticsearch with another ES using logstash


(Sujeet Kumar) #1

Is there any way we can hook an index from one Elasticsearch to another.

input {
elasticsearch {
index => "student_details"
hosts => ["http://localhost:9200"]
}
}

filter {
date {
match => [ "joinDate", "UNIX_MS", "MMM dd yyyy HH:mm:ss","MMM d yyyy HH:mm:ss", "ISO8601","UNIX_MS" ]
target => "@timestamp"
}

}

output {
file {
path => "C:/Users/sujeetk/Pictures/ELK_5.5/logstash-5.5.0/output/sample.output"
}
elasticsearch {
index => "student_details_backup"
hosts => ["http://localhost:9201"]
}
}

Now logstash pipeline is getting stopped after passing all documents. But I want to keep connection alive so that if any document is inserted or updated in index1 , it should update the same in index2.


(Magnus Bäck) #2

That kind of continuous operation is not supported by the elasticsearch input plugin.


(Jonar B) #3

I'm rooting for this also.

So it means it is not like another logs which the logstash gets any changes of that logs/file?


(Magnus Bäck) #4

So it means it is not like another logs which the logstash gets any changes of that logs/file?

Correct.


(Jonar B) #5

Thanks for your confirmation @magnusbaeck.
Do you have any suggestions or workaround for this? hmmm


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.