Issue with the deployment of tiup v6.5.2 altermanager startup script run_alertmanager.sh

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

Original topic: 部署tiup v6.5.2 altermanager启动脚本run_alertmanager.sh缺陷问题

| username: TiDBer_fZli9pdu

[TiDB Usage Environment] Poc
[TiDB Version] v6.5.2
[Reproduction Path] Deploy cluster using the tiup cluster deploy command
[Encountered Issue: Problem Phenomenon and Impact] alertmanager fails to start
[Attachment: Screenshot/Log/Monitoring]
The auto-generated run_alertmanager script has a syntax issue. There is a space in line 10 exec > >, and the --cluster.advertise-address parameter is missing, causing alertmanager to fail to start.

How can I adjust the configuration of run_alertmanager.sh? If I modify it directly, tiup cluster reload will regenerate the script file, which does not solve the problem.

| username: tidb菜鸟一只 | Original post link

Isn’t it run_alertmanager.sh like this?

| username: TiDBer_fZli9pdu | Original post link

Try executing it directly to see if it throws an error?

| username: 大飞哥online | Original post link

Mine is like this too, no problem.

| username: 大飞哥online | Original post link

Also running normally

| username: 大飞哥online | Original post link

I can’t view images directly. Please provide the text you need translated.

| username: TiDBer_fZli9pdu | Original post link

Is the pipe symbol in this shell command followed by multiple spaces? How come manually executing it doesn’t throw an error?

| username: tidb菜鸟一只 | Original post link

Doesn’t this command mean to append all logs to the subsequent log file? Why is it throwing an error?

| username: redgame | Original post link

It can be executed.