ElasticSearch
curator
curator脚本
ElasticSearch安装
elasticsearch-5.4.1集群部署
zabbix实现暴力破解登录密码告警
ELK同步MySQL数据
ELK-分析Mysql慢查询日志
elasticsearch索引合并
Kibana开发工具
基本使用
Elastic接口调用样例
创建用户
本文档使用 MrDoc 发布
-
+
首页
curator脚本
# curator脚本 ## 使用方式 ``` curator 脚本名 ``` ## 创建索引别名 - 因为filebeat直接传输到elasticsearch中的索引名默认为filebeat-xxx, 为了更好的区分业务所以需要为filebeat传输的索引设置默认别名 如何设置别名在elk安装文档中已经提过,详见[安装ELK] 那么为了查询已经传输过的filebeat的索引,就需要单独为索引创建别名 脚本内容如下: filebeat-2021.12.16-000001 替换为旧索引名 nginx-logs-2021.12.16-000001 是你要增加的索引名 ```yaml actions: freeze-all: action: alias description: >- add alias to filebeat-2021.12.16-000001 options: name: nginx-logs-2021.12.16-000001 add: filters: - filtertype: pattern kind: prefix value: filebeat-2021.12.16-000001 exclude: ``` ## 冻结一个月以前的索引 减轻查询压力,一般来说一个月前的已经很少查询了. ```yaml actions: freeze-indices: action: freeze description: >- freeze indices older than 1 month. options: disable_action: False filters: - filtertype: pattern kind: prefix value: nginx-logs- exclude: - filtertype: age source: name direction: older timestring: '%Y.%m%' unit: months unit_count: 1 ```
zhangky
2021年12月16日 10:46
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码