Manage index/indices using CLI?

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
PeterSDJV
Posts: 1
Joined: Thu Dec 20, 2018 6:59 pm

Manage index/indices using CLI?

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Manage index/indices using CLI?

Post 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'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked