Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb的prometheus总是会自动重加载配置文件,如何避免让它自己重加载
[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed that led to the issue
[Encountered Issue: Problem Phenomenon and Impact]
Prometheus modifies tidb.rules.yml, but the values are always reloaded and overwritten. How can I permanently modify the alert thresholds inside?
[Resource Configuration]
You need to customize the Prometheus rule, otherwise, it will be overwritten by the default configuration every time you restart or reload.
Place the custom rule configuration file in a directory on the specified machine.
Use tiup cluster edit-config ${cluster-name}
to modify the cluster configuration.
monitoring_servers:
- host: 127.0.0.1
rule_dir: /home/tidb/prometheus_rule # prometheus rule dir on TiUP machine
After the above configuration, during the cluster reload operation, TiUP will read the custom rule from the local path /home/tidb/prometheus_rule and then send this configuration to the Prometheus Server, replacing the default configuration rules.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.