How to migrate Prometheus, Alertmanager, and Grafana to a new machine for TiDB installed with TiUP? TiDB version: v6.1.0

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tiup安装的tidb,如何迁移promethues, alertmanger, grafana到一个新的机器上?tidb版本:v6.1.0

| username: xiaoxiaozuofang

[TiDB Usage Environment] Production Environment
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Problem Phenomenon and Impact] TiDB installed with tiup, how to migrate Prometheus, Alertmanager, Grafana to a new machine? TiDB version: v6.1.0
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: zhanggame1 | Original post link

There is a migration case you can refer to:

| username: srstack | Original post link

First, scale out the new nodes, and then scale in the old nodes.

| username: xingzhenxiang | Original post link

First shrink, then expand

tiup cluster scale-in tidb-test -N XXX.XXX.XXX.XXX:9093,XXX.XXX.XXX.XXX:3000,XXX.XXX.XXX.XXX:9090
tiup cluster check ./single-monitor.yaml --user root -p (check method may vary due to different tiup versions)
tiup cluster scale-out tidb-test single-monitor.yaml --user root -p

This is my practice of migrating various components

| username: srstack | Original post link

:face_with_open_eyes_and_hand_over_mouth: Reducing the capacity first might result in the loss of operation time monitoring data.

| username: weixiaobing | Original post link

You can refer to this article 专栏 - 迁移prometheus数据 | TiDB 社区

| username: xingzhenxiang | Original post link

It depends on your own needs. I don’t have such a rigid requirement for historical data.

| username: Anna | Original post link

You can migrate the monitor-related components by first scaling down and then scaling up. Note the dependencies: Grafana depends on Prometheus. First, scale down Alertmanager, then Grafana, and finally Prometheus.

| username: cassblanca | Original post link

Expand new nodes on the new machine and then shrink the old nodes.