如何从 Graylog 2.1 中手动清除数据
·
问题:如何从 Graylog 2.1 中手动清除数据
我有一个运行了一段时间的 Graylog 2.1 服务器。我最近没有注意我的保留率,今天早上进来发现 Graylog 部分崩溃了,因为磁盘空间不足。目前 Elasticsearch Shards 占用了近 100% 的磁盘空间。 Graylog 的 Web 界面目前在其所处的状态下不可用。我尝试了一些标准的 Ubuntu 技巧来释放磁盘空间,例如apt-get autoremove和clean,但无法获得足够的 Web 界面功能。
问题是我目前可以找到的所有用于更改保留率和循环分片的文档都是通过 Web 界面。 Graylog 配置文件中不再出现唯一的配置选项。
有谁知道从 Graylog 2.1 中的 Elasticsearch Shards 中清除数据的手动 CLI 方式?
解答
急救:检查存在哪些指标:
curl http://localhost:9200/_cat/indices
然后删除最旧的索引(你不应该全部删除)
curl -XDELETE http://localhost:9200/graylog_1
curl -XDELETE http://localhost:9200/graylog_2
curl -XDELETE http://localhost:9200/graylog_3
修复: 然后您可以将 /etc/graylog/server/server.conf 中的参数 elasticsearch_max_number_of_indices 减少到适合您的磁盘的值。
更多推荐
所有评论(0)