Fix Graylog Corruption

on Sept. 13, 2022, 3:10 p.m.

On occasions due to power outages and such, I have issues with an index getting corrupt. So here's how I fix it.

First, confirm cluster is unhealthy
curl -X GET "localhost:9200/_cluster/health"

Second, find out what index is the issue
curl -X GET localhost:9200/_cluster/allocation/explain?pretty

Third, delete that index
curl -X DELETE 'localhost:9200/graylog_29/'

Finally, create a blank index to fix issues in the GUI about it not being there
curl -X PUT "localhost:9200/graylog_29" -H 'Content-Type: application/json' -d'{ "settings" : { "index" : { } }}'