问题描述
当前,我正在运行Prometheus v2.20.0,它存在一个问题,即WAL会无限期地增长并消耗磁盘空间。
实际上,磁盘空间现在不是问题,而是WAL文件夹没有被清理,因此,如果Prometheus重新启动,它将尝试将整个WAL加载到内存中。
例如,WAL现在为60GB,内存为32GB,因此当Prometheus被OOM杀死时,它将继续重新启动,因为它消耗了整个24GB的服务器内存。
这是我当前的配置,请注意,我使用Docker Compose运行它。
- '--web.enable-admin-api'
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.external-url=https://prometheus.example.com'
- '--storage.tsdb.path=/var/lib/prometheus'
- '--storage.tsdb.retention=150d'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
所以我的问题是,如何配置它以进行WAL的适当检查点和清理,以使其不会无限期增长?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)