安装curator
------------------
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

vi /etc/yum.repos.d/curator.repo
[curator-5]
name=CentOS/RHEL 6 repository for Elasticsearch Curator 5.x packages
baseurl=https://packages.elastic.co/curator/5/centos/6
gpgcheck=1
gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

yum install elasticsearch-curator

action配置文件:只保存7天日志,删除7天前旧的日志。
----------------------------------------------------
cat delete_indices.yml
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: delete_indices
description: >-
Delete indices older than 7 days (based on index name), for logstash-
prefixed indices. Ignore the error if the filter does not result in an
actionable list of indices (ignore_empty_list) and exit cleanly.
options:
ignore_empty_list: True
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: logstash-
exclude: False
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 7

执行命令:curator  --config config.yml delete_indices.yml

curator_cli命令行
-------------------------
查看所有索引:curator_cli --config config.yml show_indices --verbose

最新文章

  1. C语言动态走迷宫
  2. Visual Studio Code 配置指南
  3. sqlserver2008一直显示正在还原
  4. 求第K大数
  5. JavaScript的setTimeout和setInterval的深入理解
  6. 记第二次使用php开发项目之绝不重复自己
  7. C# textbox 滚动条 随文本输入 滚动
  8. 今天研究了下webservice 终于OK了
  9. asp.net网站发布到服务器GET的技能
  10. [AndroidTips]startService与bindService的区别
  11. 记录java/javascript让浮点数显示两位小数的方法
  12. 微信小程序分享到朋友圈方法与技巧
  13. sublime text3输出窗口中文显示乱码问题解决方案
  14. ECMA Script 6_Generator
  15. Azure系列2.1.9 —— CloudBlob
  16. 一些mysql小技巧总结
  17. 商务通服务器版LR_Data目录下相关配置文件
  18. 微信小程序之 真机键盘弹窗遮盖input框
  19. Nginx 中 FastCGI 配置示例
  20. adb启动和停止android app方法

热门文章

  1. PowerDesigner16 时序图
  2. Send Email in Robot Framework Python Using Gmail
  3. fs.createReadStream(filepath).pipe(response);这句是什么意思?
  4. linux内核启动分析(2)
  5. Redis 3.0 编译安装
  6. [How to]使用自定义cell进行tableview的创建,适用于cell样式不发生变化的情况。
  7. C语言string转int
  8. mui页面跳转
  9. CF1064 E - Dwarves, Hats and Extrasensory Abilities
  10. java中的Map集合