×

Prometheus数据迁移至VMstorage

hqy hqy 发表于2024-08-29 10:21:33 浏览280 评论0

抢沙发发表评论

Prometheus数据迁移至VMstorage

#一、下载vmctl包


wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.90.0/vmutils-linux-amd64-v1.90.0.tar.gztar -xzvf vmutils-linux-amd64-v1.90.0.tar.gz
1
2

#二、创建Prometheus数据快照


修改Prometheus启动命令,开启api管理

--web.enable-lifecycle --web.enable-admin-api
1

使用HTTP POST创建快照

curl -XPOST 127.0.0.1:9090/api/v1/admin/tsdb/snapshot
{"status":"success","data":{"name":"20240221T033030Z-38901c06b57f918d"}}
1
2

提示

可以进入Prometheus --storage.tsdb.path下的snapshots查看快照,快照几乎不占用磁盘空间。

#三、Prometheus快照进行传输


vmctl-prod prometheus --prom-snapshot=/prometheus/snapshots/0240221T033030Z-38901c06b57f918d --vm-addr=http://10.3.147.192:8480 --vm-concurrency=6 --vm-account-id=66--vm-concurrency 并发数
--vm-account-id vm集群的account_id
1
2
3

更多详情,请参考官方文档(opens new window)


本文链接:https://hqyman.cn/post/7844.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到: