Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about custom labels for alerts #14058

Open
243560834 opened this issue May 7, 2024 · 1 comment
Open

Questions about custom labels for alerts #14058

243560834 opened this issue May 7, 2024 · 1 comment

Comments

@243560834
Copy link

What did you do?

在prometheus.yml配置主机时在多个job_name下都添加了一个自定义label,但在alertmanager告警时只有个别主机的label出现在告警信息中,有些job_name的告警信息中就没有这个label,这是怎么回事

What did you expect to see?

No response

What did you see instead? Under which circumstances?

想知道为什么这个自定义标签会出现这种情况

System information

No response

Prometheus version

prometheus, version 2.29.1 (branch: HEAD, revision: dcb07e8eac34b5ea37cd229545000b857f1c1637)
  build user:       root@364730518a4e
  build date:       20210811-14:48:27
  go version:       go1.16.7
  platform:         linux/amd64

Prometheus configuration file

No response

Alertmanager version

No response

Alertmanager configuration file

No response

Logs

No response

@bwplotka
Copy link
Member

bwplotka commented May 7, 2024

Hi,

We don't speak Chinese here sorry. Do you mind translating to English before submitting next time? I did it using Google translate for your first sentence and title.

When configuring the host in prometheus.yml, a custom label is added under multiple job_names. However, when the alertmanager generates an alarm, only the labels of individual hosts appear in the alarm information. The label is not included in the alarm information of some job_names. How is this? What's going on

Custom label.. do you mean external label section? Sharing your prometheus.yaml would help. AFAIK the external labels should be attached to all alerts by default.

@bwplotka bwplotka changed the title 关于自定义标签的疑问 Questions about custom labels for alerts May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants