esclean
v1.0.5
Published
Cleanup util for Elastic Search
Downloads
9
Readme
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 -g
Usage
$ 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 documents
This will delete all documents in logs index that are older than 7 days