ES Curator检索管理组件

配置文件

主配置示例
# Remember, leave a key empty if there is no value.  None will be a string,
# not a Python "NoneType"
client:
  hosts:
    - ${ELASTIC_SEARCH_HOST:localhost}
  port: ${ELASTIC_SEARCH_PORT:9200}
  url_prefix:
  use_ssl: ${USE_SSL:True}
  certificate:
  client_cert:
  client_key:
  ssl_no_validate: True
  http_auth:
  timeout: 30
  master_only: False

logging:
  loglevel: INFO
  logfile:
  logformat: default
  blacklist: ['elasticsearch', 'urllib3']
Action配置示例
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 60 days (based on index name), for logstash-
      prefixed indices. Ignore the error if the filter does not result in an
      actionable list of indices (ignore_empty_list) and exit cleanly.
    options:
      ignore_empty_list: True
      disable_action: False
    filters:
        - filtertype: pattern
          kind: prefix
          value: ${INDEX_PREFIX:logstash-}
        - filtertype: age
          source: creation_date
          direction: older
          unit: days
          unit_count: ${DAYS_COUNT:60}

管理命令

curator --config config.yml action.yml

curator_cli --config config.yml show_indices --verbose

# 索引列表
curator_cli --host localhost --port 9200 show_indices --verbos

# 定期清理索引
curator_cli --host localhost --port 9200 [--http_auth 账号:密码] delete_indices --filter_list '{"filtertype":"pattern","kind":"regex","value":"log-2018.*.*"}'

转载于:https://my.oschina.net/u/2400083/blog/1838559

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值