Skip to content

Lightweight job to delete old Elasticsearch indices from logging based on percentage

License

Notifications You must be signed in to change notification settings

Global19/lightweight-curator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight Curator for Elasticsearch

Simplistic cousin of Elasticsearch curator, created for one purpose only:

Delete log indices created by fluentd which are above threshold of 80% calculated from total disk size.

Prerequisite

  • OpenShift user is able to create pods in openshift-logging namespace.

Deployment

Comand-line options

Dry_run prints the list of indices which would be passed onto deletion process, but do not execute.

-d --debug
-v --verbose
-n --dry_run

Manually running script for development purposes

Result of running following commands would be newly created lightweight-curator pod in openshift-logging namespace. From within this pod you can run lightweight_curator.py script.

$ oc apply src/cronjob.yaml -n openshift-logging
$ oc rsh deploy/lightweight-curator /bin/bash
$ python /home/lightweight_curator.py

About

Lightweight job to delete old Elasticsearch indices from logging based on percentage

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.2%
  • Dockerfile 6.6%
  • Makefile 1.2%