Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: promethus中的external_labels
Is there a way to add an item to the external_labels in the Prometheus configuration file?
external_labels:
cluster: 'tidb-test'
monitor: "prometheus"
env: "test"
If you want to add it, you can modify the configuration file and then restart Prometheus.
The cluster=“xxx” can already distinguish different clusters, so why add an env?
You should be able to add it through the normal configuration file modification method.
I want to add some information related to tiup.
After reloading with tiup, it got overwritten.
The current method involves adding additional_args to the tiup monitor section. However, the optional items are fixed, and one of them, web.page-title (the page title), has been modified. A higher version of tiup cluster is required.
additional_args:
- –web.enable-lifecycle
- –web.page-title=“tiupxxxxx”
–web.enable-lifecycle, --web.page-title=“tiupxxxxx” parameters