当前位置:网站首页>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边栏推荐
- Using C language to realize three piece chess games
- [dynamic planning -- the best period for buying and selling stocks Series 2]
- NiO example
- OJ 1253 点菜问题
- OJ 1020 minimum palindromes
- [C note] data type and storage
- Leetcode 刷题日记 剑指 Offer II 047. 二叉树剪枝
- Everything you don't know about time complexity is here
- 如何描述一个BUG以及BUG级别的定义、生命周期
- 【C笔记】数据类型及存储
猜你喜欢

Leetcode brush question diary sword finger offer II 055. binary search tree iterator
![[explain in detail how to realize Sanzi chess step by step]](/img/17/68ef51ec2be0c86019461116ecaa82.png)
[explain in detail how to realize Sanzi chess step by step]

Development of clip arbitrage / brick carrying arbitrage system

AQS之ReentrantLock源码解析

mongoDB复制集及分片集群
![[hash table basics]](/img/8f/54a4780a02f81e5de3d92c25248e1e.png)
[hash table basics]

Graphic pipeline foundation (part outside)

Battle plague Cup -- strange shape

【动态规划--买卖股票的最佳时期系列2】

下雨场景效果(一)
随机推荐
OJ 1129 分数矩阵
[pta---- output full arrangement]
SSAO By Computer Shader(三)
OJ 1284 记数问题
redis缓存设计与性能优化
[the beginning of self redemption]
Bug experience related to IAP jump of stm32
OJ 1451 数字游戏
[pta-- use queues to solve the problem of monkeys choosing kings]
代码整洁之道(一)
Analysis of the semaphore source code of AQS
动态规划--简单题型之爬楼梯
Network communication and tcp/ip protocol
Leetcode 刷题日记 剑指 Offer II 050. 向下的路径节点之和
Water drop effect on umbrella
网络通信及TCP/IP协议
[hash table basics]
SSAO By Computer Shader(二)
About the collation of shader keyword
OJ 1505 fuse