ELK stack is widely used for logging and monitoring indexes.
GET /_cluster/health
GET /_cat/indices
GET /_cat/nodes
You can search for RED as well by replacing yellow with red and similarly to green.
GET /_cat/indices?v&health=yellow
GET /cache-2021.08/_search
GET /_cat/shards
To get the shards for specific index.
GET /_cat/shards/application-*?v&s=index,prirep,shard
GET /_cat/snapshots/eslog_backup
To check the path/location where the ES snapshot stored.
GET _snapshot
To assign specific path for storing data.
PUT /_snapshot/eslog_backup
{
"type": "fs",
"settings": {
"location": "/data/mnt/eslog-backup",
"compress": true
}
}
GET /_cat/repositories
GET /security-2022.09/_settings
GET /_cat/allocation
DELETE /application-2021.03
DELETE /nginx-access-2021.12
GET /_searchguard/health
GET /haproxy-2022.05/_mapping/
GET /_tasks
GET /_tasks/InsLRJoIQKO76mb0LjVLCg:158918900
GET /_tasks/InsLRJoIQKO76mb0LjVLCg:203627912
GET /saml-2022.04/_settings
Update certain field
PUT /saml-2022.04/_settings
{
"index.mapping.total_fields.limit": 2000
}
POST _reindex
{
"source": {
"index": "security-2022.03"
},
"dest": {
"index": "security-application-2022.03"
}
}
or
POST _reindex?wait_for_completion=false
{
"source": {
"index": "security-2022.04"
},
"dest": {
"index": "security-application-2022.04"
}
}
PUT /_settings
{
"index": {
"blocks": {
"read_only_allow_delete": "false"
}
}
}
DELETE /nginx-access-2022.04
POST _cluster/reroute?retry_failed
PUT /_cluster/settings
{
"transient": {
"cluster.routing.allocation.enable": "none"
}
}
To Enable it back.
PUT /_cluster/settings
{
"transient": {
"cluster.routing.allocation.enable": "all"
}
}