elasticsearch的官方网站表示,默认配置文件存在于/home/username/.curator/curator.yml中
https://www.elastic.co/guide/en/elasticsearch/client/curator/current/command-line.html
但是没有这样的文件夹。另外,我尝试使用-- curator.yml选项创建配置并给出路径。但是,它抛出了错误
curator --config ./curator.yml
Error: no such option: --config安装是使用apt完成的
sudo apt-get update && sudo apt-get install elasticsearch-curator当我想删除我的日志索引时,帮我创建一个配置文件
发布于 2018-01-17 05:35:07
请注意,文档中没有说明文件在创建后存在,而是说:
如果未提供--
和CONFIG.YML,Curator将在~/.curator/curator.yml中查找配置文件。
文件必须由最终用户创建。
此外,如果您通过以下方式安装:
sudo apt-get update && sudo apt-get install elasticsearch-curator
但是没有添加official Elastic repository for Curator,那么您安装的是较旧的版本。请检查您运行的是哪个版本:
$ curator --version
curator, version 5.4.1如果您看不到当前版本(添加此答案时为5.4.1),则说明您没有安装相应的存储库。
官方文档提供了一个示例客户端配置文件here。
examples中还有许多操作文件的示例
发布于 2019-09-24 15:34:15
是的,需要同时创建curator.yml和action.yml文件。因为我在centos7上,我碰巧从RPM安装了curator,在它的默认的/opt/elastic-curator‘中,我可以关注这个很好的博客(但格式很糟糕!):https://anchormen.nl/blog/big-data-services/monitoring-aws-redshift-with-elasticsearch/到ge文件如下(你可以根据你的需要修改):
curator.yml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
client:
hosts:
- <host1>
- <host2, likewise upto hostN >
port: 9200
url_prefix:
use_ssl: False
certificate:
client_cert:
client_key:
ssl_no_validate: False
http_auth:
timeout: 30
master_only: False
logging:
loglevel: INFO
logfile: /var/log/curator.log
logformat: default
blacklist: []和一个action.yml,如下所示:
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: rollover
description: Rollover the index associated with index 'name', which should be in the form of prefix-000001 (or similar),or prefix-YYYY.MM.DD-1.
options:
disable_action: False
name: redshift_metrics_daily
conditions:
max_age: 1d
extra_settings:
index.number_of_shards: 2
index.number_of_replicas: 1
2:
action: rollover
description: Rollover the index associated with index 'name' , which should be in the form of prefix-000001 (or similar), or prefix-YYYY.MM.DD-1.
options:
disable_action: False
name: redshift_query_metadata_daily
conditions:
max_age: 1d
extra_settings:
index.number_of_shards: 2
index.number_of_replicas: 1https://stackoverflow.com/questions/48185751
复制相似问题