Created
July 18, 2013 08:47
-
-
Save troszok/6027775 to your computer and use it in GitHub Desktop.
Cleanup logstash elasticsearch indexes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aliases = Tire::Configuration.client.get("#{Tire::Configuration.url}/_aliases") | |
| JSON.parse(aliases.body).keys.select{|v| v =~ /^logstash/i }.each do |n| | |
| Tire::Index.new(n).delete | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment