Important elastic queries:
GET /
GET _nodes/stats
GET _cat/nodes?v
GET /_cat/health?v
GET /_cat/shards/matpa?v
GET _cat/indices?v
GET _cat/recovery?v
GET /_cat/shards/matpa?v
GET /_cat/thread_pool
GET _cluster/settings
GET /_cluster/allocation/explain
GET _cluster/health?level=nodes
GET _cluster/health?level=indices
GET /_cluster/allocation/explain?include_disk_info=true
GET _nodes?filter_path=**.
GET /_nodes/thread_pool
GET /_nodes?pretty&filter_path=nodes.*.settings.path.data”
GET /_all/_alias/*
Settings
PUT _cluster/settings
{
“transient”: {
“cluster.routing.allocation.include._ip”:”ip_address1″
}
}
PUT /my_temp_index
{
“settings”: {
“number_of_shards” : 1,
“number_of_replicas” : 0
}
}
PUT /matpa/_settings
{
“index”: {
“number_of_replicas”: 1
}
}
POST /_cluster/reroute
{
“commands” : [
{
“move” : {
“index” : “matpa”, “shard” : 4,
“from_node” : “node-001”, “to_node” : “node-003”
}
}
]
}
POST /_cluster/reroute
{
“commands”: [
{
“allocate_replica” : {
“index” : “infiniticache”, “shard” : 4,
“node” : “node-003”
}
}
]
}
GET _cat/indices?v
GET /_cat/master?v
GET /_cat/nodes?v
GET _cat/shards?v
get _cat/recovery?v
GET /_nodes/stats
GET /_cluster/health/matpa?level=shards
———–snapshot and restore—————-
GET /_snapshot/_all
—- to create repository ——
PUT /_snapshot/timo_backup2
{
“type”: “fs”,
“settings”: {
“compress” : true,
“location”: “/home/timo/elasticsearch-backup”
}
}
— to create snapshot of index —————–
PUT /_snapshot/respositoryName/snapshot_Name
{
“indices”: “index_1,index_2”,
“ignore_unavailable”: true,
“include_global_state”: false
}
–get the status of snapshot restore
GET /_snapshot/REPO_NAME/SNAPSHOT_NAME/_status
–close the index before restore
POST /matpa/_open
POST /_snapshot/my_backup/snapshot_1/_restore
{
“indices”: “index_1,index_2”,
“index_settings”: {
“index.number_of_replicas”: 0
},
“ignore_unavailable”: true,
“include_global_state”: true
}