码迷,mamicode.com
首页 > 其他好文 > 详细

prometheus快照

时间:2018-09-28 16:39:48      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:eth   tor   http   data   config   rom   cal   oca   follow   

prometheus快照:

启动prometheus服务时加--web.enable-admin-api

/space/prometheus/prometheus --config.file=/space/prometheus/prometheus.yml --storage.tsdb.path=/space/prometheus/data --web.enable-admin-api

制作快照:

curl -XPOST http://localhost:9090/api/v2/admin/tsdb/snapshot

会在/space/prometheus/data/生成snapshots目录,里面是以日期开头的子目录,可将该目录剪切到其它备份路径

恢复快照:

将prometheus服务关闭,/space/prometheus/data目录改名,然后将snapshots下日期开头的目录改名为data,再开启prometheus服务即可

prometheus快照

标签:eth   tor   http   data   config   rom   cal   oca   follow   

原文地址:http://blog.51cto.com/yangzhiming/2287205

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!