Full disk cleanup


(Rob) #1

As of today I inherited an ubuntu logging server running graylog2. I went
to log on to the web interface for the first time which gave an error when
loading that there's no free disk space on the machine. Without throwing
more space on the machine is there a good way to shrink down its usage?
Also, how can I limit its disk usage in the future? The majority of usage
is in /var/lib/elasticsearch/elasticsearch/nodes/0/indices/graylog2 and
/var/lib/mongodb/journal.

--


(Radu Gheorghe) #2

Hello Rob,

You can delete the graylog2 index with something like:

curl -XDELETE localhost:9200/graylog2

or all the data in ES with:

curl -XDELETE localhost:9200

If you want to limit the size of your indices, I guess you'll have to
do that outside ES, with a cronjob or something. You can check the
index size with the Indices Status API:
http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html

And if it's too big, you can delete documents matching a certain query:
http://www.elasticsearch.org/guide/reference/api/delete-by-query.html

Other things you can do:

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Tue, Nov 6, 2012 at 1:20 AM, Rob rardies@elandatamakers.com wrote:

As of today I inherited an ubuntu logging server running graylog2. I went
to log on to the web interface for the first time which gave an error when
loading that there's no free disk space on the machine. Without throwing
more space on the machine is there a good way to shrink down its usage?
Also, how can I limit its disk usage in the future? The majority of usage
is in /var/lib/elasticsearch/elasticsearch/nodes/0/indices/graylog2 and
/var/lib/mongodb/journal.

--

--


(system) #3