How to Reinstall the Grafana Component Using TiUP When Grafana Status is Down

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

Original topic: grafana状态down tiup如何重新安装grafana组件

| username: xiaoxiaozuofang

[TiDB Usage Environment] Production Environment / Test / Poc
[TiDB Version] tidbv6.1.0
[Reproduction Path] Operations performed that led to the issue
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots / Logs / Monitoring]

tiup cluster scale-out tidb-test scale-out.yaml -p scale-out

scale-out.yaml

grafana_servers:

  • host: 192.168.3.217
    port: 3000
    deploy_dir: /home/tidb-deploy/grafana-3000

Error

Starting component cluster: /root/.tiup/components/cluster/v1.10.2/tiup-cluster scale-out tidb-test scale-out.yaml -p

Error: yaml: line 1: did not find expected ‘-’ indicator

Verbose debug logs have been written to /root/.tiup/logs/tiup-cluster-debug-2022-11-19-17-23-40.log.

| username: Raymond | Original post link

It’s very easy:

  1. Why is Grafana down, and can it be brought back up?
  2. If it can’t be brought back up, first use tiup cluster scale-in <cluster_name> -N <grafana_node_ip:port> to scale in Grafana.
  3. Then use tiup cluster scale-out to scale out one Grafana instance.
| username: xiaoxiaozuofang | Original post link

Expansion error, don’t know what’s going on
tiup cluster scale-out tidb-test scale-out.yaml -p Expansion

scale-out.yaml

grafana_servers:

host: 192.168.3.217
port: 3000
deploy_dir: /home/tidb-deploy/grafana-3000
~
Error

Starting component cluster: /root/.tiup/components/cluster/v1.10.2/tiup-cluster scale-out tidb-test scale-out.yaml -p

Error: yaml: line 1: did not find expected ‘-’ indicator

Verbose debug logs have been written to /root/.tiup/logs/tiup-cluster-debug-2022-11-19-17-23-40.log.

| username: Raymond | Original post link

The expansion YAML file you wrote has a problem.
grafana_servers:

  • host: xxxx
    port: 3000
    deploy_dir: /home/tidb-deploy/grafana-3000

Write it this way.

| username: 啦啦啦啦啦 | Original post link

Pay attention to whether it is an indentation issue.

| username: forever | Original post link

Try a single line.

| username: 我是咖啡哥 | Original post link

Your current problem is with the format.
You can resolve it by expanding or shrinking.
However, the data might be lost. I have tested changing the directory before.