AWS ES ISM学习应用笔记
Elastic Search 6以上版本推出 ILM,用于管理Index的生命周期,但AWS上的ES是基于OSS版本的ES,所以自己开发了ISM来代替ILM。项目是从logstash往ES写入数据,但碰到无法在Logstash开启ILM_enabled=true的问题,这样就无法直接让logstash应用ISM。通过查询资料,最后发现AWS的 ES OSS关闭了ilm。而是直接在ism里去做所有的设置,Logstash指定index alias写入数据即可。
第一步:编写 State management policies
{
"policy_id": "Test_ILM_policy",
"description": "Demonstrate a hot-warm-cold-delete workflow.",
"last_updated_time": 1640873761350,
"schema_version": 1,
"error_notification": null,
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [
{
"rollover": {
"min_doc_count": 200,
"min_index_age": "2h"
}
},
{
"read_write": {}
}
],
"transitions": [
{
"state_name": "warm",
"conditions": {
"min_index_age": "3h"
}
}
]
},
{
"name": "warm",
"actions": [
{
"timeout": "24h",
"retry": {
"count": 5,
"backoff": "exponential",
"delay": "15m"
},
"warm_migration": {}
}
],
"transitions": [
{
"state_name": "cold",
"conditions": {
"min_index_age": "4h"
}
}
]
},
{
"name": "cold",
"actions": [
{
"cold_migration": {
"start_time": null,
"end_time": null,
"timestamp_field": "@timestamp",
"ignore": "none"
}
}
],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "30d"
}
}
]
},
{
"name": "delete",
"actions": [
{
"cold_delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"test-ilm-index-*"
],
"priority": 100,
"last_updated_time": 1640094369756
}
]
}
第二步:编写index template关联 policy
PUT _index_template/test_ilm_index_template
{
"index_patterns": ["test-ilm-index-*"],
"template": {
"settings": {
"number_of_shards": 2,
"number_of_replicas": 0,
"index": {
"opendistro": {
"index_state_management": {
"rollover_alias": "test-ilm-indexs"
}
}
}
},
"mappings": {
"properties": {
"@timestamp": {
"format": "strict_date_optional_time||epoch_millis",
"type": "date"
}
}
}
}
}
第三步:创建index,关联index template rollover alias
PUT test-ilm-index-000001
{ "aliases": {
"test-ilm-indexs": {
"is_write_index": true
}
}
}
第四步:Logstash指定写入的index=index template rollover alias
hosts => ["]
user => ""
password => ""
index => "test-ilm-indexs"
ssl => true
官方文档:https://opensearch.org/docs/latest/im-plugin/ism/policies/#sample-policy-with-ism-template-for-auto-rollover
AWS ES ISM学习应用笔记的更多相关文章
- 每天成长一点---WEB前端学习入门笔记
WEB前端学习入门笔记 从今天开始,本人就要学习WEB前端了. 经过老师的建议,说到他每天都会记录下来新的知识点,每天都是在围绕着这些问题来度过,很有必要每天抽出半个小时来写一个知识总结,及时对一天工 ...
- DSP28377S - ADC学习编程笔记
DSP28377S - ADC学习编程笔记 彭会锋 2016-08-04 20:19:52 1 ADC类型导致的配置区别 F28377S的ADC类型是Type 4类型,我的理解是不同类型的ADC采 ...
- 学习ReactNative笔记整理一___JavaScript基础
学习ReactNative笔记整理一___JavaScript基础 ★★★笔记时间- 2017-1-9 ★★★ 前言: 现在跨平台是一个趋势,这样可以减少开发和维护的成本.第一次看是看的ReactNa ...
- 深度学习word2vec笔记之算法篇
深度学习word2vec笔记之算法篇 声明: 本文转自推酷中的一篇博文http://www.tuicool.com/articles/fmuyamf,若有错误望海涵 前言 在看word2vec的资料 ...
- 强化学习读书笔记 - 02 - 多臂老O虎O机问题
# 强化学习读书笔记 - 02 - 多臂老O虎O机问题 学习笔记: [Reinforcement Learning: An Introduction, Richard S. Sutton and An ...
- 强化学习读书笔记 - 05 - 蒙特卡洛方法(Monte Carlo Methods)
强化学习读书笔记 - 05 - 蒙特卡洛方法(Monte Carlo Methods) 学习笔记: Reinforcement Learning: An Introduction, Richard S ...
- 强化学习读书笔记 - 06~07 - 时序差分学习(Temporal-Difference Learning)
强化学习读书笔记 - 06~07 - 时序差分学习(Temporal-Difference Learning) 学习笔记: Reinforcement Learning: An Introductio ...
- (转)深度学习word2vec笔记之基础篇
深度学习word2vec笔记之基础篇 声明: 1)该博文是多位博主以及多位文档资料的主人所无私奉献的论文资料整理的.具体引用的资料请看参考文献.具体的版本声明也参考原文献 2)本文仅供学术交流,非商用 ...
- 深度学习word2vec笔记之基础篇
作者为falao_beiliu. 作者:杨超链接:http://www.zhihu.com/question/21661274/answer/19331979来源:知乎著作权归作者所有.商业转载请联系 ...
- Python学习基础笔记(全)
换博客了,还是csdn好一些. Python学习基础笔记 1.Python学习-linux下Python3的安装 2.Python学习-数据类型.运算符.条件语句 3.Python学习-循环语句 4. ...
随机推荐
- C# WinForm线程里操作控件
做winform程序,避免不了的要在线程里控制窗体上的控件,直接在子线程里操作控件会报错"线程间操作无效,从不是创建控件***的线程访问它". 解决方法: private void ...
- 【Linux】常用基本指令大汇总系列(篇一)【超详细的图解保姆教程】
常用基本指令大汇总系列(篇一) 大家好,欢迎大家来到我的博客.从今天开始,博主就要开启一个全新的系列了!Linux操作系统常用基本指令汇总系列,当大家按顺序学完这个系列,在Linux上编写基本的C语言 ...
- 看New Bing回答世纪难题:女友和妈妈掉水里先救谁
1.女友和妈妈掉水里先救谁 今天好奇想看看New Bing怎么回答这种世纪难题 结果New Bing非常聪明,反手建议我不要直接回答这个问题,而是换个角度哄女朋友,带着点不甘心,我继续追问它 New ...
- (C语言)每日代码||2023.12.23||for循环的循环条件部分可以是数字
#include <stdio.h> int main() { int i = 3; for (i; i; i--) { printf("%d\n", i); } // ...
- idea报错 Error running GctlBrpApplication. Command line is too long. Shorten the command line and rerun.解决方案
idea新导入项目有时候会出现以下报错,解决方法如下: 一:报错截图,报错原因是命令行太长,让缩短命令长度再运行. 二:解决方法如下:在剪头标记位置加入代码: <property name=&q ...
- Rating 算法
Rating 算法 这是一种 OJ 常用的算法,下面进行介绍 公式 $ Rating $ 的计算公式如下: $ Rating = R + K(P - E) $ 这里 $ R $ 表示当前 $ Rati ...
- ADG备库中某个PDB缺失temp文件
之前认为缺失的temp文件在开库时会自动创建,但其实也有不能自动创建的场景,alert会有类似如下提示: 2023-05-11T20:35:35.974983+08:00 AWR(6):******* ...
- Linux-Shell变量的算术运算
一.算术运算符 1.+.- 求和. a+b a-b 2. *./.% 求乘积,商,余数 a*b a/b a/b 3.** 幂运算,例如 3**3 是求 3 的立方,即 27 4. ...
- 在Windows上使用.NET部署到Docker 《让孩子们走出大坑》
折腾Docker 有几天了,整别的都没这个糟心.目前已经顺利部署运行起来了.顺便给大家分享下处理在Windows上使用.NET部署到Docker的相关问题解决方法. 1. Docker无法安装问题 ...
- UVA12467 Secret Word 题解
题目传送门 前置知识 前缀函数与 KMP 算法 解法 考虑将 \(S\) 翻转后得到 \(S'\),然后就转化为求 \(S'\) 的一个最长子串使得其是 \(S\) 的前缀.使用 KMP 求解即可. ...