Yottasearch相关问题

日志易技术支持发表于:2019年04月08日 15:11:27更新于:2019年04月12日 11:51:40

1、查询集群健康情况

curl -XGET yottasearch10:9200/_cluster/health?pretty

如果集群状态为red,需要观察active_shards_percent_as_number是否有变化如果长时间无变化需要查看分片进度和未分片原因

查看分片进度
curl -s -XGET yottasearch10:9200/_cat/recovery?active_only
未分片原因
curl -s  yottasearch10:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason | grep UN

cluster_recovered表示集群正在恢复



2、列出集群所有node节点

curl -XGET yottasearch10:9200/_cat/nodes?v

可以看到heap.percent、机器负载、主节点


3、开关指定索引

例如:关闭2019年3月索引

curl  -XPOST yottasearch10:9200/yotta-201903*/_close

例如:开启2019年3月索引

curl  -XPOST yottasearch10:9200/yotta-201903*/_open


4、列出所有index

curl -XGET yottasearch10:9200/_cat/indices?v


按index大小排序(docs.count)
curl -s -XGET yottasearch10:9200/_cat/indices?v | sort -k 6
按index名称排序
curl -s -XGET yottasearch10:9200/_cat/indices?v | sort -k 3


5、查看yottasearch的gc情况

/opt/rizhiyi/java/bin/jstat  -gcutil  yottasearch进程ID  1000



6、关闭指定索引的副本分片

例如:关闭2019年3月所有索引的副本分片

curl -XPUT yottasearch10:9200/yotta-201903*/_settings -d '{ "index": {"number_of_replicas": 0}}'



日志分析更容易
    您需要登录后才可以回复