Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to manually prune oldest logstash indices #5

Open
jjbuchan opened this issue May 14, 2021 · 0 comments
Open

How to manually prune oldest logstash indices #5

jjbuchan opened this issue May 14, 2021 · 0 comments

Comments

@jjbuchan
Copy link
Owner

When any of the log* nodes report excessive disk usage and a sudo du -kx --max-depth=3 / | sort -rn | head -10 shows the culprit is under /var/lib/elasticsearch, then the typical solution is to manually prune off the oldest logstash indices (created by day) to alleviate disk space.

On the node being fixed, first obtain the list of indices in basically date sorted order:

curl http://localhost:9200/_cat/indices|sort -k3

Looking at the third column, start working down the list of "logstash-*" indices performing an index delete operation until enough space is recovered (using df)

An example of a deletion is

curl -XDELETE http://localhost:9200/logstash-2016.09.16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant