How to config Single node for Single Cluster (Standalone Cluster) ElasticSearch

后端 未结 9 618
一向
一向 2021-01-30 17:13

I installed elastic search in my local machine, I want to configure it as the only one single node in the cluster(Standalone Server). it means whenever I create a new index, it

9条回答
  •  既然无缘
    2021-01-30 17:35

    All of these didn´t help me (and I sadly didn´t read the answer of bhdrkn). The thing that worked for me was to change elasticsearch´s cluster-name everytime I need to have a separate instance, where new nodes aren´t added automatically via multicast.

    Just change cluster.name: {{ elasticsearch.clustername }} in elasticsearch.yml, e.g. via Ansible. This is particulary helpful, when building separate Stages like Dev, QA and Production (which is a standard usecase in enterprise-environments).

    And if you´re using logstash to get your data into elasticsearch, don´t forget to put the same cluster-name into the output-section, like:

    output {
        elasticsearch {
            cluster => "{{ elasticsearch.clustername }}"
        }
    }
    

    Otherwise your "logstash-*"-index will not be build correctly...

提交回复
热议问题