Page 1 of 1

Manage index/indices using CLI?

Posted: Thu Jan 10, 2019 6:07 pm
by PeterSDJV
Hi,

My NLS login taking forever. I notice it has high loads and thus clustering status red, etc.
I suspect it has too much work now as index/indices was not set to close automatically and it has probably minimum of 30 days of indices loaded.

I can SSH to it though., Is there a way for me to manually close old indices using CLI? I was able to login to web consoole on the other node and did that, the performance is much improved now.

Or any workaround that will allow me to get into the system config and setup index maintenace?

Thank you

Re: Manage index/indices using CLI?

Posted: Fri Jan 11, 2019 10:10 am
by cdienger
You can close a index from the from the command line:

curl -XPOST 'localhost:9200/logstash-YYYY.MM.DD/_close'

It also accepts wildcards so if you wanted to close all of Decembers indices:

curl -XPOST 'localhost:9200/logstash-2018.12.*/_close'