A photo of Mitesh Shah

Mitesh Shah

Linux Expert | Automation Enthusiast | Security Consultant

Email Skype Github Twitter Resume Hire Me Keybase LinkedIn Stackoverflow


How to Configure ElasticSearch

Overview

Configure Elastic{Search}

  • For ElasticSearch, We have to update elasticsearch configuration file.
$ cat /etc/elasticsearch/elasticsearch.yml
# Cluster name identifies your cluster for auto-discovery. If you're running
# multiple clusters on the same network, make sure you're using unique names.
cluster.name: Gateway

# Note, that for development on a local machine, with small indices, it usually
# makes sense to "disable" the distributed features:
index.number_of_shards: 1
index.number_of_replicas: 0

# Allow to create logstash index
action.auto_create_index: logstash-*

Restart ElasticSearch Service

$ sudo service elasticsearch restart

Check ElasticSearch Status

$ curl 127.0.0.1:9200
{
  "status" : 200,
  "name" : "Spellbinder",
  "cluster_name" : "Gateway",
  "version" : {
    "number" : "1.7.1",
    "build_hash" : "b88f43fc40b0bcd7f173a1f9ee2e97816de80b19",
    "build_timestamp" : "2015-07-29T09:54:16Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}




Post Navigation