简体   繁体   English

Elasticsearch Marvel 将 .marvel-2015-* 索引设置为最大数量

[英]Elasticsearch Marvel set .marvel-2015-* indices to max number

Hey I am using marvel alongside elasticsearch and I am trying to avoid using curator to clean indices that look like ".marvel-2015-*" is there a specific config or set of configs that I can use to accomplish this.嘿,我使用marvel一起elasticsearch ,我试图避免使用curator洁净指数,看起来像“.marvel-2015 - *”是有CONFIGS的具体配置或设置,我可以用它来实现这一目标。

Note: I am using chef to provision the node and inside of the logstash cookbook I am setting the attribute in default.rb like so注意:我正在使用 Chef 来配置节点,并且在 logstash 食谱内部我正在 default.rb 中设置属性,如下所示

default['logstash']['instance_default']['curator_days_to_keep'] = 14

I would assume this sets the max amount of these indices to 14. But when I added some fake ".marvel-2015-*" indices they still appear and are not cleared out.我假设这将这些索引的最大数量设置为 14。但是当我添加一些假的“.marvel-2015-*”索引时,它们仍然出现并且没有被清除。

I realize that I am talking about a tool for working with marvel curator and marvel itself, but I am new to these tools and I need help connecting these dots.我意识到我在谈论一种用于与 Marvel curatormarvel本身合作的工具,但我对这些工具不熟悉,我需要帮助将这些点联系起来。

Ideally I want marvel to have the logic to just remove these indices by itself, and I don't know if there is some option to accomplish this in the plugins/marvel/marvel-1.3.1.jar理想情况下,我希望 marvel 具有自行删除这些索引的逻辑,我不知道在 plugins/marvel/marvel-1.3.1.jar 中是否有一些选项可以完成此操作

Any help would be appreciated.任何帮助,将不胜感激。

I agree that ideally Marvel should provide this as a configuration option but, at time of writing, it does not and over time, the marvel indexes can become quite big.我同意理想情况下 Marvel 应该将其作为配置选项提供,但在撰写本文时,它并没有,而且随着时间的推移,Marvel 索引会变得非常大。 Here's an example for a cluster I'm currently managing:这是我当前管理的集群的示例:

Marvel 索引大小与给定日期的实际数据

I know you want to avoid using Curator but short of writing your own script or plugin to manage this, it is by far the easiest way to deal with this.我知道您想避免使用Curator,但由于没有编写自己的脚本或插件来管理它,这是迄今为止最简单的处理方法。

To purge Marvel indexes older than 30 days, you can do:要清除超过 30 天的 Marvel 索引,您可以执行以下操作:

curator delete indices --timestring '%Y.%m.%d' --prefix '.marvel-2' --older-than 30 --time-unit 'days'

To test what would be deleted, I recommend to first use --dry-run :要测试将删除的内容,我建议首先使用--dry-run

curator --dry-run delete indices --timestring '%Y.%m.%d' --prefix '.marvel-2' --older-than 30 --time-unit 'days'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM