首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在linux中找不到curator.yml (elasticsearch-curator)

在linux中找不到curator.yml (elasticsearch-curator)
EN

Stack Overflow用户
提问于 2018-01-10 18:51:23
回答 2查看 2.1K关注 0票数 1

elasticsearch的官方网站表示,默认配置文件存在于/home/username/.curator/curator.yml中

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

但是没有这样的文件夹。另外,我尝试使用-- curator.yml选项创建配置并给出路径。但是,它抛出了错误

代码语言:javascript
复制
curator --config ./curator.yml    
Error: no such option: --config

安装是使用apt完成的

代码语言:javascript
复制
sudo apt-get update && sudo apt-get install elasticsearch-curator

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

EN

回答 2

Stack Overflow用户

发布于 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,那么您安装的是较旧的版本。请检查您运行的是哪个版本:

代码语言:javascript
复制
$ curator --version
curator, version 5.4.1

如果您看不到当前版本(添加此答案时为5.4.1),则说明您没有安装相应的存储库。

官方文档提供了一个示例客户端配置文件here

examples中还有许多操作文件的示例

票数 0
EN

Stack Overflow用户

发布于 2019-09-24 15:34:15

是的,需要同时创建curator.ymlaction.yml文件。因为我在centos7上,我碰巧从RPM安装了curator,在它的默认的/opt/elastic-curator‘中,我可以关注这个很好的博客(但格式很糟糕!):https://anchormen.nl/blog/big-data-services/monitoring-aws-redshift-with-elasticsearch/到ge文件如下(你可以根据你的需要修改):

curator.yml

代码语言:javascript
复制
---
# 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,如下所示:

代码语言:javascript
复制
---
# 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: 1
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48185751

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档