使用版本7.17.0
中的ES工具链,我想使用自定义名称设置ILM + index_template。
但是从documentation开始
If index lifecycle management is enabled (which is typically the default), setup.template.name and setup.template.pattern are ignored.
好像不太可能。
现在的问题:
- 在启用ILM时是否可以设置自定义模板名称(使用自定义设置)?
- 是否可以在filebeat中运行两个安装文件?(例如
filebeat setup --index-management --dashboards -c setup-ilm.yml && filebeat setup --index-management --dashboards -c setup-template.yml
)? - 我可以把这些安装文件放在filebeat(docker图像)的某个地方自动执行吗?我看到只有
modules
和inputs
文件夹安装。
当我执行了上面的安装文件后,我看到了以下内容:
Loading ILM policy and write alias without loading template is not recommended. Check your configuration.
Index setup finished.
Loading dashboards (Kibana must be running and reachable)
Loaded dashboards
ILM policy and write alias loading not enabled.
Index setup finished.
Loading dashboards (Kibana must be running and reachable)
Loaded dashboards
setup-ilm.yml
setup:
ilm:
enabled: true
policy_file: "ilm-policy.json"
template:
enabled: false
output.elasticsearch:
hosts: ["elasticsearch:9200"]
setup-template.yml
setup:
ilm:
enabled: false
template:
enabled: true
name: "${ES_NAMESPACE:+${ES_NAMESPACE}-}filebeat-%{[agent.version]}"
pattern: "${ES_NAMESPACE:+${ES_NAMESPACE}-}filebeat-%{[agent.version]}-*"
kibana:
host: "kibana:5601"
index:
number_of_shards: 1
mapping:
total_fields:
limit: 5000
output.elasticsearch:
hosts: ["elasticsearch:9200"]
1条答案
按热度按时间amrnrhlw1#
这就是我如何定制索引名称+生命周期策略的,我使用ECK的弹性操作符,所以如果不是你的情况,它可能会有所不同。所以,假设ECK和弹性已经安装了这是我的beats yaml文件:
据我所知,这将创建一个名为filebeat的索引模板,它与模式
*-filebeat-*
匹配,并为该索引创建一个名为filebeat的策略。我希望这能有所帮助,因为文档记录很差,他们甚至有一个开放的问题来改进文档:https://github.com/elastic/beats/issues/11866