问题标签 [elasticsearch-curator]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2415 浏览

elasticsearch - 如何从elasticsearch中连续删除旧的流利日志?

Fluentd 日志收集器写入 Elasticsearch,最终填满磁盘。例如,如何将它们限制为一个月?

Fluentd 配置的一部分(使用 Kubernetes):

Elasticsearch的“策展人”,可以删除“索引”,但我不知道Fluentd创建了什么索引,什么时候停止使用它们,当索引中仍有有用的新日志时删除索引是什么意思?

0 投票
1 回答
329 浏览

elasticsearch - can't use curator 3.4.1 to delete logs in my ELK Version: 5.6.5

I have ELK 5.6.5 and am trying as usual to use curator to delete old logs but but fails now.

I have used the command $ sudo apt-get install elasticsearch-curator to install curator When running the curator command and the output as shown below :

Any ideas how to get curator work, or another idea to delete old logs? TIA

0 投票
2 回答
2157 浏览

devops - 无法在 linux 中找到 curator.yml(elasticsearch-curator)

elasticsearch官网说默认配置文件存在于/home/username/.curator/curator.yml

https://www.elastic.co/guide/en/elasticsearch/client/curator/current/command-line.html

但是没有这样的文件夹。另外,我尝试创建 curator.yml 并使用 --config 选项提供路径。但是,它给我带来了错误

安装是使用 apt 完成的

帮我创建一个配置文件,因为我想删除我的日志索引

0 投票
1 回答
607 浏览

python - Failed to filter and delete old indices of elasticsearch using curator python API

I'm trying to use curator python API to periodically delete old logs in elasticsearch. In my code output, it seems I can't filter the indices I want which stuck me several days. Anyone can help to have a look if I have done anything wrong? I used elasticsearch-curator version 5.4.1 and tested elasticsearch 5.5 on EC2, aws elasticsearch 5.5 and aws elasticsearch 6.0 and the results are the same.

Following is my code:

And following is the output:

Thank you in advance!

0 投票
1 回答
771 浏览

elasticsearch - Elasticsearch Curator cronjob

我打算让 cronjob 在 elasticsearch 上做 curator

0 17 * * * /usr/local/bin/curator_cli --host localhost delete indices --older-than 7 --time-unit days --timestring '\%Y.\%m.\%d' >> /var/log/curator.log 2>&1

它给我的日志错误

错误:没有这样的命令“删除”

错误:没有这样的选项:--older-than

什么命令应该替换 delete 和早于?

谢谢你。

0 投票
1 回答
379 浏览

firebase - 在 Elasticsearch 上迁移(创建或更新)索引和类型 Mappgins

我已经在 Firebase 上启动了一个新的 Serverless Angular 5 应用程序。

在这个应用程序中,必须维护一些 Elasticsearch 的索引和类型。

我一直在寻找一种解决方案,它可以让我在应用程序部署期间/之后自动自动创建/更新索引和/或类型映射(类似于Rails/Laravel 迁移所做的事情)。

到目前为止,我发现的最接近的东西是策展人工具。

然而,在运行了一些测试之后,我无法实现自动化:

  • 仅当它们不存在时才创建索引和/或类型映射。
  • 仅在必要时更新索引和/或类型映射。

在尝试自己处理这个问题之前,我想知道是否有合适的技术来解决这个问题?

0 投票
1 回答
2696 浏览

elasticsearch - elasticsearch curator 删除“所有”索引订单超过 7 天

背景:

现在我可以使用 curator 删除一个订购 7 天的索引,但是我有多个索引并且我不想创建多个 action.yml,例如:

根据这个action.yml,它删除了student=2017-XX-XX。但是我有很多指标,比如老师、家长等等。我用 *= 替换了 studnet= 但不起作用。

那么我能做什么呢?非常感谢。

0 投票
1 回答
10538 浏览

python - 无法导入模块“lambda_function”:没有名为“error”的模块

我有一个简单的 Python 代码,它使用 Elasticsearch 模块“curator”来制作快照。我已经在本地测试了我的代码并且它可以工作。

现在我想在 AWS Lambda 中运行它,但我遇到了这个错误:

无法导入模块“lambda_function”:没有名为“error”的模块

这是我如何进行的:

我手动创建了一个 Lambda 并给它一个“AISA-BasicLambdaExecutionRole”角色。然后我用我的函数和我用命令安装的依赖项创建了我的包:

我压缩了内容(不是文件夹)并将其上传到我的 Lambda 中。我将处理程序名称更改为“lambda_function.lambda_handler”(我的函数名称是“lambda_function.py”)。

我错过了什么 ?这是我第一次使用 Lambda 和 Python

我已经看到有关此错误的其他问题:

"errorMessage": "无法导入模块 'lambda_function'"

但没有什么对我有用。

编辑 :

这是我的 lambda_function :

感谢您的时间。

0 投票
1 回答
854 浏览

elasticsearch - Elastic Curator 是否可以删除匹配字段值的索引

我们的 elasticsearch 上有几个索引。它们来自 FluentD 插件,从我们的 docker 容器中发送日志。我们不仅希望根据索引名称删除超过特定天数的旧索引,还希望根据日志字段应用不同的删除规则。

下面是一个日志示例:

在这种情况下,我们想删除所有匹配@log_name = docker.redis超过 7 天的日志。

是否可以定义一个 Curator 操作来删除由此类字段值过滤的索引?

我们尝试了不同的过滤,但没有成功。我们成功执行的唯一操作是基于索引名称:

0 投票
2 回答
1518 浏览

elasticsearch-5 - 当“时间单位”=“天”时,ELK Curator如何管理月/周索引

在我们公司的标准 elasticsearch 和 curator 实现之上,我们有一个自定义包装器。我想知道当默认“时间单位”设置为“天”时,策展人处理“每月/每周”索引的行为是什么。

**我无法覆盖默认的“时间单位”

这是我们的每月/每周索引如何命名的示例格式

月度指数格式

每周索引格式

Delete_Index.yml - 策展人删除指令

实施上述配置,每月索引保留时间为 60 天,每周索引保留时间为 30 天。

该配置于 **2018 年 4 月 4 日执行,结果为**

执行后保留的月度索引

由于上述索引 ^^ 仅包含 31+4=35 天的索引数据,而不是预期的 60 天。

我期待 curator 会保留以下索引

谁能解释为什么馆长无法保留 60 天的索引?