如何在 Omnibus/Docker 设置中清理大型 gitlab prometheus/data
在我的许多 dockerized Gitlab 实例中,prometheus/data 文件夹占用了多个 GB 的硬盘空间,尽管我根本没有使用 Prometheus。
为了修复此问题,我首先在 docker-compose.yml 配置中使用以下命令禁用了 Prometheus
config_snippet.txt
prometheus_monitoring['enable'] = false另请参见我如何在基于 docker 的设置中减少 gitlab 内存消耗获取详细说明。
之后,你需要重启 gitlab 以使设置更改生效。
现在你可以删除 Prometheus 数据文件夹。在此步骤之前备份整个 gitlab 数据文件夹。 从你的 gitlab 数据文件夹中运行此命令:
remove_prometheus_data.sh
rm -rf prometheus/dataIf this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow