External_labels in Prometheus

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

Original topic: promethus中的external_labels

| username: chenhanneu

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"
| username: 有猫万事足 | Original post link

If you want to add it, you can modify the configuration file and then restart Prometheus.

| username: 小龙虾爱大龙虾 | Original post link

The cluster=“xxx” can already distinguish different clusters, so why add an env?

| username: Kongdom | Original post link

You should be able to add it through the normal configuration file modification method.

| username: chenhanneu | Original post link

I want to add some information related to tiup.

| username: chenhanneu | Original post link

After reloading with tiup, it got overwritten.

| username: chenhanneu | Original post link

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”
| username: Hacker_zuGnSsfP | Original post link

–web.enable-lifecycle, --web.page-title=“tiupxxxxx” parameters