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

静态配置中默认label保留目的是什么 #23

Closed
like-inspur opened this issue Feb 18, 2021 · 4 comments
Closed

静态配置中默认label保留目的是什么 #23

like-inspur opened this issue Feb 18, 2021 · 4 comments

Comments

@like-inspur
Copy link
Contributor

查看prometheus的静态配置,除了给指标使用的label外,还有一些默认label和__parm开头的label,保留目的是什么
image
image

@RayHuangCN
Copy link
Member

您好,这几个label是用于sidecar识别抓取请求用的,__param的label会被prometheus加到请求参数里,从而传递给sidecar,sidecar用这些参数去配置文件里找到对应的job,利用job里的配置进行实际的采集(例如证书信息)

@like-inspur
Copy link
Contributor Author

sidecar的拉取不能直接读取静态配置的target吗,你的意思是它必须依赖这些label才能找到对应job和target,从而完成拉取

@RayHuangCN
Copy link
Member

因为请求过来的时候,只有url,并不知道是哪个job的抓取请求。

@like-inspur
Copy link
Contributor Author

嗯,那我再看下sidecar的代码,理解下是怎么使用这些label的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants