Skip to main content

Delete old logstash indices from Elasticsearch

Project description

Delete logstash indexes older than n days from ElasticSearch.

$ logstash-index-cleaner -h
usage: logstash-index-cleaner [-h] [-v] [--host HOST] [--port PORT]
                              [-t TIMEOUT] [-p PREFIX] [-s SEPARATOR]
                              [-H HOURS_TO_KEEP] [-d DAYS_TO_KEEP] [-n]

Delete old logstash indices from Elasticsearch.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --host HOST           Elasticsearch host.
  --port PORT           Elasticsearch port
  -t TIMEOUT, --timeout TIMEOUT
                        Elasticsearch timeout
  -p PREFIX, --prefix PREFIX
                        Prefix for the indices. Indices that do not have this
                        prefix are skipped.
  -s SEPARATOR, --separator SEPARATOR
                        Time unit separator
  -H HOURS_TO_KEEP, --hours-to-keep HOURS_TO_KEEP
                        Number of hours to keep.
  -d DAYS_TO_KEEP, --days-to-keep DAYS_TO_KEEP
                        Number of days to keep.
  -n, --dry-run         If true, does not perform any changes to the
                        Elasticsearch indices.

Project history

This is a fork of

Since ElasticSearch 0.90 all fields are compressed, and some benchmarks show that nothing improves optimizing those already compressed indices. That’s why this fork does not include the original

Optimizations references:

Project details

Release history Release notifications

History Node


History Node


History Node


This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
logstash-index-cleaner-0.2.1.tar.gz (4.5 kB) Copy SHA256 hash SHA256 Source None Dec 4, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page