User Tools

Site Tools


elasticsearch

This is an old revision of the document!


Elasticsearch

Quick Commands

Check Cluster Health
curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'
Node Information
curl -XGET 'http://localhost:9200/_nodes?pretty=true'
List all shards
curl -XGET 'http://localhost:9200/_cat/shards'
Detailed Shard Information
curl -XGET 'http://localhost:9200/_cat/shards/filebeat?pretty=true'

Templates

Errors

Error on content type header
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

In order to fix issue specify header with your curl XPUT.

Original Post

| exmple
curl -XPUT 'localhost:9200/_settings' -H 'Content-Type: application/json' -d '
{
    "index" : {
        "number_of_replicas" : 0
    }
}'
elasticsearch.1516295193.txt.gz · Last modified: 2020/08/10 02:28 (external edit)