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

能否提供方法 可以获取容器的自定义指标 #259

Closed
halleystar opened this issue Apr 18, 2024 · 2 comments
Closed

能否提供方法 可以获取容器的自定义指标 #259

halleystar opened this issue Apr 18, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@halleystar
Copy link
Contributor

这里提供自定义指标 可以省去后续关联的问题。

@jzwlqx jzwlqx added the enhancement New feature or request label Apr 24, 2024
@jzwlqx
Copy link
Collaborator

jzwlqx commented Apr 24, 2024

配置示例

debugMode: true
port: 9102
enableController: true
metrics:
  additionalLabels:
    name1=value1
    name2=${labels:app}
    name3=prefix_${labels:owner}_suffix
  1. metrics中增加additionalLabels,在metrics上追加用户自定义label。additionalLabels中的每一条都将作为额外的key-value对添加到Prometheus labels中
  2. name暂时只支持常量,value中可以包含变量,变量用${}包围。
  3. 变量的结构是 source:key,可能的source有labels, annotation等,暂时只支持labels,${labels:app}表示pod labels中的app对应的值。

@jzwlqx jzwlqx added this to the Kubeskoop 1.1.0 milestone Apr 25, 2024
@halleystar
Copy link
Contributor Author

能否把这个任务分配给我。 我想提一个pr

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

No branches or pull requests

2 participants