I want to use logstash for real time syncing of data in both mongodb and elasticsearch.
i am using mongoosastic for real time syncing and it is working fine but i am not able to trnasfer the existing mongodb documents into elasticsearch. I am able to send the existing mongodb documents into elasticsearch using logstash. so i want to use logstash for real time syncing instead of mongoosastic.
Please help me how i configure logstash in my nodejs and how to call the logstash function from nodejs itself instead of through command line.