当前位置:网站首页>Elastic common high frequency commands
Elastic common high frequency commands
2022-07-28 06:47:00 【opreator.ke】
1. View single node information
curl http://127.0.0.1:92002. View cluster information
curl http://127.0.0.1:9200/_cat/nodes?v3. View single node index information
curl -X GET '127.0.0.1:9200/_cat/indices?v'4. Check the cluster health check
curl -XGET 'http://127.0.0.1:9200/_cluster/health?pretty=true'5. Handle index read-only/ allow delete
curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'6.kibana Automatically create index configuration
curl -f -XPOST -H 'Content-Type: application/json' -H 'kbn-xsrf: anything' \
"http://127.0.0.1:5601/api/saved_objects/index-pattern/logname-{$date}" -d"{\"attributes\":{\"title\":\"logname*\",\"timeFieldName\":\"@timestamp\"}}"
7. Batch adjustment index yellow, Set replica set to 0
curl -XPUT "http://localhost:9200/_settings" -H 'Content-Type: application/json' -d'
{
"index" : {
"number_of_replicas" : 0
}
}'8. Restore replica set to 1
curl -XPUT "http://localhost:9200/_settings" -H 'Content-Type: application/json' -d'
{
"index" : {
"number_of_replicas" : 1
}
}'9.kibana Create index ,$index For the index you need to create
curl -f -XPOST -H 'Content-Type: application/json' -H 'kbn-xsrf: anything' "http://127.0.0.1:5601/api/saved_objects/index-pattern/$index-{$date}" -d"{\"attributes\":{\"title\":\"$index*\",\"timeFieldName\":\"@timestamp\"}}"10. kibana Batch index creation
file=demo.txt
# Get the number of index file lines
num=`wc -l ${file} | awk '{print $1}'`
echo $num
# Start circular index creation
for((i=1;i<=${num};i++));
do
echo "for loop --$i"
index=`sed -n "${i}p" $file | awk '{print $1}'`
echo " The index name : "$index
curl -f -XPOST -H 'Content-Type: application/json' -H 'kbn-xsrf: anything' \
"http://127.0.0.1:5601/api/saved_objects/index-pattern/${index}-{$date}" -d"{\"attributes\":{\"title\":\"${index}*\",\"timeFieldName\":\"@timestamp\"}}"
done边栏推荐
猜你喜欢
随机推荐
InitializingBean接口及示例
MySQL index optimization
[dynamic planning -- the best period for buying and selling stocks Series 2]
prometheus监控nacos
Source code analysis of countdownlatch of AQS
@PostConstruct注解及用处示例
Optimization ideas from ordinary query commodities to highly concurrent query commodities
mongoDB复制集及分片集群
【无标题】
OJ 1020 最小的回文数
Leetcode 刷题日记 剑指 Offer II 050. 向下的路径节点之和
Leetcode brush questions diary sword finger offer II 047. Binary tree pruning
【二叉树基础知识】
Redis cache design and performance optimization
Everything you don't know about time complexity is here
SSAO by computer shader (III)
elastic常用高频命令
SSAO By Computer Shader(一)
ZOJ Problem 1005 jugs
[队列,栈的简单应用----包装机]

![[explain in detail how to realize Sanzi chess step by step]](/img/17/68ef51ec2be0c86019461116ecaa82.png)







![[C language] dynamic memory management](/img/bb/2ec65b38e85f53269dc03d885d70f4.png)