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

Extend configuration for exported labels or metrics without labels #117

Open
xhejtman opened this issue Oct 25, 2024 · 5 comments
Open

Extend configuration for exported labels or metrics without labels #117

xhejtman opened this issue Oct 25, 2024 · 5 comments
Labels
good first issue Good for newcomers

Comments

@xhejtman
Copy link

Hello,

would it be possible to implement extended configuration so that some of metrics are not subject of label injections? Such as kube_node_labels do not use namespaces. So such metrics could be whitelisted in configuration.

Or there are some metrics that use exported_namespace instead of namespace. Could be such metrics listed so that label injector injects the exported_namespace instead of the namespace? Thanks.

@angelbarrera92
Copy link
Member

I agree on the feature of modifying the injection label. By default it is namespace, and sometimes metrics uses exported_namespace among others.

Do you want to implement it?

@angelbarrera92 angelbarrera92 added the good first issue Good for newcomers label Nov 22, 2024
@xhejtman
Copy link
Author

I tried to implement it by myself, but I had to hack original prometheus code. I did not know how to do it in clean way. E.g., if request combines both namespace and exported_namespace metrics.

Do you have any better idea?

@angelbarrera92
Copy link
Member

I was thinking about using either exported_namespace or namespace

@angelbarrera92
Copy link
Member

Probably by using a cli flag like --namespace-label=namespace (default value: namespace)

@xhejtman
Copy link
Author

OK, I see, but in such a case, it does not help a lot unless you run like 3 proxies, one for generic metrics (like node labels), one for exported_namespaces and one for namespaces. I would prefer to integrate them into a single one.

And I think this is actually doable right now using lables instead of namespaces.

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

No branches or pull requests

2 participants