elasticsearch常用操作

POST /index{i}/_close //对索引进行关闭操作

GET /_cluster/settings?include_defaults=true //查看集群的默认配置信息

GET /_cluster/health //轮询等待集群恢复green状态 查看集群的健康状态

GET /_cat/indices //查看所有的索引信息

GET /_cat/indices?v&health=yellow //查看哪些索引状态是 yellow

GET _cat/indices?help //通过help参数,查看所有的参数释义

GET /索引名称/_stats //查看单个索引的信息

GET /_nodes/stats //查看节点信息

GET /_cat/nodes?v //查看节点信息2

GET /_nodes/节点ip/stats //查看某个节点的信息

GET /_nodes/节点ip/thread_pool //查看某个节点的线程池相关信息

GET /_nodes/节点ip/stats/breaker? //查看某个节点的熔断器的相关信息

GET /_cat/thread_pool/search //查看所有节点的搜索线程池相关信息

GET /_cat/nodes?v&h=ip,heap.percent //查看所有节点的堆内存使用情况

GET /_tasks?nodes=节点名称 //查看某个节点的后台任务信息


持久化配置参考
PUT /_cluster/settings
{
"persistent":{
"indices.recovery.max_bytes_per_sec" : "40mb"
}
}

临时配置参考
PUT /_cluster/settings?flat_settings=true
{
"transient":{
"indices.recovery.max_bytes_per_sec" : "40mb"
}
}

注意事项:
1)某些属性无法通过 API 修改,在修改这些属性时会返回:not dynamically updateable
此时这个参数就不能通过api来更改了,elasticsearch.yml中添加这些配置,修改配置文件并且重启服务
2)如果属性不存在,将返回:not recognized

 

posted @ 2024-03-07 09:04  金虹巴巴  阅读(2)  评论(0编辑  收藏  举报