Coder Social home page Coder Social logo

Comments (2)

untergeek avatar untergeek commented on June 9, 2024

I'm sorry if you accidentally deleted something you did not mean to delete. The functionality you are seeking already exists, after a fashion (just no prompting).

The --dry-run or -n flag lets you see the output of what curator Would have attempted:

$ curator --dry-run delete --older-than 4
2014-07-10T15:40:52.548 INFO                        main:644  Job starting...
2014-07-10T15:40:52.548 INFO                        main:647  DRY RUN MODE.  No changes will be made.
2014-07-10T15:40:52.549 INFO                   _new_conn:188  Starting new HTTP connection (1): localhost
2014-07-10T15:40:52.551 INFO         log_request_success:57   GET http://localhost:9200/ [status:200 request:0.002s]
2014-07-10T15:40:52.551 INFO                command_loop:538  Beginning DELETE operations...
2014-07-10T15:40:52.553 INFO         log_request_success:57   GET http://localhost:9200/logstash-*/_settings?expand_wildcards=closed [status:200 request:0.001s]
2014-07-10T15:40:52.561 INFO                command_loop:558  Would have attempted deleting index logstash-2014.07.05 because it is 2 days, 0:00:00 older than the calculated cutoff.
2014-07-10T15:40:52.561 INFO                command_loop:558  Would have attempted deleting index logstash-2014.07.06 because it is 1 day, 0:00:00 older than the calculated cutoff.
2014-07-10T15:40:52.561 INFO           find_expired_data:306  logstash-2014.07.07 is 0:00:00 above the cutoff.
2014-07-10T15:40:52.561 INFO           find_expired_data:306  logstash-2014.07.08 is 1 day, 0:00:00 above the cutoff.
2014-07-10T15:40:52.561 INFO           find_expired_data:306  logstash-2014.07.09 is 2 days, 0:00:00 above the cutoff.
2014-07-10T15:40:52.562 INFO           find_expired_data:306  logstash-2014.07.10 is 3 days, 0:00:00 above the cutoff.
2014-07-10T15:40:52.562 INFO                command_loop:580  DELETE index operations completed.
2014-07-10T15:40:52.562 INFO                        main:671  Done in 0:00:00.047178.

Since this functionality is already here, and since Curator is designed to be able to do these things without needing user input by default, I will not be adding confirmation dialogue.

from curator.

ppf2 avatar ppf2 commented on June 9, 2024

Ah got it, makes sense. Thx!

from curator.

Related Issues (20)

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.