
这是Elasticsearch Curator的Docker化版本,一个用于管理基于时间的索引的工具。该Docker镜像基于https://hub.docker.com/r/library/python/tags/3.6-alpine/构建(镜像大小仅30MB)。
Docker Hub地址:https://hub.docker.com/r/anjia0532/docker-curator/
该镜像提供了Elasticsearch Curator的容器化部署方式,方便用户管理Elasticsearch中基于时间的索引,如自动删除过期索引,以优化存储空间和性能。适用于需要定期清理历史索引的Elasticsearch环境。
yamlversion: '2' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:x.y.z ports: - 9200:9200/tcp #environment: # - http.host=0.0.0.0 # - transport.host=127.0.0.1 # 取消注释以下部分可从卷加载elasticsearch数据 #volumes: # - /data/path/to/host/:/usr/share/elasticsearch/data curator: image: anjia0532/docker-curator environment: UNIT_COUNT: 10 UNIT: days ES_HOST: elasticsearch depends_on: - elasticsearch volumes: - /config/path/to/host/:/config
环境变量默认值
yamlactions: 1: action: delete_indices description: >- 删除早于${UNIT_COUNT:1} ${UNIT:months}的索引(基于索引名称),适用于logstash- 前缀的索引。如果过滤器未生成可操作的索引列表,则忽略错误(ignore_empty_list)并正常退出。 options: ignore_empty_list: True timeout_override: continue_if_exception: True disable_action: False filters: - filtertype: pattern kind: prefix value: logstash- exclude: - filtertype: age source: name direction: older timestring: '%Y.%m.%d' unit: ${UNIT:months} unit_count: ${UNIT_COUNT:1} exclude: # 2: # action: delete_indices # description: >- # 删除早于${UNIT_COUNT:1} ${UNIT:months}的索引(基于索引名称),适用于filebeat- # 前缀的索引。如果过滤器未生成可操作的索引列表,则忽略错误(ignore_empty_list)并正常退出。 # options: # ignore_empty_list: True # timeout_override: # continue_if_exception: True # disable_action: False # filters: # - filtertype: pattern # kind: prefix # value: filebeat- # exclude: # - filtertype: age # source: name # direction: older # timestring: '%Y.%m.%d' # unit: ${UNIT:months} # unit_count: ${UNIT_COUNT:1} # exclude: # 3: # action: delete_indices # description: >- # 删除早于${UNIT_COUNT:1} ${UNIT:months}的索引(基于索引名称),适用于heartbeat- # 前缀的索引。如果过滤器未生成可操作的索引列表,则忽略错误(ignore_empty_list)并正常退出。 # options: # ignore_empty_list: True # timeout_override: # continue_if_exception: True # disable_action: False # filters: # - filtertype: pattern # kind: prefix # value: heartbeat- # exclude: # - filtertype: age # source: name # direction: older # timestring: '%Y.%m.%d' # unit: ${UNIT:months} # unit_count: ${UNIT_COUNT:1} # exclude: # 4: # action: delete_indices # description: >- # 删除早于${UNIT_COUNT:1} ${UNIT:months}的索引(基于索引名称),适用于zipkin- # 前缀的索引。如果过滤器未生成可操作的索引列表,则忽略错误(ignore_empty_list)并正常退出。 # options: # ignore_empty_list: True # timeout_override: # continue_if_exception: True # disable_action: False # filters: # - filtertype: pattern # kind: prefix # value: zipkin- # exclude: # - filtertype: age # source: name # direction: older # timestring: '%Y.%m.%d' # unit: ${UNIT:months} # unit_count: ${UNIT_COUNT:1} # exclude:
环境变量默认值
--- # 注意,如果没有值,请将键留空。None将是字符串,而非Python的"NoneType" client: hosts: - ${ES_HOST:127.0.0.1} port: 9200 url_prefix: use_ssl: ${USE_SSL:False} certificate: client_cert: client_key: ssl_no_validate: False http_auth: ${HTTP_AUTH:''} timeout: ${TIMEOUT:120} master_only: ${MASTER_ONLY:True} logging: loglevel: INFO logfile: logformat: default #blacklist: ['elasticsearch', 'urllib3']
每天凌晨0点执行:
bash0 0 * * * curator --config /config/config_file.yml /config/action_file.yml
完整参考文档请访问:[***]
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务