ES索引管理工具curator安装

ES索引管理工具curator

  • curator是一个用于管理es中的索引和快照的工具。
  • curator是用Python写的,可以作为命令行工具,也能作为python的API。

https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html

Features

  • Add or remove indices (or both!) from an alias
  • Change shard routing allocation
  • Close indices
  • Create index
  • Delete indices
  • Delete snapshots
  • Open closed indices
  • forceMerge indices
  • Change the number of replicas per shard for indices
  • Take a snapshot (backup) of indices
  • Restore snapshots

Version Compatibility

curator对es版本的支持情况:

https://www.elastic.co/guide/en/elasticsearch/client/curator/current/version-compatibility.html

Installation

从Curator 4.2开始,需要使用python3版本。

pip

# 如果python没装pip,安装pip:
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
python get-pip.py

# 安装当前版本
pip install elasticsearch-curator

# 安装特定版本:
pip install -U elasticsearch-curator==3.5.1

# 升级curator到最新新版本
pip install -U elasticsearch-curator

# 升级curator到指定版本
pip install -U elasticsearch-curator==3.5.1

APT repository

wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo 'deb http://packages.elastic.co/curator/4/debian stable main' > /etc/apt/sources.list.d/curator.list
sudo apt-get update && sudo apt-get install elasticsearch-curator

YUM repository

# 添加Elastic' Signing Key:
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

# RHEL/CentOS 6: 写/etc/yum.repos.d/curator.repo
[curator-4]
name=CentOS/RHEL 6 repository for Elasticsearch Curator 4.x packages
baseurl=http://packages.elastic.co/curator/4/centos/6
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

# RHEL/CentOS 7: 写/etc/yum.repos.d/curator.repo
[curator-4]
name=CentOS/RHEL 7 repository for Elasticsearch Curator 4.x packages
baseurl=http://packages.elastic.co/curator/4/centos/7
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

yum install elasticsearch-curator

Source Code

https://www.elastic.co/guide/en/elasticsearch/client/curator/current/python-source.html

wget https://pypi.python.org/packages/source/p/package/package-#.#.#.tar.gz
tar zxf package-#.#.#.tar.gz
cd package-#.#.#
python setup.py install

Curator Commands

  • curator
  • curator_cli
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 欢迎访问我的博客查看原文:http://wangnan.tech 注:文本整理自《ELKstack权威指南》 目录...
    GhostStories阅读 10,510评论 0 7
  • ElasticSearch优化 一:集群节点规划 elasticSearch的配置文件中有2个参数:node.ma...
    会飞的鱼Coo阅读 4,471评论 0 4
  • 欢迎访问我的博客查看原文:http://wangnan.tech 注:文本整理自《ELKstack权威指南》 架构...
    GhostStories阅读 19,958评论 0 31
  • 1、ELK平台介绍 在搜索ELK资料的时候,发现这篇文章比较好,于是摘抄一小段:以下内容来自:http://bai...
    螺旋上升的世界阅读 3,048评论 0 20
  • 致青春年华的我们。 青春期的我们,正如树枝上的青苹果,既有苦涩,也略带哪一种独特的香味。 ...
    曦城关人阅读 354评论 0 0