How to Customize the Alertmanager Address in Prometheus for TiDB

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

Original topic: TiDB如何自定义promtheus里面alertmanager的地址

| username: Jiawei

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 5.3
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
When I deploy the TiDB cluster, I want to use my own alertmanager. How can I customize the Prometheus configuration so that Prometheus’s configuration is associated with my own?
PS: I can manually modify the alertmanager address in the Prometheus configuration file, but restarting TiDB or changing the configuration, adding or removing nodes, will cause the configuration file to be overwritten. Is there any way to customize it?
[Resource Configuration]
[Attachments: Screenshots / Logs / Monitoring]

| username: Raymond | Original post link

If you just want to push Prometheus alerts to your Alertmanager, you can modify the following configuration in the Prometheus configuration file and then restart Prometheus.
image
However, customizing the Prometheus configuration file is currently not possible unless you do not execute the tiup reload -R prometheus command.

| username: Jiawei | Original post link

This is indeed possible, but during scaling, the node changes will overwrite the original configuration file.

| username: Raymond | Original post link

There is no way, because prometheus.yaml is automatically generated, unless you modify the tiup code.

| username: Jiawei | Original post link

Finally found a solution. You can configure an external_alermanager in monitor_server to solve this problem.

| username: Jiawei | Original post link

You can refer to my post.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.