1.0.5 • Published 9 years ago
esclean v1.0.5
esclean.js
Simple command line utility to cleanup ElasticSearch data, since ElasticSearch Curator doesn't work with AWS Elastic Search up to this date.
Installation
$ npm install esclean -gUsage
$ esclean --host <ES_HOSTNAME:PORT> -i <INDEX_NAME> -d <OLDER_THAN_NUM_OF_DAYS> <command> <category>Params overview
-host Host name and port. Defaults to localhost:9200.
-i, --index Index name. Can use wildcard (*) when deleting indices.
-d, --days Documents age. When deleting documents, will select all documents older than days param.
Commands overview
delete Delete documents or indices
Category overview
documents Perform command on documents
indices Perform command on indices
Example
$ esclean --host my-es-host:9200 -i logs -d 7 delete documentsThis will delete all documents in logs index that are older than 7 days