ElasticSearch的一些常用restful接口-API

本文介绍了如何使用RESTful接口进行ElasticSearch的常见操作,包括查看集群节点信息、节点健康状态、索引详情、索引关闭与删除、缓存清理以及Logstash相关配置与进程管理。同时提供了相关链接以深入学习ElasticSearch和Logstash的优化及工作原理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看集群节点信息:curl -XGET 'http://IP:9200/_cat/nodes';(*表主)

 

查看节点健康信息:curl 'IP:9200/_cat/health?v';

curl -XGET 'http://IP:9200/_cluster/state/nodes?pretty'

 

节点详细信息:curl -XGET 'http://IP:9200/_cluster/health?pretty=true';

 

查看节点下索引详细信息:curl 'IP:9200/_cat/indices?v';

查看索引修复详情:http://IP:9200/index1,index2/_recovery?pretty=true

 

关闭节点下索引命令:curl -XPOST 'IP:9200/accesslog/_close';

 

删除节点下索引命令:curl -XDELETE 'http://IP:9200/accesslog'

杀进程:ps -ef | grep elasticsearch | grep -v grep | awk  '{print $2}' |xargs kill -9

清索引盘:curl  http://IP:9200/accesslog-*/_cache/clear

查看es索引mapping映射:curl 'http://IP:9200/nglog-*/_mapping?pretty'

 

 

简单的logstash输入输出(3) - LinuxEA:https://www.linuxea.com/1151.html#comment-176;

Logstash 讲解与实战应用-突破舒适区-51CTO博客: http://blog.51cto.com/tchuairen/1840596;

针对Logstash吞吐量的一次优化:https://blog.youkuaiyun.com/houzhe_adore/article/details/51315036

Pipline.rb: /opt/es/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.1-java/lib/logstash;

Kill logstash进程:ps -ef | grep logstash | grep -v grep | awk  '{print $2}' |xargs kill -9

 

translog优化:https://ezlippi.com/blog/2018/04/elasticsearch-translog.html

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值