GithubHelp home page GithubHelp logo

dopey's Introduction

改版了一下,批量处理, 现在快多了~很适合大集群~~

dopey

ES索引的维护脚本, 每天close delete reallocate optimize索引

依赖

click==3.3
elasticsearch==1.3.0
elasticsearch-curator==3.2.1
PyYAML==3.11
urllib3==1.10
wheel==0.24.0

使用

dopey.py -c dopey.yaml -l /var/log/dopey.log --level debug

advanced

dopey.py -c dopey.yaml --base-day -1 #以昨天做为基准日期计算

dopey.py -c dopey.yaml --base-day 1 #以明天做为基准日期计算

dopey.py -c dopey.yaml --base-day 2016-11-11 #以指定日期做为基准日期计算

dopey.py -c dopey.yaml --action-filters u,c #只做update setting, close index. 一共有4种操作, d:delete, c:close, u:update settings,f:force merge. 不加这个参数代表全部都可以执行.

dopey.py --help

下面这样可以实现: 按月建的索引, 在34天后删除, 按天建的索引, 2天后删除

  .*-(?=\d{4}\.\d{2}$):
    - delete_indices:
        days: 34
  .*-(?=\d{4}\.\d{2}\.\d{2}$):
    - delete_indices:
        days: 2

dopey's People

Contributors

childe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.