首页 > 其他 > 详细

curator配置及使用

时间:2020-02-16 18:28:51      阅读:140      评论:0      收藏:0      [点我收藏+]

1、action.yml

---
actions:
  1:
    action: index_settings
    options:
      index_settings:
        index:
           routing.allocation.require.hotwarm_type: warm
      ignore_empty_list: True
      disable_action: False
      continue_if_exception: True
    filters:
    - filtertype: pattern
      kind: regex
      value: ‘^(indices).*$‘
    - filtertype: age
      source: name
      direction: older
      timestring: ‘%Y.%m.%d‘
      unit: days
      unit_count: 1

  2:
    action: close
    options:
      ignore_empty_list: True
      disable_action: False
      continue_if_exception: True
    filters:
    - filtertype: pattern
      kind: regex
      value: ‘^(indices).*$‘
    - filtertype: age
      source: name
      direction: older
      timestring: ‘%Y.%m.%d‘
      unit: days
      unit_count: 30
     
  3:
    action: delete_indices
    description: >-
      Delete metric indices older than 3 days (based on index name), for
      zou_data-2018-05-01
      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
      continue_if_exception: True
    filters:
    - filtertype: pattern
      kind: regex
      value: ‘^(indices).*$‘
    - filtertype: age
      source: name
      direction: older
      timestring: ‘%Y%m%d‘
      unit: days
      unit_count: 15     

  4:
    action: index_settings
    options:
      index_settings:
        index:
           number_of_replicas: 0
      ignore_empty_list: True
      disable_action: False
      continue_if_exception: True
    filters:
    - filtertype: pattern
      kind: regex
      value: ‘^(indices).*$‘
    - filtertype: age
      source: name
      direction: older
      timestring: ‘%Y%m%d‘
      unit: days
      unit_count: 2

  5:
    action: forcemerge
    description: >-
      Delete metric indices older than 3 days (based on index name), for
      zou_data-2018-05-01
      prefixed indices. Ignore the error if the filter does not result in an
      actionable list of indices (ignore_empty_list) and exit cleanly.
    options:
      max_num_segments: 2
      delay: 120
      ignore_empty_list: True
      disable_action: True
      continue_if_exception: False
    filters:
    - filtertype: pattern
      kind: regex
      value: ‘^(indices).*$‘
    - filtertype: age
      source: name
      direction: older
      timestring: ‘%Y%m%d‘
      unit: days
      unit_count: 2

 

2、config.yml

---
# Remember, leave a key empty if there is no value.  None will be a string,
# not a Python "NoneType"
client:
  hosts:
    - 192.168.0.101
  port: 9200
  url_prefix:
  use_ssl: False
  certificate: 
  client_cert:
  client_key:
  ssl_no_validate: True
  http_auth: elastic:xxxx
  timeout: 30
  master_only: False

logging:
  loglevel: INFO
  logfile:
  logformat: default
  blacklist: []

 

curator配置及使用

原文:https://www.cnblogs.com/lwhctv/p/12317493.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!