更新 运行 Prometheus 容器上的执行参数
Update execute parameter on a running Prometheus container
我有一个 运行 Prometheus docker 容器。命令是
/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheus
根据文档https://prometheus.io/docs/prometheus/latest/storage/
,我发现默认数据库只保留 15 天的数据
有没有办法在 运行 容器上添加 --storage.tsdb.retention.time 标志?
这意味着它会喜欢这个
/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheus --storage.tsdb.retention.time=90d
您必须登录到容器,终止进程并使用新设置重新启动它,但您将在下次容器重新启动时丢失它们!
要使它们持久化,您应该用新的容器重新创建容器,但该解决方案只适用于将容器数据存储到外部卷中。
我有一个 运行 Prometheus docker 容器。命令是
/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheus
根据文档https://prometheus.io/docs/prometheus/latest/storage/
,我发现默认数据库只保留 15 天的数据有没有办法在 运行 容器上添加 --storage.tsdb.retention.time 标志? 这意味着它会喜欢这个
/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/data/prometheus --storage.tsdb.retention.time=90d
您必须登录到容器,终止进程并使用新设置重新启动它,但您将在下次容器重新启动时丢失它们!
要使它们持久化,您应该用新的容器重新创建容器,但该解决方案只适用于将容器数据存储到外部卷中。