![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
写过的shell脚本
peng_zhi_hui
这个作者很懒,什么都没留下…
展开
-
脚本index.sh——控制频率往es写数据
脚本技术要点:1、切割文件2、http接口写es#!/bin/bashes_server=127.0.0.1#for i in `ls esCrash.data*`for i in `ls *data* |grep -v "\-D\-"`do line_num=$(wc -l $i |awk '{print $1}') if [原创 2017-11-17 10:18:20 · 693 阅读 · 0 评论 -
脚本——根据昨天es索引的大小,提前创建明天的索引
脚本主要用到的技术点有:1、date命令格式化输出2、for循环3、grep -E 用法4、bc计算5、es通过http接口检查索引存在方法,es通过http接口数据写入方法,es通过http创建索引方法原创 2017-11-16 10:26:17 · 1097 阅读 · 0 评论 -
自动迁移关闭es聚合索引
脚本技术要点curator工具使用脚本内容如下:========================================================================#!/bin/bashif [ -z "$(which curator 2>/dev/null)" ];then echo no tool curat原创 2017-12-21 15:53:41 · 1042 阅读 · 0 评论 -
节点重启后分片不恢复,日志也没有什么错误提示,最终手动恢复
手动恢复方法:通过以下脚本生成恢复unassigned分片的脚本#!/bin/shfor index in $(curl -s 'http://localhost:9200/_cat/shards' | grep UNASSIGNED | awk '{print $1}' | sort | uniq); do for shard in原创 2017-12-31 13:05:08 · 244 阅读 · 0 评论