Hi How could i export data from logstash to another ES cluster, which i never used before?
It is just i need to logstash the data from my local logstash to my team's ES Cluster, rather than my own test ES cluster...
I changed the cluster name already to the new cluster name in elasticsearch.yml. But my previous cluster still gets data...Anything else i shall do?
Any suggestion pls?
Change the Elasticsearch hostname in the elasticsearch output to one or more of the hosts in the cluster you want to send to. This has nothing to do with elasticsearch.yml.
If the host and port are the same and you've just renamed the cluster you don't have to do anything. Logstash's elasticsearch output doesn't care about the cluster name set in elasticsearch.yml.
If you want to send to a different cluster (and not the same cluster that has been renamed) the host and/or port must change. Two ES clusters can't listen on the same host:port combination.
My solution somehow works: I only changed the cluster name in the elasticsearch yml files. It works the second day, not immediately. i haven't switched back yet, not sure if there will be problem.
For your solution, to change the port or/and host, how can i do that? I think port 9200 is a fixed value for ES, and host value should also be the same value for everyone...?
Let me put it this way: You should point Logstash to the host and port of one or more of your Elasticsearch nodes. Period. Logstash doesn't care about the name of the cluster.
The hostname that ES listens to is obviously controlled by the host that it runs on, but if your server has multiple network interfaces you can select one of them if you don't want ES to be accessible on all interfaces. The default is indeed 127.0.0.1, and with that setting ES is of course not accessible from other hosts.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.